forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 themes (visuals) => Topic started by: mr.bena on April 20, 2012, 04:17:23 pm

Title: Display Title for Filmstrip thumbnails..
Post by: mr.bena 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 (http://"http://forum.coppermine-gallery.net/index.php?topic=25076.0") 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?
Title: Re: Display Title for Filmstrip thumbnails..
Post by: Αndré 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.
Title: Re: Display Title for Filmstrip thumbnails..
Post by: mr.bena on April 23, 2012, 03:24:35 pm
Solved. Thank you, Andre.
Title: Re: Display Title for Filmstrip thumbnails..
Post by: mr.bena 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?
Title: Re: Display Title for Filmstrip thumbnails..
Post by: Αndré 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.
Title: Re: Display Title for Filmstrip thumbnails..
Post by: Αndré 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.
Title: Re: Display Title for Filmstrip thumbnails..
Post by: mr.bena on April 24, 2012, 07:11:22 pm
It works, Andre.. Thank you so much.
Title: Re: Display Title for Filmstrip thumbnails..
Post by: mr.bena 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?
Title: Re: Display Title for Filmstrip thumbnails..
Post by: Αndré 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.
Title: Re: Re: Display Title for Filmstrip thumbnails..
Post by: allvip 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.
Title: Re: Display Title for Filmstrip thumbnails..
Post by: allvip 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;
}

 
Title: Re: Display Title for Filmstrip thumbnails..
Post by: allvip 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 (http://forum.coppermine-gallery.net/index.php/topic,77353.0.html)