turn off counter ? turn off counter ?
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

turn off counter ?

Started by drgonzo120, November 06, 2003, 04:15:05 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

drgonzo120

hello


is it possible to turn off the counter?

i checked all options, but nowhere i have seen aa counter check box or something like that ...


http://www.psygarden.be/coppermine/thumbnails.php?album=47

i don't want it to look like a championship ... ;) for most clicks


thanks (i also checked the database but nowhere i could find a click field in the album records )


thanks

Joachim Müller

you'll have to manually edit the file displayimage.php (if I remember it right) - I don't have the source code here at this pc I'm writing on.

If you don't find it, please re-post (as a *bump* for me).

GauGau

drgonzo120


Joachim Müller

edit include/functions.inc.php and look for$caption = ($rowset[$key]['title']||$rowset[$key]['hits']) ? "<span class=\"thumb_title\">".$rowset[$key]['title'].(($rowset[$key]['title'])?"-":"").sprintf($lang_get_pic_data['n_views'], $rowset[$key]['hits'])."</span>" : '';
Replace it with$caption = ($rowset[$key]['title']||$rowset[$key]['hits']) ? "<span class=\"thumb_title\">".$rowset[$key]['title'].(($rowset[$key]['title'])?"":"")."</span>" : '';
GauGau

Joachim Müller

btw: added this to be an admin settable option (in coppermine config) inside the dev branch of the cvs (in other words: will be in the next version).

GauGau

drgonzo120

thanks for the quick reply  :o

user0815

can i disable the counter for all user, but only the administrators can see the views (counter).
is this possible?

thanks.

Joachim Müller

not tested, but should be something like$caption = ($rowset[$key]['title']||$rowset[$key]['hits']) ? "<span class=\"thumb_title\">".$rowset[$key]['title'].(($rowset[$key]['title'])?"-":"");
if (GALLERY_ADMIN_MODE) { $caption .=sprintf($lang_get_pic_data['n_views'], $rowset[$key]['hits']); }
$caption .= "</span>" : '';

GauGau

user0815

sorry, that code was wrong. i became a error.

now, i use this code (for other users information):


if (GALLERY_ADMIN_MODE)
{
 $caption = ($rowset[$key]['title']||$rowset[$key]['hits']) ? "<span class=\"thumb_title\">".$rowset[$key]['title'].(($rowset[$key]['title'])?"-":"").sprintf($lang_get_pic_data['n_views'], $rowset[$key]['hits'])."</span>" : '';
}
 else
{
 $caption = ($rowset[$key]['title']||$rowset[$key]['hits']) ? "<span class=\"thumb_title\">".$rowset[$key]['title'].(($rowset[$key]['title'])?"":"")."</span>" : '';
}


it's the easy combination from the original code and the modified code (from the posting on top) :wink: