[How To?] Get thread count for one forum to put on index - Printable Version +- MyBB Community Forums (https://community.mybb.com) +-- Forum: 1.8 Support (https://community.mybb.com/forum-175.html) +--- Forum: General Support (https://community.mybb.com/forum-176.html) +--- Thread: [How To?] Get thread count for one forum to put on index (/thread-207487.html) |
Get thread count for one forum to put on index - YoshiOlly - 2017-01-17 Hi, how would I go about pulling the thread count (the one that shows in the forum bit) for one specific forum so that I can put it in another location in my index template? I assume I would need to add a bit of code to my index.php file but I have no idea what I need. Thanks! RE: Get thread count for one forum to put on index - Livewire - 2017-01-18 Forum bit stats I believe the variable can't be move able I have tried this before didn't work. Where are you trying to move it to? RE: Get thread count for one forum to put on index - YoshiOlly - 2017-01-18 (2017-01-18, 08:13 AM)Dead-i Wrote: Forum bit stats I believe the variable can't be move able I have tried this before didn't work. I have one forum section that is used for reviews that isn't visible on the index, and I'd like to put in my sidebar something like, "We currently have xx reviews." under the list of latest ones. I did actually manage to figure out something that works;
I'm not sure how efficient it is though, as now I've got that I have plans to use it for a couple of other sections, but if it's doing a query for each one, I'd prefer to someshow make it so that it's just one for all, rather than something like this;
I'm not knowledgeable about this at all, but I imagine there's a way to do it all with just one query. |