Quote:
Originally Posted by ogden2k
Hi, is there a way to bold the number of threads/posts if they are new and not bold when there's only 0?
I tried with the PHP, but am not too familiar with with it.
|
Sorry, I didn't even see this reply until now!!
This would be a little tricky, but yes, anything can be done with conditionals.
conditionals are things like "if statements" for those wondering:
HTML Code:
<if condition="$newposts">
Do this
<else />
Do that
</if>
These TEMPLATE conditionals can be nested amost anywhere in html.
So to make JUST THE NUMBER be bold IF that number is not zero:
HTML Code:
<br /><span class="smallfont"><a href="search.php?$session[sessionurl]do=getnew"><if condition="$newposts"><b>$newposts</b><else />$newposts</if> New Posts</a> in $newthreads Threads.</span>
If you want to make ALL THE TEXT bold IF that number is not zero:
HTML Code:
<br /><span class="smallfont"><a href="search.php?$session[sessionurl]do=getnew"><if condition="$newposts"><b></if>$newposts New Posts</a> in $newthreads Threads.<if condition="$newposts"></b></if></span>
And it would be just as easy, if not easier to just completely eliminate the display IF there are no new posts as this eliminates the need for the ELSE half of the statement (since the other condition is to "do nothing").
HTML Code:
<if condition="$newposts"><br /><span class="smallfont"><a href="search.php?$session[sessionurl]do=getnew">$newposts New Posts</a> in $newthreads Threads.</span></if>
There's 3 completely different examples.
Hope that didn't confuse you too much.
If so, say so.
P.S. - As for previous request of hiding non viewable posts ... sorry I'm taking so long but I've devoted a ton of time to to another very intricate hack of mine because developing THAT is teaching me a ton of stuff which will help me design other small tweaks such as this with much better code.
Along my travels, I did find another hack that accomplishes something similar (forgot which for now but I'll get back to it when I'm ready) but I refuse to implement it until I either get permission from other author to do so and/or I learn enough to develope something like that on my own without having to cut n paste from someone elses work (meaning I fully understand the code).