PDA

View Full Version : Copy Folder with Titles/Descriptions for PP 1.5


jharlap
01-02-2006, 09:05 PM
I've added some fairly simple functionality to the copy_folder.php addon distributed with PP1.5BETA1 so that it can read titles and descriptions from a textfile included with the directory of images. As the change is so simple (and I secretly hope that it'll make it into PP1.5 instead of the one in BETA1) I didn't change the namespace of the functions, so it's not compatible with the original copy_folder.php - so move the old one out of the way if you want to use it. If you don't include a titles.txt file in your upload directory, the behaviour is identical to the original file, so this shouldn't be a problem.

The format of the title listing file is newline separated records containing comma separated, double-quote encapsulated fields. The field order is filename, title, description. It's very easy to make this kind of file in a text editor or (possibly even easier) in a spreadsheet package (OpenOffice, gnumeric, Excel, etc).

Hope it saves someone some time - I know it did for me ;)
Suggestions/comments are welcome, of course...

Cheers,
Jon

raminia
01-02-2006, 09:30 PM
Link
http://www.pixelpost.org/v1/index.php?x=downloads&details=143

a2xm
08-28-2006, 07:26 AM
Hi,

I got these error while trying to use it:

Warning: opendir(../photoblog/images/New/): failed to open dir: No such file or directory in /home/a2xmcom/domains/a2xm.com/public_html/photoblog/addons/copy_folder.php on line 63

Warning: asort() expects parameter 1 to be array, null given in /home/a2xmcom/domains/a2xm.com/public_html/photoblog/addons/copy_folder.php on line 232

Warning: reset(): Passed variable is not an array or object in /home/a2xmcom/domains/a2xm.com/public_html/photoblog/addons/copy_folder.php on line 233

Warning: Variable passed to each() is not an array or object in /home/a2xmcom/domains/a2xm.com/public_html/photoblog/addons/copy_folder.php on line 234

and no images are copy to the database. I've the images in a subfolder inside image folder. Any helps would be thanksfull...

cheers,
a2xm

GeoS
08-30-2006, 12:06 AM
Try to use absolute paths like /home/account_name/dir_with_images