Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: filmstrip...  (Read 3649 times)

0 Members and 1 Guest are viewing this topic.

scottcrew

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Female
  • Posts: 29
  • God Bless!
    • Scottcrew Web Services
filmstrip...
« on: October 20, 2007, 10:23:22 pm »

I would like to find out how to display the caption instead of the file name in the filmstrip.
« Last Edit: October 23, 2007, 02:52:02 pm by Sami »
Logged

scottcrew

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Female
  • Posts: 29
  • God Bless!
    • Scottcrew Web Services
Re: filmstrip...
« Reply #1 on: October 22, 2007, 11:49:49 pm »

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!!
Logged

Nibbler

  • Guest
Re: filmstrip...
« Reply #2 on: October 23, 2007, 12:41:31 am »

Code is include/functions.inc.php

Code: [Select]
$thumb_list[$i]['caption'] = $CONFIG['display_film_strip_filename'] ? '<span class="thumb_filename">'.$row['filename'].'</span>' : '';
Try changing the $row['filename'] to $row['title']
Logged

scottcrew

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Female
  • Posts: 29
  • God Bless!
    • Scottcrew Web Services
Re: filmstrip...
« Reply #3 on: October 23, 2007, 01:01:46 am »

Can that be placed in the theme.php file?
Logged

Nibbler

  • Guest
Re: filmstrip...
« Reply #4 on: October 23, 2007, 01:09:03 am »

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

scottcrew

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Female
  • Posts: 29
  • God Bless!
    • Scottcrew Web Services
Re: filmstrip...
« Reply #5 on: October 23, 2007, 01:17:41 am »

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!
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: filmstrip...
« Reply #6 on: October 23, 2007, 10:11:56 am »

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
Code: [Select]
foreach($thumb_list as $thumb) and put this line just before it
Code: [Select]
    $pic_data = get_pic_data($aid, $nbThumb, $album_name);

and then put this just after it
Code: [Select]
$thumb['caption'] = $pic_data[$thumb['pos']]['title'];

So your function should be look like this after changes

Code: [Select]
.
.
.
    $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
« Last Edit: October 23, 2007, 02:36:16 pm by Sami »
Logged
‍I don't answer to PM with support question
Please post your issue to related board

scottcrew

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Female
  • Posts: 29
  • God Bless!
    • Scottcrew Web Services
Re: filmstrip...
« Reply #7 on: October 23, 2007, 02:00:34 pm »

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.
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: filmstrip...
« Reply #8 on: October 23, 2007, 02:36:41 pm »

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
Logged
‍I don't answer to PM with support question
Please post your issue to related board

scottcrew

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Female
  • Posts: 29
  • God Bless!
    • Scottcrew Web Services
Re: filmstrip...
« Reply #9 on: October 23, 2007, 02:49:46 pm »

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

Thank-you!!
Logged
Pages: [1]   Go Up
 

Page created in 0.033 seconds with 16 queries.