get rid of "votes: YES" and "comments: 1" under album thumb in lastalb section get rid of "votes: YES" and "comments: 1" under album thumb in lastalb section
 

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

get rid of "votes: YES" and "comments: 1" under album thumb in lastalb section

Started by jerx, March 29, 2007, 09:51:59 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jerx

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.


jerx

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

Stramm

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
        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

//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