Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted May 14, 20177 yr 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?
May 14, 20177 yr Author Also, if anyone knows of a theme compatible with 4.1 that I can reference that would be great!
May 15, 20177 yr Author 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?
May 15, 20177 yr 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.
Archived
This topic is now archived and is closed to further replies.