Jump to content

Topic Count


Recommended Posts

I'm trying to add topic count back to forumrow but the old function doesn't want to count sub forums.

                {{if $forum->topics}}
                <span class='ipsType_light'></span> {$forum->topics}
				{{if $forum->posts}}
				<span class='ipsType_light'></span> {$forum->posts}

The above works great other than the fact it doesn't count subs. Any idea?

Link to comment
Share on other sites

Assuming you got the topic/post count you wanted as a variable in template you are messing with, you would just use php number format/round instructions to get what you want.  But you have decisions to make on less than 1000, when to round up or down, no decimal place or 1, etc.

In general I find that if I need to do a math/string thing with php and don't know it off hand, I google what I want and almost always get something.  If you google "php convert thousand to k" you will get many ideas on doing what you want, and all the variants for less than 1000, more than 900,000, etc.


Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...