When there are no comments When there are no comments
 

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

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