Advanced search  

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]

Pages: [1]   Go Down

Author Topic: When there are no comments  (Read 2394 times)

0 Members and 1 Guest are viewing this topic.

Mannie_

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 51
When there are no comments
« on: February 08, 2010, 11:02:40 am »

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
Logged

Mannie_

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 51
Re: When there are no comments
« Reply #1 on: February 08, 2010, 11:55:58 am »

I have figured it out
i changed this
Code: [Select]
//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

Code: [Select]
//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
Logged
Pages: [1]   Go Up
 

Page created in 0.015 seconds with 19 queries.