Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Daddy Posted May 14, 2017 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?
Daddy Posted May 14, 2017 Author Posted May 14, 2017 Also, if anyone knows of a theme compatible with 4.1 that I can reference that would be great!
Daddy Posted May 15, 2017 Author 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?
clearvision Posted May 15, 2017 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.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.