I would like to remove the part that shows the redirect count as shown in my attachment.
Think I'm looking in the right area, but not sure just what to edit.
BoardIndex.template.php
// Show some basic information about the number of posts, etc.
echo '
</td>
<td class="stats windowbg">
<p>', comma_format($board['posts']), ' ', $board['is_redirect'] ? $txt['redirects'] : $txt['posts'], ' <br />
', $board['is_redirect'] ? '' : comma_format($board['topics']) . ' ' . $txt['board_topics'], '
</p>
</td>
<td class="lastpost">';
I'm I even looking in the right area?
Thanks,
I am not testing this yet but try changing it to:
<p>', comma_format($board['posts']), ' ', $txt['posts'], ' <br />
', comma_format($board['topics']), ' ', $txt['board_topics'], '
</p>
Only change the similar part, don't replace all the code you posted with it.
(ahrasis, that should work, nice thinking ;))
When I use the above code change instead of removing "11 Redirects" it changes it to, "11 Post 0 Topics".
Change the same piece into this:
<p>', $board['is_redirect'] ? '' : comma_format($board['posts']) . ' ' . $txt['posts'] . ' <br />' . comma_format($board['topics']) . ' ' . $txt['board_topics'], '</p>
Yoshi2889, that works great! Thank you.
Quote from: Yoshi2889 on January 19, 2013, 04:05:32 AM
(ahrasis, that should work, nice thinking ;))
You speak to soon. Thanks for the code Yoshi. I understand the ? and : function better today.
Quote from: ahrasis on January 19, 2013, 12:33:33 PM
Quote from: Yoshi2889 on January 19, 2013, 04:05:32 AM
(ahrasis, that should work, nice thinking ;))
You speak to soon. Thanks for the code Yoshi. I understand the ? and : function better today.
Hehe checking code from a smartphone isn't easy ;)
? and : is more like an if...else condition.
if ($this_is_true)
echo "Test";
else
echo "It was not true.";
equals to
echo $this_is_true ? "Test" : "It was not true.";
It's just a way to write shorter code :)
Quote from: Yoshi2889 on January 19, 2013, 12:34:27 PM
It's just a way to write shorter code :)
Yup! And cleaner too. I really like it. I will practise using this more in the future.