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: get rid of "votes: YES" and "comments: 1" under album thumb in lastalb section  (Read 4879 times)

0 Members and 1 Guest are viewing this topic.

jerx

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 85

If you are using the lastalb (last updated albums) feature and set cpg to display amount of votes and amount of comments in thumbnail view, the album thumb displays these information, too. It displays "votes: YES" and the number of comments the picture has (eg "comments: 1").

I want to get rid of these lines, because my users are aware that they are able to vote on all of my albums and displaying the number of comments is misleading. People might think the number represents the amount of votes for the whole gallery.

I already tried to edit functions.inc.php (line 878/883), but when I delete the lines, this information is not displayed on the thumbnail view, too. Does anybody know how I can delete the lines in the lastalb section only?

And where is the word YES (votes: YES) defined? It is not translated into my language.
« Last Edit: April 01, 2007, 07:14:47 am by Stramm »
Logged

Nibbler

  • Guest

This is a modpack issue, surely.
Logged

jerx

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 85

You might be right. I have Stramm' s Modpack installed. Can someone please move this to the modpack forum?
Logged

Stramm

  • Moderator
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt

include/functions.inc.php

you have to edit the function build_caption
you want to show the number of votes and comments on thumbnail pages but not on the index -> we check if we're on the index

replace
Code: [Select]
        if ($CONFIG['display_comment_count']) {
            $comments_nr = count_pic_comments($row['pid']);
            if ($comments_nr > 0) {
                //$$cap .= "<span class=\"thumb_num_comments\">".sprintf($lang_get_pic_data['n_comments'], $comments_nr )."</span>";
                $$cap .= "<span class=\"thumb_num_comments\">".sprintf($lang_get_pic_data['n_comments'], $comments_nr )."</span>";
            }
        }
//pic voting
        if ($CONFIG['display_pic_voting'] && $rowset[$key]['votes']){
                $$cap .= '<span class="thumb_num_comments">'.sprintf($lang_get_pic_data['n_votes_main'], $rowset[$key]['votes'] ).'</span>';
        }

with

Code: [Select]
//comments nr
        if ($CONFIG['display_comment_count'] && $_SERVER['PHP_SELF'] != 'index.php') {
            $comments_nr = count_pic_comments($row['pid']);
            if ($comments_nr > 0) {
                //$$cap .= "<span class=\"thumb_num_comments\">".sprintf($lang_get_pic_data['n_comments'], $comments_nr )."</span>";
                $$cap .= "<span class=\"thumb_num_comments\">".sprintf($lang_get_pic_data['n_comments'], $comments_nr )."</span>";
            }
        }
//pic voting
        if ($CONFIG['display_pic_voting'] && $rowset[$key]['votes'] && $_SERVER['PHP_SELF'] != 'index.php'){
                $$cap .= '<span class="thumb_num_comments">'.sprintf($lang_get_pic_data['n_votes_main'], $rowset[$key]['votes'] ).'</span>';
        }

this will not go into the modpack but I'll fix there the YES:NO issue

jerx

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 85

Works like a charm. Thanks a lot for the fix, Stramm!!!
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 20 queries.