coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: matmike on October 09, 2007, 09:12:48 PM

Title: Change picture titles
Post by: matmike on October 09, 2007, 09:12:48 PM
Hello,

I'm currently trying to change the titles of my pictures.
All pictures are named yyyy_mm_dd_hh_mm_ss - rest of title.jpg. Using the admin-tools, I can only change the title to something related to the date (e.g. change 2003_11_23_13_20_20.jpg -> 11/23/2003 13:20). What I want to do is change it to date/time/title (e.g. change 2003_11_23_13_20_20 - Rest of title.jpg -> 11/23/2003 13:20 - Rest of title).
Is there any chance to realize this in a simple way?

Thank you,
MatMike
Title: Re: Change picture titles
Post by: Joachim Müller on October 10, 2007, 06:34:11 AM
Slashes can definitely not go into a file name. I suggest renaming the files on your client before uploading them.
Title: Re: Change picture titles
Post by: matmike on October 14, 2007, 07:05:30 PM
Thank you for your reply, but I think you misunderstood my request.
The filename has the form "yyyy_mm_dd_hh_mm_ss - rest of title.jpg" (e.g. 2007_10_14_13_20_15 - Munich.jpg) ans I use the admin-tools to create a picture title from that filename. After that, the picture title would be 14/10/2007 13:20. What I would like to get after using the tool is a picture title like "14/10/2007 13:20 - Munich".
Is there any chance to do this using the admin tools or by changing any part of the coppermine files? I think the titles are generated using any regular expression to derive the information used to create the picture title in coppermine database.

Thank you,
MatMike
Title: Re: Change picture titles
Post by: Nibbler on October 14, 2007, 09:38:17 PM
Add your own regex into util,php. I think there is even a comment there at the appropriate place.
Title: Re: Change picture titles
Post by: matmike on October 19, 2007, 12:16:22 PM
I'll try to get it done - normally I'm just doing some PERL-programming :-)
Thank you for your reply!