The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
If no thread reply, then show custom message
Hey guys,
I'd like to have a custom message shown below the first post of a showthread page if no one has replied to the thread yet. I believe it would be something like this in English: Code:
If there's a #2 post then show it and all others following. Else, show a message saying "No one has repleid yet - be the first!" Any one know how to do this? Thanks! |
#2
|
|||
|
|||
I don't know if this might help:
PHP Code:
|
#3
|
|||
|
|||
Yeh that sprung to my mind but don't think it can be used for this.
|
#4
|
|||
|
|||
Wouldn't it need to be 2 or greater. Possibly even greater than 1.
We need an expert! I'm not even sure where the if statement should sit if we conjure something up. Can't see where in the showthread, if it's meant to go there... it's past me. And I have the replies templated differently to the main thread using the "if postcount=1". --------------- Added [DATE]1257410245[/DATE] at [TIME]1257410245[/TIME] --------------- sorry to bump but has anyone with more knowledge got any idea? I'd love to have this functionality. Thanks! |
#5
|
||||
|
||||
OK this one is working for me so far. It was too simple as you suggested.
Code:
<if condition="in_array(THIS_SCRIPT, array(showthread)) AND $GLOBALS[threadinfo][replycount] >= 1"> |
#6
|
|||
|
|||
How would this be written? And would it be on the postbit_legacy template or the showthread template?
I tried: Code:
<if condition="in_array(THIS_SCRIPT, array(showthread)) AND $GLOBALS[threadinfo][replycount] >= 1"> ALL POSTBIT REPLY CONTENT <else /> ggg </if> Code:
<if condition="in_array(THIS_SCRIPT, array(showthread)) AND $GLOBALS[threadinfo][replycount] >= 1"> ggg <else /> ALL POSTBIT REPLY CONTENT </if> --------------- Added [DATE]1257440976[/DATE] at [TIME]1257440976[/TIME] --------------- Maybe, if anyone knows how to make an if statement that says: IF a certain threads reply count is less than 1 Show custom code ELSE show replies ?? |
#7
|
||||
|
||||
I added that code in postbit_legacy template, just above the attachments area
Code:
<if condition="in_array(THIS_SCRIPT, array(showthread)) AND $GLOBALS[threadinfo][replycount] >= 1"> Anything goes in here </if> <if condition="$show['attachments']"> |
#8
|
|||
|
|||
I managed to get it working myself
I used this: Code:
<if condition="in_array(THIS_SCRIPT, array(showthread)) AND $GLOBALS[threadinfo][replycount] <= 1"> <table style="margin-top: 8px;" width="100%" class="tborder"> <tr> <td align="center"> No one has replied to this thread yet. Post a reply now. </td> </tr> </table> </if> http://www.rockonpublishing.co.uk/showthread.php?t=14 But it does here: http://www.rockonpublishing.co.uk/showthread.php?t=15 Thanks for the help! |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|