Daddy Posted May 14, 2017 Share Posted May 14, 2017 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} {{endif}}/ {{if $forum->posts}} <span class='ipsType_light'></span> {$forum->posts} {{endif}} The above works great other than the fact it doesn't count subs. Any idea? Link to comment Share on other sites More sharing options...
Daddy Posted May 14, 2017 Author Share Posted May 14, 2017 Also, if anyone knows of a theme compatible with 4.1 that I can reference that would be great! Link to comment Share on other sites More sharing options...
Morrigan Posted May 14, 2017 Share Posted May 14, 2017 Link to comment Share on other sites More sharing options...
Daddy Posted May 15, 2017 Author Share Posted May 15, 2017 @Morrigan Thanks! Link to comment Share on other sites More sharing options...
Morrigan Posted May 15, 2017 Share Posted May 15, 2017 No problem @iDeath Link to comment Share on other sites More sharing options...
Daddy Posted May 15, 2017 Author Share Posted May 15, 2017 One last question for anyone. Suppose I want the value to show as 3k instead of 2,900 how can I go about doing so? Link to comment Share on other sites More sharing options...
clearvision Posted May 15, 2017 Share Posted May 15, 2017 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.