Topic: Automatically add filename to captions?

One of the features I used to love about using the Photoshop plug-in was that it automatically added the image filename into the caption...  is there anyway to get this functionality when creating a gallery with svManager?

I know adding {file} to each caption in the Images page of each gallery adds it... but is there a template file I can edit to always make it *automatically* do that?  I really never need any caption other than the filename...

Thanks for your help and ideas!

Last edited by mrjustin (2010-06-07 09:26:27)

Re: Automatically add filename to captions?

SvManager stores the captions internally in an image object so I think you'd need to hack the php code that creates the image object. You'd need to be fairly confident with php to do that.

I can't think of an easier way.

jack

Jack Hardie
SimpleViewer Support Team.

Re: Automatically add filename to captions?

Sounds good... so where the PHP gurus at??  smile

Re: Automatically add filename to captions?

Anybody have any ideas?

Thinking about this again and it really seems like it doesn't need to be that complicated -- there's got to be a way to edit a php template file to automatically add "{file}" into the caption field of each added image... no?

Re: Automatically add filename to captions?

Yes, I don't think it's the nicest approach but may be the simplest and it would probably work. You'd need to find the file in the plugins directory for your type of gallery that creates the images page and edit that. For instance /plugins/simpleviewer2/sv2imagespage.php for a SimpleViewer 2 gallery.

General advice on code hacks:

  • Don't try it on a live site, create a separate test installation of svManager

  • Document your changes, you will forget them very quickly

  • Don't do so much hackery that it puts you off installing the free updates of svManager that come out from time to time

We can't offer any detailed 'official' support for code changes but no objection if anyone else wants to discuss it on the forums.

jack

Jack Hardie
SimpleViewer Support Team.