Hi François,
Here are a couple globals you can use to get the threads and posts of a particular forum, given its forum_id:
threads_in_forum:
posts_in_forum:
Then in your template, you'll do:
<%set show_threads = $total_threads%>
<%set show_threads -= threads_in_forum(4)%>
<%set show_threads -= threads_in_forum(9)%>
<%set show_threads -= threads_in_forum(15)%>
Now use <%show_threads%> instead of <%total_threads%> - it will have the count subtracted. Replace 4, 9, and 15 with the ID's of whichever forums whose counts you wish to subtract.
Likewise, for the post count:
<%set show_posts = $total_posts%>
<%set show_posts -= posts_in_forum(4)%>
<%set show_posts -= posts_in_forum(9)%>
<%set show_posts -= posts_in_forum(15)%>
Then use <%show_posts%> instead of <%total_posts%>. Again, replace 4, 9, and 15 with the desired forum ID's.
Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Here are a couple globals you can use to get the threads and posts of a particular forum, given its forum_id:
threads_in_forum:
Code:
sub { $DB->table('Forum')->select(forum_total_threads => { forum_id => shift })->fetchrow }posts_in_forum:
Code:
sub { $DB->table('Forum')->select(forum_total => { forum_id => shift })->fetchrow }<%set show_threads = $total_threads%>
<%set show_threads -= threads_in_forum(4)%>
<%set show_threads -= threads_in_forum(9)%>
<%set show_threads -= threads_in_forum(15)%>
Now use <%show_threads%> instead of <%total_threads%> - it will have the count subtracted. Replace 4, 9, and 15 with the ID's of whichever forums whose counts you wish to subtract.
Likewise, for the post count:
<%set show_posts = $total_posts%>
<%set show_posts -= posts_in_forum(4)%>
<%set show_posts -= posts_in_forum(9)%>
<%set show_posts -= posts_in_forum(15)%>
Then use <%show_posts%> instead of <%total_posts%>. Again, replace 4, 9, and 15 with the desired forum ID's.
Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com