Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not Solved Total Number of Posts in a Thread
#1
Not Solved
Rather than simply showing the post # in the corner of each reply, I want to show a "Message 3 of 5" message that shows the post number out of  total replies to a thread.

This is my postbit_posturl template right now, but I can't figure out how to change it:
<div class="float_right" style="vertical-align: top">
Message<strong>{$post_number}</strong> of {$thread['posts']}
{$post['inlinecheck']}
</div>

{$thread['posts']} obviously isn't working, so I tried to use PHP to fix this and it won't work. Any suggestions?

Board URL: http://wspforums.com/thread-158.html
Reply
#2
Not Solved
Unfortunately a variable used in one template may not necessarily work in another. 

{$thread['replies']} will work in the postbit template, but what you need is {$thread['replies']} + 1

then you can have something like:

<div class="float_right" style="vertical-align: top">
Message<strong>{$post_number}</strong> of {$thread['replies']} + 1
{$post['inlinecheck']}
</div>
What goes around comes around
Reply
#3
Not Solved
Hey Ashley1,

I tried doing that prior to writing my post, and all it displays is the number of replies and the actual "+ 1".

I even tried doing a php print command like: <? php print({$thread['replies']} + 1Wink ?> and it still wouldn't work.  Undecided
Reply
#4
Not Solved
Try the plugin template conditionals:
https://community.mybb.com/thread-31860.html

It allows you to use php in templates, further to that you will need to create a plugin to generate what you need.
What goes around comes around
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)