filmstrip... filmstrip...
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

filmstrip...

Started by scottcrew, October 20, 2007, 10:23:22 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

scottcrew

I would like to find out how to display the caption instead of the file name in the filmstrip.

scottcrew

I have searched the forums bit have not found an answer to this...
Maybe I'm using the wrong search words, I don' know, but I can't find it...
So would you please give me a tip as to where I need to edit so that,
in the filmstrip, the image's "Title" is shown instead of the filename?

TIA!!

Nibbler

Code is include/functions.inc.php

$thumb_list[$i]['caption'] = $CONFIG['display_film_strip_filename'] ? '<span class="thumb_filename">'.$row['filename'].'</span>' : '';

Try changing the $row['filename'] to $row['title']

scottcrew

Can that be placed in the theme.php file?

Nibbler

No, but there's probably a way to do it via the theme system somehow.

scottcrew

Nibbler,
Your suggestion worked, thanks!
It would really be nice to be able to handle it through the themes system.
Does anyone have an idea as to how to do it through the themes?

TIA!

Sami

#6
There is a trick you can try ;)

copy theme_display_film_strip function from themes\sample\theme.php to themes\yourtheme\theme.php if don't have it already

now edit this function
find foreach statement foreach($thumb_list as $thumb) and put this line just before it

    $pic_data = get_pic_data($aid, $nbThumb, $album_name);


and then put this just after it

$thumb['caption'] = $pic_data[$thumb['pos']]['title'];


So your function should be look like this after changes


.
.
.
    $pic_data = get_pic_data($aid, $nbThumb, $album_name);
    foreach($thumb_list as $thumb) {
         $thumb['caption'] = $pic_data[$thumb['pos']]['title'];
.
.
.


It's done !

hope it works for you
‍I don't answer to PM with support question
Please post your issue to related board

scottcrew

Sami,
That still showed the image file name and not the title of the image.
I don't want visitors to e able to see the file name.

Sami

Oops sorry that was my miss understanding !


Check my previous post , I don't have test bed with me so please confirm if it's working
‍I don't answer to PM with support question
Please post your issue to related board

scottcrew

Sami,
Yes, it does work... Yeah!
And it is confined to the theme.php file!!

Thank-you!!