Advanced search  

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

Pages: [1]   Go Down

Author Topic: Display Title for Filmstrip thumbnails..  (Read 9658 times)

0 Members and 1 Guest are viewing this topic.

mr.bena

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 117
Display Title for Filmstrip thumbnails..
« on: April 20, 2012, 04:17:23 pm »

Hi, I want the filmstrip thumbnails to display their titles. I such the forum and found that there is a plugin for this in cpg 1.4.x. Is it possible to achieve this in cpg 1.5.x as well? Is it safe to use the same plugin in cpg 1.5.20?
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Display Title for Filmstrip thumbnails..
« Reply #1 on: April 23, 2012, 12:26:12 pm »

Open include/functions.inc.php, find
Code: [Select]
            $pic_title = $lang_common['filename'] . '=' . $row['filename'] . $LINEBREAK .
                $lang_common['filesize'] . '=' . ($row['filesize'] >> 10) . $lang_byte_units[1] . $LINEBREAK .
                $lang_display_thumbnails['dimensions'] . $row['pwidth'] . "x" . $row['pheight'] . $LINEBREAK .
                $lang_display_thumbnails['date_added'] . localised_date($row['ctime'], $lang_date['album']);
and replace with
Code: [Select]
$pic_title = $row['title'] ? $row['title'] : $row['filename'];
The better solution would be to use the plugin hook thumb_strip_html_title.
« Last Edit: April 24, 2012, 09:55:03 am by Αndré »
Logged

mr.bena

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 117
Re: Display Title for Filmstrip thumbnails..
« Reply #2 on: April 23, 2012, 03:24:35 pm »

Solved. Thank you, Andre.
Logged

mr.bena

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 117
Re: Display Title for Filmstrip thumbnails..
« Reply #3 on: April 23, 2012, 07:13:16 pm »

It is solved, Andre. However, it works only when we place the mouse over the thumbnails. Is there a way to display without having to always place the mouse over the thumbnails?
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Display Title for Filmstrip thumbnails..
« Reply #4 on: April 24, 2012, 09:23:23 am »

Open include/functions.inc.php, find
Code: [Select]
$thumb_list[$i]['image']      = '<img src="' . $pic_url . '" class="strip_image" border="0" alt="' . $row['filename'] . '" title="' . $pic_title . '" />';and below, add
Code: [Select]
$thumb_list[$i]['image']     .= '<span class="thumb_title">'.$pic_title.'</span>';
This should work for all initially loaded thumbnails in the film strip, but won't work for all dynamically loaded thumbnails.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Display Title for Filmstrip thumbnails..
« Reply #5 on: April 24, 2012, 09:54:17 am »

To apply the mod to the dynamically loaded thumbnails, open js/displayimage.js, find
Code: [Select]
src="' + data['url'] + '"/></a>and replace with
Code: [Select]
src="' + data['url'] + '"/><span class="thumb_title">' + data['title'] + '</span></a>twice

find
Code: [Select]
src="' + url_cache[nextPosition + $go_next] + '"/></a>and replace with
Code: [Select]
src="' + url_cache[nextPosition + $go_next] + '"/><span class="thumb_title">' + title_cache[nextPosition + $go_next] + '</span></a>twice

find
Code: [Select]
src="'+data['url']+'"/></a>and replace with
Code: [Select]
src="' + data['url'] + '"/><span class="thumb_title">' + data['title'] + '</span></a>twice

find
Code: [Select]
src="'+url_cache[nextPosition-$go_next]+'"/></a>and replace with
Code: [Select]
src="' + url_cache[nextPosition - $go_next] + '"/><span class="thumb_title">' + title_cache[nextPosition - $go_next] + '</span></a>twice.
« Last Edit: April 24, 2012, 07:50:17 pm by Αndré »
Logged

mr.bena

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 117
Re: Display Title for Filmstrip thumbnails..
« Reply #6 on: April 24, 2012, 07:11:22 pm »

It works, Andre.. Thank you so much.
Logged

mr.bena

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 117
Re: Display Title for Filmstrip thumbnails..
« Reply #7 on: April 26, 2012, 03:53:54 am »

Hi, Andre. As you can see from the attached snapshot, the link on the thumbnails which have not been clicked are gray and hard to see. However, the links that have been clicked are highlighted (blue) and very much visible. I want to reverse this, I want the links that have not been click to be highlighted (blue) and the link which have been clicked to be grey instead. Could you please help me further? Am I out of topic?
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Display Title for Filmstrip thumbnails..
« Reply #8 on: April 26, 2012, 08:39:47 am »

Am I out of topic?
I think so. How your links appear is handled in your theme's style.css file.
Logged

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: Re: Display Title for Filmstrip thumbnails..
« Reply #9 on: March 26, 2014, 03:36:25 pm »

Open include/functions.inc.php, find
Code: [Select]
            $pic_title = $lang_common['filename'] . '=' . $row['filename'] . $LINEBREAK .
                $lang_common['filesize'] . '=' . ($row['filesize'] >> 10) . $lang_byte_units[1] . $LINEBREAK .
                $lang_display_thumbnails['dimensions'] . $row['pwidth'] . "x" . $row['pheight'] . $LINEBREAK .
                $lang_display_thumbnails['date_added'] . localised_date($row['ctime'], $lang_date['album']);
and replace with
Code: [Select]
$pic_title = $row['title'] ? $row['title'] : $row['filename'];

Andre forgot to say that $pic_title = ... is found twice in include/functions.inc.php.
Once in function display_thumbnails for thumbnails and once in function display_film_strip for filmstrip thumbnails.

You need to find both $pic_title = ... and replace the second one.

The first one replaces the filename,date etc. with the pic title when you hover over album thumbnails.
Logged

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: Display Title for Filmstrip thumbnails..
« Reply #10 on: March 26, 2014, 04:02:19 pm »

Hi, Andre. As you can see from the attached snapshot, the link on the thumbnails which have not been clicked are gray and hard to see. However, the links that have been clicked are highlighted (blue) and very much visible. I want to reverse this, I want the links that have not been click to be highlighted (blue) and the link which have been clicked to be grey instead. Could you please help me further? Am I out of topic?


Add this css rule to style.css (your css file may have a diffrent name) to change the color for the filmstrip thumb title(I used the curve theme and the tumb cell has class .thumb):

Code: [Select]
.thumb a:link{
        color: #FFFFFF;
}
.thumb a:visited{
        color: #009;
}
.thumb a:focus{
        color: #444;
}
.thumb a:hover{
        color: #5A7E9F;text-decoration:none;
}
.thumb a:active{
        color: #FFCC01;
}

 
Logged

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: Display Title for Filmstrip thumbnails..
« Reply #11 on: March 26, 2014, 04:07:14 pm »

style the filmstrip current thumbnail (active thumbnail) :

http://forum.coppermine-gallery.net/index.php/topic,77353.0.html
« Last Edit: March 26, 2014, 04:12:35 pm by allvip »
Logged
Pages: [1]   Go Up
 

Page created in 0.024 seconds with 19 queries.