PhotoPost Community

PhotoPost Community (http://www.photopost.com/forum/)
-   vBGallery Import Scripts (http://www.photopost.com/forum/vbgallery-import-scripts/)
-   -   Import from flat file (http://www.photopost.com/forum/vbgallery-import-scripts/134706-import-flat-file.html)

esscott December 21st, 2007 12:38 PM

Import from flat file
 
I am moving from a site that had a custom coded ASP image gallery of sorts. I have downloaded the data in excel files. I'm wondering if there is an import script that will allow me to formate this data and import it.

Zachariah December 21st, 2007 06:38 PM

I use and old 3rd party windows application. It has an option to import CVS files into your databases. "MySQL-Front"

I think:
http://www.phpmyadmin.net

There are a few import scripts here that moves data from 1 database to the other.

This is also nice:
http://us3.php.net/fgetcsv

esscott December 28th, 2007 08:16 AM

I have the data imported and it looks like it all worked. However, I can't figure out where it is looking for my images. What directory should I upload my files to for them to be found.

http://67.192.62.180/gallery/browsei...p?c=13&userid=

Zachariah December 28th, 2007 07:07 PM

URL to Gallery Images:
$gallery_url = http://www.domain.com/gallery/files

Path of Images:
$gallery_path = /path/to your/gallery/files

$userid = User ID is the Id given by vBulletin

$userid_path = implode('/',preg_split('//', $userid, -1, PREG_SPLIT_NO_EMPTY));

$path = "$gallery_path/$userid_path";

Path:
/path/to your/gallery/files/u/s/e/r/i/d/image_name.jpg
URL:
http://www.domain.com/gallery/files/u/s/e/r/i/d/image_name.jpg

Images:
Thumbnail: image_name_thumb.jpg
Med/Large: image_name.jpg
Original: image_name_original.jpg

esscott December 31st, 2007 09:36 AM

I've placed the image file in a folder that should match the format you provided and - no luck.

What next...

This is the post that should pull up the image:
http://67.192.62.180/gallery/showimage.php?i=809&c=13

This is the image on my site:
http://67.192.62.180/gallery/files/a/d/m/i/n/13671A.jpg

Could I have the database incorrect? I wasn't able to provide a dimensions or file size for the images? This is the database entry for this item:

809 1963 mercury comet 4 door wagon :: John Hunten 1963 comet 4 door wagon,converted into a 2 door co... 13 0 1 admin jpg 13671A.jpg 0 0 0 0 0 0 7 0 1 1 0 0 0 0 0

Chuck S December 31st, 2007 09:44 AM

I beleive what Zachariah has told you is the files should be userid not username like so

INCORRECT

http://67.192.62.180/gallery/files/a/d/m/i/n/13671A.jpg

CORRECT

http://67.192.62.180/gallery/files/1/13671A.jpg

esscott December 31st, 2007 01:09 PM

Well that makes sense, but I tried that too... still no luck.

Sorry to be such a hassle.

Chuck S December 31st, 2007 02:13 PM

Well I am not the vbgallery guru here so I will let Josh respond but your issue seems centered around your import thing and not specifically the product itself.

The files are like that on my test site?

http://omegatron.net/gallery/showimage.php?i=1&catid=3

http://www.omegatron.net/gallery/fil...nterLeaves.jpg

More than likely once you get all the main images showing you need to rebuild your thumbnails. You sure your import worked correctly? Is the filename correct in the filename field in the database?

esscott December 31st, 2007 03:08 PM

My guess is my data isn't correct. I included a example line out of my database in the earlier post. I hope that the problem isn't the image size fields being blank.

Zachariah December 31st, 2007 03:47 PM

If the names are correct and the images are in the correct place you can run a utility in maintenance of the gallery.

AdminCP => vBGallery => Maintenance
- Rebuild Image Info
Quote:

This tool will re-calculate the width, height, and filesize of your images. Select the number of images you would like to process at a time, the category you would like to rebuild images in, and then click 'Rebuild Image Info' to begin
Sample Image 25 below.
I exported a image and its fields for data layout.

Code:

Content visible to verified customers only.
Code:

Content visible to verified customers only.

esscott January 2nd, 2008 03:29 PM

Running the maintenance function worked... Thanks for all the help


All times are GMT -5. The time now is 11:02 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