The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
If No post...
Im coding my own 'last post' box
and this is what i have.. Code:
<table width="100%" border="0" cellpadding="4" cellspacing="0" bgcolor="#d8e1e6"> <tr> <td><font color="#5d6e76" size="1" face="Tahoma"><strong>Last Post:</strong> <a href="showthread.php?$session[sessionurl]goto=newpost&t=$lastpostinfo[lastthreadid]">$lastpostinfo[lastthread]</a> @ $lastpostinfo[lastposttime]</font></td> </tr> </table> but when there isnt a post in that forum, the variables just dont show up. whats the <if> statement for if there isnt a post.. it just says never? |
#2
|
|||
|
|||
Code:
<if condition="$lastpostinfo[lastthreadid]"><table width="100%" border="0" cellpadding="4" cellspacing="0" bgcolor="#d8e1e6"> <tr> <td><font color="#5d6e76" size="1" face="Tahoma"><strong>Last Post:</strong> <a href="showthread.php?$session[sessionurl]goto=newpost&t=$lastpostinfo[lastthreadid]">$lastpostinfo[lastthread]</a> @ $lastpostinfo[lastposttime]</font></td> </tr> </table></if> |
#3
|
||||
|
||||
instead of hiding the table when there's no posts, could i get it to say never?
and thanks for the help |
#4
|
||||
|
||||
Replace the above code with:
Code:
<if condition="$lastpostinfo[lastthreadid]"><table width="100%" border="0" cellpadding="4" cellspacing="0" bgcolor="#d8e1e6"> <tr> <td><font color="#5d6e76" size="1" face="Tahoma"><strong>Last Post:</strong> <a href="showthread.php?$session[sessionurl]goto=newpost&t=$lastpostinfo[lastthreadid]">$lastpostinfo[lastthread]</a> @ $lastpostinfo[lastposttime]</font></td> </tr> </table><else /><table width="100%" border="0" cellpadding="4" cellspacing="0" bgcolor="#d8e1e6"> <tr> <td><font color="#5d6e76" size="1" face="Tahoma"><strong>Last Post:</strong> Never</font></td> </tr> </table></if> Chris |
#5
|
||||
|
||||
thanks to you both !!
|
#6
|
||||
|
||||
I just noticed a type error on my part
I've updated my post Chris |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|