Closed (fixed)
Project:
Slideshow Creator
Version:
7.x-1.4
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
23 Feb 2012 at 04:33 UTC
Updated:
9 Apr 2012 at 11:28 UTC
G'day there, thanks for a great module! I'm a bit of a Drupal newbie, so forgive me if this is an obvious question.
I see a title option when specifying individual images, but not for directories.
Is it possible to set a flag so that the image file name gets used as its title? Minus the extension, of course.
It sure would be helpful.
Here's hoping :)
Comments
Comment #1
rhouse commentedGood idea.
Let me have a think about it and get back to you.
Comment #2
rhouse commentedOK, some thoughts...
The problem is that with a DIR option, the title, description, and target specified can be given only once and they apply to every image. Since there are three things that might be required on a file by file basis, the filename idea seems a bit limited. Also it would mean you could only have the titles you want if they happen to be in alphabetical order! What if we looked for a file with the same name as the image, but extension .txt? Or some extension unique to slideshow creator? Then the file could contain lines like:
...where one leaves out anything that should default to the overall value given in the slideshow spec. One could then add or remove image + description files as a pair and get full flexibility without changing the slideshow code.
What do you think of this?
Comment #3
workel commentedYes, I like that idea! An ssc file could house metadata for each image. Great!
It could also be extensible if you ever wanted to add more metadata. You never know ...
It sounds like a relatively straightforward solution, which always helps :)
Comment #4
rhouse commentedThis is now implemented in 6.x-1.42 and 7.x-1.6. Here are the relevant details from the new README.txt:
All images in a directory:
You can create a normal slideshow, but you can scan for more images using
dir=|DIR_IMAGE|RECURSIVE|LINK|TITLE|CAPTION|TARGET|where:
DIR_IMAGE [required]: the directory that you want to scan for images. The folder base is the default site files folder, generally "sites/default/files".
RECURSIVE [optional]: "yes" if you want to scan recursively or leave it blank
LINK [optional]: "yes" if you want link all images to their own path, or leave it blank, or provide a URL that all images will link to.
TITLE, CAPTION and LINK are applied to all images, but starting with versions 7.x-1.5 and D6.x-1.41, these can be overridden.
Overriding TITLE, CAPTION and LINK for particular images:
When using "dir", you have to specify one TITLE, CAPTION and LINK in the slideshow code and it applies to every image found in the directory. To override, include in the same directory a control file with the same name as the image file, but with the image extension replaced by ".sscctl". For example, the image "fred.jpg" should be accompanied by a control file called "fred.sscctl". In this control file, include any or all of these lines in any order:
The "Link:" line may also be:
Link: yesmeaning to link back to this image itself.
Unrecognised and empty lines in the ".sscctl" file are silently ignored.
Comment #5
workel commentedLooks great, many thanks!
Comment #6
rhouse commentedGlad it works for you!
Comment #7
0000sir commentedI made a shell script to create .sscctl file from image file name, see http://drupal.org/node/1524232