![]() |
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. Any one know how to do this? Thanks! |
I don't know if this might help:
PHP Code:
|
Yeh that sprung to my mind but don't think it can be used for this.
|
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! |
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"> |
How would this be written? And would it be on the postbit_legacy template or the showthread template?
I tried: Code:
Code:
--------------- 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 ?? |
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"> |
I managed to get it working myself :)
I used this: Code:
<if condition="in_array(THIS_SCRIPT, array(showthread)) AND $GLOBALS[threadinfo][replycount] <= 1"> http://www.rockonpublishing.co.uk/showthread.php?t=14 But it does here: http://www.rockonpublishing.co.uk/showthread.php?t=15 :D Thanks for the help! |
All times are GMT. The time now is 04:47 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|