Advanced search  

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

Pages: [1]   Go Down

Author Topic: A config entry for the hits of a picture  (Read 5854 times)

0 Members and 1 Guest are viewing this topic.

chtito

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 186
  • I run Mac OS X, despite the penguin ;)
A config entry for the hits of a picture
« on: January 04, 2004, 05:48:45 pm »

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!
Logged
Vous pouvez poser vos questions en français sur le forum francophone !

chtito

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 186
  • I run Mac OS X, despite the penguin ;)
A config entry for the hits of a picture
« Reply #1 on: January 04, 2004, 09:01:59 pm »

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)

Code: [Select]

<                         $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!
Logged
Vous pouvez poser vos questions en français sur le forum francophone !
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 20 queries.