forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 modpack by Stramm => Topic started by: jerx on March 29, 2007, 09:51:59 pm

Title: get rid of "votes: YES" and "comments: 1" under album thumb in lastalb section
Post by: jerx on March 29, 2007, 09:51:59 pm
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.
Title: Re: get rid of "votes: YES" and "comments: 1" under album thumb in lastalb section
Post by: Nibbler on March 30, 2007, 01:44:41 am
This is a modpack issue, surely.
Title: Re: get rid of "votes: YES" and "comments: 1" under album thumb in lastalb section
Post by: jerx on March 30, 2007, 01:51:28 am
You might be right. I have Stramm' s Modpack installed. Can someone please move this to the modpack forum?
Title: Re: get rid of "votes: YES" and "comments: 1" under album thumb in lastalb secti
Post by: Stramm on March 31, 2007, 08:12:30 am
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
Title: Re: get rid of "votes: YES" and "comments: 1" under album thumb in lastalb section
Post by: jerx on April 01, 2007, 05:43:15 am
Works like a charm. Thanks a lot for the fix, Stramm!!!