coppermine-gallery.com/forum

Support => Older/other versions => cpg1.3.x Support => Topic started by: jjkatrina on June 05, 2005, 07:23:52 AM

Title: Thumbnail rollover info..? Simple change..help!
Post by: jjkatrina on June 05, 2005, 07:23:52 AM
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!  :-* )
Title: Re: Thumbnail rollover info..? Simple change..help!
Post by: jjkatrina on June 05, 2005, 04:11:45 PM
 ??? i am still need of help!
Title: Re: Thumbnail rollover info..? Simple change..help!
Post by: Nibbler on June 05, 2005, 04:14:11 PM
Did you try

$pic_title = $row['title'];

?
Title: Re: Thumbnail rollover info..? Simple change..help!
Post by: jjkatrina on June 05, 2005, 04:59:18 PM
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?
Title: Re: Thumbnail rollover info..? Simple change..help!
Post by: Nibbler on June 05, 2005, 05:02:13 PM
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).
Title: Re: Thumbnail rollover info..? Simple change..help!
Post by: jjkatrina on June 06, 2005, 02:58:47 AM
ok thank you! I will be checking up to see !  :D
Title: Re: Thumbnail rollover info..? Simple change..help!
Post by: Nibbler on June 06, 2005, 08:15:28 PM
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.
Title: Re: Thumbnail rollover info..? Simple change..help!
Post by: jjkatrina on June 06, 2005, 08:52:11 PM
 :D

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