A config entry for the hits of a picture A config entry for the hits of a picture
 

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

A config entry for the hits of a picture

Started by chtito, January 04, 2004, 05:48:45 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

chtito

It is probably a fairly easy job to do that: add an entry in the config page to specify whether to show or not the number of hits ("n views") in the thumbnail views.

I'd like to have the number of comments but not the number of hits.

thanks!
Vous pouvez poser vos questions en français sur le forum francophone !

chtito

In fact it was so easy that i did it myself. Here is the code to modify in the file: include/functions.inc.php

(i put it in a diff format; the left code is the original, the right is the new code)


<                         $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>" : '';
---
>                         $caption = ($rowset[$key]['title']||$rowset[$key]['hits']) ? "<span class=\"thumb_title\">".$rowset[$key]['title'].(($rowset[$key]['title']&&$set_hit_caption)?"-":"").($set_hit_caption ? sprintf($lang_get_pic_data['n_views'], $rowset[$key]['hits']) : '')."</span>" : '';


The variable $set_hit_caption is the one that should be defined on the config page.

Hope this helps!
Vous pouvez poser vos questions en français sur le forum francophone !