Hi,
Can someone tell me the correct if condition if at least one reply has been posted in a thread?
I tried if($thread['replies'] > 0), but it didn't work :(
I want to show "no replies" in the last reply column if a thread has no replies. Thanks.
Open ./forumdisplay.php and find;
$thread['replies'] = my_number_format($thread['replies']);
and Change it into;
if ($thread['replies'] != "0")
{
$thread['replies'] = my_number_format($thread['replies']);
}
else
{
$thread['replies'] = '<span class="smalltext">No Replies</span>';
}
Thanks for your help, but that is not exactly that what I'm looking for.
Your code puts a "No Replies" in the replies column and not in the last reply column:
Correct it should look like this:
Thanks again for your help :)
OK, then remove the edited part and add the following code just below
$thread['replies'] = my_number_format($thread['replies']);
if ($thread['replies'] != "0")
{
$replied = '';
}
else
{
$replied = '<span class="smalltext">No Replies</span>';
}
Now add
{$replied} in "forumdisplay_thread" template below "{$lastposterlink}" or where you want text to appear
Thanks a bunch! It worked.
Greatly appreciated your help