PhotoPost Community

PhotoPost Community (http://www.photopost.com/forum/)
-   How Do I? - vBulletin 4.0 (http://www.photopost.com/forum/how-do-i-vbulletin-4-0/)
-   -   Import old VBA photos? (http://www.photopost.com/forum/how-do-i-vbulletin-4-0/145441-import-old-vba-photos.html)

Dr.H March 7th, 2011 12:45 AM

Import old VBA photos?
 
Hi
Sorry if this is a repeat but I couldn't find the exact thread I needed.

My original gallery was a vbadvanced one back in the day until I upgraded it to vBGallery 2.5 a while back. The install went fine but I was never able to see the old vbadvanced photos and categories in the new gallery.

I just updated to vBGallery 3.01 since my gallery was down since we upgraded to VB4 last year. The upgrade went fine and all of the 2.5 images are there but I would like to add back in all of the old vBA photos if I can?

All of the old images are still in the /gallery/images/ number folders and all the image paths still work so they show in their threads but none of them are in the gallery itself.

If I use Maintenance to scan the database I see all the images listed as "Not In Database"

Is there a way to rebuild the database so that it grabs those files and puts them where they need to be in the gallery?

Thanks for any help you can give me.

Chuck S March 7th, 2011 09:22 AM

No sorry if those images were never part of the actual vbgallery install you have you can not hit a switch to have them appear. The actual images would have to be uploaded to the gallery.

I would suspect you by mistake did a new install of vbgallery 2.5 instead of actually upgrading an older version of the gallery.

Dr.H March 7th, 2011 09:49 AM

Hmm you're probably right about the new install. It was a while ago so I can't remember what happened.

Thanks

Chuck S March 7th, 2011 10:44 AM

That would explain what your describing.

Dr.H March 7th, 2011 12:21 PM

Is there anyway I can use the current file structure to let me know where to create user categories and which images go where?

Lets say there are photos in folder /gallery/files/1/2/3/0 is there some sort of way to know those are photos from member "X" and go in a gallery called "Cats" as a random example.

I'm trying to find a way to upload the photos to the new gallery without breaking the links to the old photos in the forum threads.

Luciano March 7th, 2011 12:35 PM

Well there are several ways you can achieve that with more or less work:

If you have images in folder: /gallery/files/1/2/3/0
they belong to user with userid: 1230

Now I dont know how many images you have... if it is not very large (less than 8000) you could go to maintenance and change storage method.
This will move ALL your images to folder files, with no subfolders ALL not used files would remain in the userfolders..
you could then copy them somewhere else and change storage method again. to have the userfolders created.

ATTENTION if you have more than 8000 pics that could crash your system, as some flavors of linux only support directories with maximum 25000 entries.
(and dont forget you have images AND thumbnails (and maybe originals))

------------------------------

AN other method I would recommend is copy with ftp your files directory from server to your local harddisk... in a directory called "Backup1"

then in maintenance run a search for db errors. This will scan your db and your files directory for images NOT in database and delete them.

Once you deleted ALL stray images, copy your files folder with ftp to your local harddisk in a directory called "Backup2"

Then do a directorycompare with a directory compare software, (there are many out there.. i use "beyond compare" but there are probably also some free ones out there.

Delete from Backup1 ALL files that are in both directories (Backup1 and Backup2)
then you should only have left in backup1 the files that are NOT in the database.

thats my 2 cents

Luc

Dr.H March 9th, 2011 02:41 PM

Thanks for the tip Luc.

Now I have all of the old photo's on a separate backup. I'm guessing there is no way to know which photo's went into which sub categories for each member and the best I can do it to just upload each members photos into their member category and let them move them into their own sub categories from there?

It looks like the sub categories are just for displaying inside of vbgallery and all of the members files are still lumped together in their one gallery file folder on the server.

Luciano March 10th, 2011 12:44 AM

You are correct. The only way of knowing which cat the images were in is to have the old database. in there you would have the image filename and the catid, which is the Id of the category its in.
(and I am not sure how old versions of gallery handled that, because i dont have them any more and even couldnt install them as they dont support php5)

Quote:

Originally Posted by Dr.H (Post 1285486)
It looks like the sub categories are just for displaying inside of vbgallery and all of the members files are still lumped together in their one gallery file folder on the server.

Unless you have safe mode on, the files should be in a directory for each user.
if safe mode is on then only they would be stray in the files folder, but each file would have the userid in front (example: user id 234 would have all image files starting with 234_ so example: 234_image.jpg)

Luc


All times are GMT -5. The time now is 05:12 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97