When there are no comments When there are no comments
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

When there are no comments

Started by Mannie_, February 08, 2010, 11:02:40 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Mannie_

Didn't know how to call the topic but i guess it describes my question.
I wanted to know how to make it so that when there are no comments it will say something like comments: 0 instead of just leaving that field blank when there are no comments.

Hope there is an easy way to do this

Thanks in advance
Mannie

Mannie_

I have figured it out
i changed this
//comments nr
        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>";
            }
        }


To this

//comments nr
        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>";
            }
        }


Might be handy if anyone else wanted to know this