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
-
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?
-
Open include/functions.inc.php, find
$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
$pic_title = $row['title'] ? $row['title'] : $row['filename'];
The better solution would be to use the plugin hook thumb_strip_html_title.
-
Solved. Thank you, Andre.
-
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?
-
Open include/functions.inc.php, find
$thumb_list[$i]['image'] = '<img src="' . $pic_url . '" class="strip_image" border="0" alt="' . $row['filename'] . '" title="' . $pic_title . '" />';
and below, add
$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.
-
To apply the mod to the dynamically loaded thumbnails, open js/displayimage.js, find
src="' + data['url'] + '"/></a>
and replace with
src="' + data['url'] + '"/><span class="thumb_title">' + data['title'] + '</span></a>
twice
find
src="' + url_cache[nextPosition + $go_next] + '"/></a>
and replace with
src="' + url_cache[nextPosition + $go_next] + '"/><span class="thumb_title">' + title_cache[nextPosition + $go_next] + '</span></a>
twice
find
src="'+data['url']+'"/></a>
and replace with
src="' + data['url'] + '"/><span class="thumb_title">' + data['title'] + '</span></a>
twice
find
src="'+url_cache[nextPosition-$go_next]+'"/></a>
and replace with
src="' + url_cache[nextPosition - $go_next] + '"/><span class="thumb_title">' + title_cache[nextPosition - $go_next] + '</span></a>
twice.
-
It works, Andre.. Thank you so much.
-
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?
-
Am I out of topic?
I think so. How your links appear is handled in your theme's style.css file.
-
Open include/functions.inc.php, find
$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
$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.
-
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):
.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;
}
-
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)