![]() |
Total posts in thread
I used to have a little template mod on an older version of vB that would count the number of posts in a thread and display this in the post count. So if you have a thread with a post coult of 20 this will show up as #1 of 20, #5 0f 20, etc.
Thanks to Dean C for the help with this. First open either postbit or postbit_legacy and change Code:
<if condition="$show['postcount']">#<a href="showpost.php?$session[sessionurl]p=$post[postid]&postcount=$post[postcount]" target="new" rel="nofollow" id="postcount$post[postid]" name="$post[postcount]"><strong>$post[postcount]</strong></a></if> Code:
<if condition="$show['postcount']">#<a href="showpost.php?$session[sessionurl]p=$post[postid]&postcount=$post[postcount]" target="new" rel="nofollow" id="postcount$post[postid]" name="$post[postcount]"><strong>$post[postcount]</strong></a> of <b>$totalposts</b></if> Product: vBulletin Hook Location: postbit_display_start Title: Total Posts PHP Plugin Code: $totalposts=$thread[replycount]+1; Plugin Is Active: Yes Screen shot: http://www.hometheaterforum.com/images/totalposts.jpg Parker |
I don't know if this will work on the postbit(_legacy) template, but it works on the SHOWTHREAD template: $thread[replycount]. So, if it works on the postbit(_legacy) template, then you can use this one without using a plugin.
Edit: Tested. It works. |
Triky:
I am using $thread[replycount] in postbit_legacy in the plugin as I have to add 1 to the count as replycount doesn't include the 1st post. |
Don't Work
|
All times are GMT. The time now is 03:08 AM. |
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:
|