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
-
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.
-
This is a modpack issue, surely.
-
You might be right. I have Stramm' s Modpack installed. Can someone please move this to the modpack forum?
-
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
-
Works like a charm. Thanks a lot for the fix, Stramm!!!