How might I ad code to a thread that only appears after or if a certain amount of replies have been made? For example, I have code that displays at the bottom of a thread but I don't want it to display unless there are 4 or more posts in that thread...
Conditional Question
Collapse
X
-
The conditions in the thread below should still work:
Translations provided by Google.
Wayne Luke
The Rabid Badger - a vBulletin Cloud demonstration site.
vBulletin 5 API -
Thank you. This looks like what I want:
<if condition="$post[postcount] == 1 AND $GLOBALS[threadinfo][replycount] >= 2">
...but just above the quick reply box and only if there are X amount of posts/replies on the page.. Is that possible?
The conditions in the thread below should still work:
https://www.vbulletin.com/forum/show...st-In-A-ThreadComment
-
You would put that code at the bottom of your postbit template and change postcount == 1 to postcount ==4. Then change replycount >= 2 to either >= 4 or == 4 depending on whether you want it to show for less.
If you do the template edit in the SHOWTHREAD template just use:
<if condition="$threadinfo[replycount] >= 2">Translations provided by Google.
Wayne Luke
The Rabid Badger - a vBulletin Cloud demonstration site.
vBulletin 5 APIComment
-
I'm using this in showthread. If there are under 6 replies in a thread, this works:
<vb:if condition="$threadinfo[replycount] >= 6">
What I'd REALLY love is that for the code to display ONLY if there are 6 replies/posts on a page. So if there's a topic with 5 pages, I'd like to display the code ONLY if there are 6 or most posts on it...
Is there any way to do that with conditionals?
Thank you for your help thusfar!Comment
-
I'm using this in showthread. If there are under 6 replies in a thread, this works:
<vb:if condition="$threadinfo[replycount] >= 6">
What I'd REALLY love is that for the code to display ONLY if there are 6 replies/posts on a page. So if there's a topic with 5 pages, I'd like to display the code ONLY if there are 6 or most posts on it...
Is there any way to do that with conditionals?
Thank you for your help thusfar!My Live vB5 Site - NZEating.com
vBulletin Hosting | vBulletin Services - Need hosting for your vB? Need it installed? Something else? Let me take that hassle off your hands.Comment
-
Comment
-
If you want it to show up on six posts in a thread, you need to check for replycount == 5. This is six posts. The original and 5 replies makes six. If you want it show for 7 posts, then replycount == 6 will work.Translations provided by Google.
Wayne Luke
The Rabid Badger - a vBulletin Cloud demonstration site.
vBulletin 5 APIComment
-
Hi Wayne,
Thank you. Is is possible for this to work on all 5 pages of a discussion thread? In other words, I'd like the code to display only if there are 6 posts on a page. If there are 3 pages, I'd like to code to display if there are 6 posts. I'm probably not explaining what I want properly... But let me know if you understand what I'm saying.
Thank you...
Comment
-
Have to think about this and take a look at the code to see where postcount is available.Translations provided by Google.
Wayne Luke
The Rabid Badger - a vBulletin Cloud demonstration site.
vBulletin 5 APIComment
-
Comment
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Comment