Add line in TITLE tag on Thumbnails Add line in TITLE tag on Thumbnails
 

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

Add line in TITLE tag on Thumbnails

Started by Pascal YAP, November 26, 2004, 09:54:45 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Pascal YAP

Bonjour,
Look my screen-shot to understand my question ;-)
How to add an other line in the yellow window (here is 'TITLE' html tag, not 'alt' tag)

  I want to add the number of hits in this title, on all thumbnails. Is it possible ?
Like that in english - this pictures viewed 12548 times.
(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fforum.pays-dignois.com%2Fuploads%2Ftag_viewedxxxtime.jpg&hash=cf1bdd23091206ca42f95abde62d9c0c116889a6)

Many thanx by advance
Pascal

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fexpo.pays-dignois.com%2Falink_expo.php&hash=d6943ae54b2b38807403b59fc7d75c53818f08e7)

Nibbler

#1
include/functions.inc.php:

change the caption to include the new info:


                        $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);


becomes


                        $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) . "\n" .
sprintf($lang_get_pic_data['n_views'], $row['hits']);


and then add $lang_get_pic_data into the function scope:

global $album_date_fmt, $lang_display_thumbnails, $lang_errors, $lang_byte_units;

becomes:

global $album_date_fmt, $lang_display_thumbnails, $lang_errors, $lang_byte_units, $lang_get_pic_data;

and then add hits into the data we collect from the db:

select_columns = 'pid, filepath, filename, url_prefix, filesize, pwidth, pheight, ctime, aid';

becomes

select_columns = 'pid, filepath, filename, url_prefix, filesize, pwidth, pheight, ctime, aid, hits';


That's the best match there is for the language string, if you only want a specific language then you can hardcode it.

Pascal YAP

#2
Ah Ah ah :-))

Merci a lot Nibbler ...
Try this add in this minute :-)))

some minutes after :-)

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fforum.pays-dignois.com%2Fuploads%2Ftag_viewedxxxtime2.jpg&hash=2319a8c462dfde62b83b1436b1e34ae1380d648f)
Your help work fine, but there's no Return before Vu 4 fois ! Why ? What's wrong ?
Thanx
Pascal

goingon

What if you just want it removed for one of your gallerys and let others still display it?