Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4257
Latest: Alex998.
New This Month: 1
New This Week: 0
New Today: 0
Stats
Total Posts: 43293
Total Topics: 7522
Most Online Today: 118
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 106
Total: 106

Author Topic: Need help with recover of missing albums.  (Read 7384 times)

0 Members and 1 Guest are viewing this topic.

Offline Ken.

  • SMF Gallery Pro Customer
  • Full Member
  • *****
  • Posts: 113
  • TP Rules!
    • View Profile
Need help with recover of missing albums.
« on: April 13, 2008, 08:21:23 pm »
My album's list was getting rather long so I thought that assigning some of them to a parent category would be a good thing, trouble is when they were moved into the category they disappeared. The category that they were moved to is the default "Member Galleries".

Is there a way to cause them to show in the Member Galleries, or failing that to move them back to their original position?
... I can tell that at least one of the albums is still there somewhere because images from the album show in my "Recent Pictures" list.


Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16451
    • View Profile
Re: Need help with recover of missing albums.
« Reply #1 on: April 13, 2008, 09:19:09 pm »
Pictures are not meant to be moved to the member galleries placeholder. That category just holds the list of member galleries.   I see the bug with moving a picture and will get the member galleries option removed.

Here is a database query that you could use.
First step find what category the members gallery is. This gets you the ID_CAT

Code: [Select]
SELECT ID_CAT FROM smf_gallery_cat WHERE title = 'Member Galleries';

Next step is to figure out which user's category you wish to move to
Example
http://www.ourfamilyforum.org/FamilyForum/index.php?action=gallery;su=user;cat=1;u=57
This user is Jake and user category ID of 1
Remember this user's category will be used laster

To move all pictures to his category
Make a backup first of the gallery_pic table then run
Code: [Select]
UPDATE smf_gallery_pic  SET USER_ID_CAT = USERSCATIDHERE, ID_CAT = 0  WHERE  ID_CAT = ID_CAT_HEREFROMFIRSTQUERY

Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline Ken.

  • SMF Gallery Pro Customer
  • Full Member
  • *****
  • Posts: 113
  • TP Rules!
    • View Profile
Re: Need help with recover of missing albums.
« Reply #2 on: April 14, 2008, 05:36:58 am »
Thanks for the reply Hacks.

The ID_CAT list of the albums that were moved (6 albums) was pulled using the query that you posted and that went OK, but I'm not 100% sure on how to write the update query.

In this example are the values set correctly to move the album back to the regular Gallery section if the ID_CAT number is 5?
Code: [Select]
UPDATE smf_gallery_pic  SET USER_ID_CAT = 5, ID_CAT = 0  WHERE  ID_CAT = ID_CAT_5

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16451
    • View Profile
Re: Need help with recover of missing albums.
« Reply #3 on: April 14, 2008, 07:16:07 am »
Your example would move the pictures to the user gallery category that is number 5

If you want to move it to a normal gallery
Code: [Select]
UPDATE smf_gallery_pic  ID_CAT =MainGalleryCategoryIDHERE  WHERE  ID_CAT = 5
Where 5 is the category id of the "Member Galleries" category

Replace MainGalleryCategoryIDHERE with the ID of the Main category to move the pictures to.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline Ken.

  • SMF Gallery Pro Customer
  • Full Member
  • *****
  • Posts: 113
  • TP Rules!
    • View Profile
Re: Need help with recover of missing albums.
« Reply #4 on: April 14, 2008, 07:50:29 am »
So if there is an album category called "Member Pics" with the ID of '3' the command would be as below?
http://www.ourfamilyforum.org/FamilyForum/index.php?action=gallery;cat=3

Code: [Select]
UPDATE smf_gallery_pic  ID_CAT =3  WHERE  ID_CAT = 5

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16451
    • View Profile
Re: Need help with recover of missing albums.
« Reply #5 on: April 14, 2008, 09:05:17 am »
One small change
Code: [Select]
UPDATE smf_gallery_pic SET  ID_CAT =3  WHERE  ID_CAT = 5
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline Ken.

  • SMF Gallery Pro Customer
  • Full Member
  • *****
  • Posts: 113
  • TP Rules!
    • View Profile
Re: Need help with recover of missing albums.
« Reply #6 on: April 14, 2008, 09:50:25 am »
I'm still doing something incorrectly.

The query is moving the pictures, but not the album itself.
Will I need to create a new album to place the recovered pictures in?

Offline Ken.

  • SMF Gallery Pro Customer
  • Full Member
  • *****
  • Posts: 113
  • TP Rules!
    • View Profile
Re: Need help with recover of missing albums.
« Reply #7 on: April 14, 2008, 10:44:54 am »
Got it.  :)

It was not a big deal after I started to understand the queries a little better and started to do things in the correct order.

Thanks for the help... Ken.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16451
    • View Profile
Re: Need help with recover of missing albums.
« Reply #8 on: April 14, 2008, 10:46:29 pm »
Glad you got it working. I keep the DB structure pretty simple to allow moving of items around pretty easily and getting the information that is needed.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

 

Related Topics

  Subject / Started by Replies Last post
2 Replies
3639 Views
Last post April 22, 2007, 07:33:43 am
by winaje
1 Replies
3501 Views
Last post August 23, 2009, 04:08:29 am
by davieb
4 Replies
4106 Views
Last post May 18, 2010, 03:02:32 am
by spikeweb
11 Replies
6838 Views
Last post March 02, 2011, 10:19:46 pm
by j3cubcapt
2 Replies
4673 Views
Last post August 12, 2016, 03:14:37 pm
by paula

+- Recent Topics

Rate own images by fvlog19
April 11, 2024, 10:56:53 am

Tidy Child Boards on 2.1.4 by SMFHacks
April 04, 2024, 03:54:12 pm

Problems SMF 2.0.19 > 2.1.4 SMF Gallery Pro - Recents Images to overall header by Michel68
March 30, 2024, 12:41:08 pm

Can't DROP 'id_member'; check that column/key exists Datei: by SMFHacks
March 30, 2024, 11:58:20 am

No thumbnails on new uploads by Tonyvic
March 29, 2024, 06:26:18 am

Display the Contact Page for guests by SMFHacks
March 27, 2024, 10:55:43 am

is it possible to add support for odysee.com by fvlog19
March 21, 2024, 08:47:51 am

Request for admin notification by davejo
March 10, 2024, 01:31:59 am

I need help with torrent upload by Ineedsmfhelp
March 09, 2024, 10:01:13 pm

an idea for new mod (( content type with different display )) by SMFHacks
February 27, 2024, 01:36:27 pm

Powered by EzPortal