Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
TempPeck  
#1 Posted : Monday, November 4, 2013 2:50:40 AM(UTC)
TempPeck

Rank: Newbie

Groups: Member
Joined: 9/9/2013(UTC)
Posts: 5

Hi All,

I'm sure I'm missing this somewhere but I just cant find it!

When I upload the files (using the demo code) it uploads fine, writes the xml, multiple files, displays them etc.
However when I upload a 2nd time it overwrites the original image files and file.xml.

How do I stop this?

Thanks,

Al
TempPeck  
#2 Posted : Monday, November 4, 2013 9:31:09 AM(UTC)
TempPeck

Rank: Newbie

Groups: Member
Joined: 9/9/2013(UTC)
Posts: 5

Never mind. I found it in gallery_helper.php.

So in the upload.php file change:
initGallery($absGalleryPath, $absThumbnailsPath);
to
initGallery($absGalleryPath, $absThumbnailsPath, FALSE);

Andrew  
#3 Posted : Monday, November 4, 2013 10:11:19 PM(UTC)
Andrew

Rank: Advanced Member

Groups: Member, Administration
Joined: 8/2/2003(UTC)
Posts: 876

Thanks: 2 times
Was thanked: 27 time(s) in 27 post(s)
Yes, you are right. Passing False to initGallery should help.

However please note, that these code examples are just a "quick start". It is supposed that you customize this code according to your needs - use database instead of XML file, use your own folder structure to store files, etc.
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.