Thumbnail rollover info..? Simple change..help! Thumbnail rollover info..? Simple change..help!
 

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]

Main Menu

Thumbnail rollover info..? Simple change..help!

Started by jjkatrina, June 05, 2005, 07:23:52 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jjkatrina

As requested I have look over forum and found this post:

http://forum.coppermine-gallery.net/index.php?topic=186.0

they tell the info about where in functions.php to change..but I am wanting to make it simpler and don't know how. All I want to do is have for all thumbnail on site when you roll over to simply say the Title of the image, not the filename, dimensions, when added, etc. How would I edit code to just make it say the title?

I am think you would edit this section:

$pic_title =$lang_display_thumbnails['filename'].$row['filename']."\n".
                                $lang_display_thumbnails['filesize'].($row['filesize'] >> 10).$lang_byte_units[1]."\n".
                                $lang_display_thumbnails['dimensions'].$row['pwidth']."x".$row['pheight']."\n".
                                $lang_display_thumbnails['date_added'].localised_date($row['ctime'], $album_date_fmt);

But admit I don't know much of php  :\'(

And it looked that there were two sections just like this so what may I do? Any help I thank you!!! (you have been very kind before in helping..thanks!  :-* )

jjkatrina


Nibbler


jjkatrina

thank you for the help nibbler! I just replaced the 2 instances of : (in functions.inc.php)

$pic_title =$lang_display_thumbnails['filename'].$row['filename']."\n".
                                $lang_display_thumbnails['filesize'].($row['filesize'] >> 10).$lang_byte_units[1]."\n".
                                $lang_display_thumbnails['dimensions'].$row['pwidth']."x".$row['pheight']."\n".
                                $lang_display_thumbnails['date_added'].localised_date($row['ctime'], $album_date_fmt);


with simply:

$pic_title = $row['title'];

and works fine on the main page for "Recent Uploaded" area when I moused over, but I have 2 other sections on my main page "Most Viewed" and "Random" and when I now moused over them - it shows nothing??! Why is this? (neither just title or old info) Is there more code I needed to edit differently?

Nibbler

You may need to edit the db query to pull the title from the database, it's not requested for all meta album types. I'll post how to do this when I return tomorrow (unless someone else wishes to do so before then).

jjkatrina

ok thank you! I will be checking up to see !  :D

Nibbler

include/functions.inc.php

look for

case 'random':

and then look below that for

if($select_columns != '*') $select_columns .= ', aid';

now, add in title to that list

if($select_columns != '*') $select_columns .= ', aid, title ';

do a similar thing for meta albums that don't show the title by default.

jjkatrina

 :D

You are MOST helpfull..thank you. It fixed it and I updated for 'random' and 'topn' ..thank you again!!  :-*  :-*  :-*