Author |
Topic |
|
Podge
Support Moderator
Ireland
3775 Posts |
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 13 April 2005 : 14:21:57
|
The active topics count isn't displayed on default.asp if private forums are turned on.
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
MarkJH
Senior Member
United Kingdom
1722 Posts |
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 13 April 2005 : 17:31:57
|
Yup. We got lots of secret forums hidden from you guys. |
Support Snitz Forums
|
|
|
Podge
Support Moderator
Ireland
3775 Posts |
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 13 April 2005 : 18:39:12
|
If the user has access to all forums then the regular count is done. If there are private forums it doesn't do any count.
It would require additional queries just to count the number of active topics that is in a forum that you have access to. We decided that it wouldn't be worth it. |
Support Snitz Forums
|
|
|
Ghostnetworks
New Member
95 Posts |
Posted - 13 April 2005 : 20:34:18
|
Or you could just store the total topics in one variable and the restricted ones in another as they are all being counted. Subtract and print. |
|
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 13 April 2005 : 23:08:22
|
How are you going to count the restricted ones without additional queries? You will have to loop through each forum, check what private level is set on the forum, check if the user is allowed to access the forum, and if he is, do more queries to count the number of new topics in that forum.
As I said, it was either showing all active posts count or none at all, as the additional work to get the count when private forums are on, is not worth it.
But of course, if anyone can come up with a way that doesn't require a whole lot of queries, be out guest. I'm open to it. |
Support Snitz Forums
|
|
|
Gremlin
General Help Moderator
New Zealand
7528 Posts |
Posted - 14 April 2005 : 05:02:19
|
You don't have to query the DB everytime though, you could keep seperate application variables that contain the count of each forum (or an array) the array gets updated when posts are made, and it's the array thats checked rather than doing queries to build the count.
Yeah I know it's not really quite that simple, you've still got to find an elegant way of deciding which array cells to add to show the user based on what they can/can't access, but it's late and I don't want to think that hard right now :) |
Kiwihosting.Net - The Forum Hosting Specialists
|
|
|
|
Topic |
|