Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum

Get help for TinyWebGallery, the best image gallery. The forum is also home for the Joomla JFUploader, TWG Flash Uploader and the Wordpress flash uploader.
It is currently 29. Mar 2024, 14:10

This forum is readonly now. Please use the new forum if you don't find the answer to your question here. The new forum is at https://www.tinywebgallery.com/blog/forum/


All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: 31. Mar 2013, 20:05 
Offline

Joined: 26. Jan 2013, 06:16
Posts: 16
Nice message: "If you copy/move/rename a folder with pictures the xml files in the xml folder are not copied or renamed. You have to do this manually!"
From readne:
So what needs to be done to the xml files?

From readme: "version 1.0 rename copy of xml files if folders are renamed/moved"

Have you already worked on this, as I'm willing to do some programming there.

George

[edit: replaced rant by readme]


Top
 Profile  
 
PostPosted: 31. Mar 2013, 22:09 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
Hi,

I don't have done anything here.

If you copy/move/rename a folder in the TWGExplorer or in the Flash Uploader the xml files has to be renamed.

But you already have the option
1. to have the xml files in the folder
2. set $autocreate_folder_id=true; // (true/false) Since 1.7.7 you can use a folder.id file which is the prefix for all xml files - You can now create this file automatically with the current directory in it. This enables you to move folders without loosing any xml data like comments or tags.

So you actually only have to set $autocreate_folder_id=true; and if php is allowed to create the folder.id then everything is fine.

This is why I naver implemeneted a real rename because the folder.id solution works really good ;). So actually it is time to update the howto...

Best, Michael


Top
 Profile  
 
PostPosted: 31. Mar 2013, 23:32 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
But there is still no solution if you copy a folder. Even when you set $autocreate_folder_id=true;
there you have to do stuff manually!
But who copies folders...? ;).

Best, Michael


Top
 Profile  
 
PostPosted: 1. Apr 2013, 18:19 
Offline

Joined: 26. Jan 2013, 06:16
Posts: 16
> But who copies folders...?

I wrote once a gallery withc copy function.
It was done using linux hardlinks, but today one rather uses tags to do classifications.

I was using $store_xml_in_picfolders=true
but it didn't do what I expected (i.e. all xml is still in the xml folder)

About $autocreate_folder_id=true I did not understand how that works so never tried. I will check if it's doing what I need.


Top
 Profile  
 
PostPosted: 1. Apr 2013, 18:29 
Offline

Joined: 26. Jan 2013, 06:16
Posts: 16
so I moved the folder using folder.id
So far worked fine.
The thumbnails do not use folder.id (yet?) so were regenerated.
That's just a mmv to do, but still better include it into the file manager.


Top
 Profile  
 
PostPosted: 1. Apr 2013, 18:37 
Offline

Joined: 26. Jan 2013, 06:16
Posts: 16
also the creation of the folder.id file changed the date of all my folders to today.
So now everthing is shown as "new".

I suggest to create a special file in each directory which is only touched when a new picture is added.
That's faster than to list every time in each folder all pictures to find the most recent one.
Any other modifications in the directory should not change the NEW flags.
Also, if the timestamp is changed, do it also on the parent folders so that a NEW tag is displayed even if a picture is added some levels deep.


Top
 Profile  
 
PostPosted: 2. Apr 2013, 09:47 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
Hi,

the "New" flag is not triggered by the folder.id file but by the change of the date of the folder. And this is done if a change in the folder happens. So there is no scan every time for new files.

Thumbnails have of course to be generated because the copied folder could have different settings.

$store_xml_in_picfolders=true; should store the xml files in the pictures folder. I don't know why this should not work for you. The should even be a migration.

Best, Michael


Top
 Profile  
 
PostPosted: 3. Apr 2013, 00:25 
Offline

Joined: 26. Jan 2013, 06:16
Posts: 16
I still think not using the directory timestamp for the NEW flags would be a goog idea.
Why? Well I did a little gallery script 10 years ago... and it's sorting was based on timestamps of dedicated files in each folder instead of the folder itself. so copying, moving or creating files (e.g. folder.txt in my case) won't affect sorting.


Top
 Profile  
 
PostPosted: 3. Apr 2013, 09:36 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
But TWG does also work if you upload files by FTP. So if you add new files this way only the directory time gets updated or you scan the whole directory each time.
You could of course extend this functionality by checking the folder only if the directory time changes. So this would be a 2nd step.

Best, Michael


Top
 Profile  
 
PostPosted: 3. Apr 2013, 18:53 
Offline

Joined: 26. Jan 2013, 06:16
Posts: 16
ha, yeah. The ftp upload. I just never implemented that possibility to not have the issue.
Maybe like this: directory stamp is newer than lastfile.stamp? then scan directory and set same stamp on lastfile.stamp and on the directory.
that should work. Even no need to update lastfile.stamp on every upload.


Top
 Profile  
 
PostPosted: 3. Apr 2013, 21:01 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
As i have written. A 2 step solution would work. I have now folder.id as default file which is created to identify a folder even when it is renamed.

Best, Michael


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
powered by phpbb | Datenschutz/ Privacy policy