Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Community Discussions (All other subjects)
 Tiny bug here?
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Podge
Support Moderator

Ireland
3775 Posts

Posted - 13 April 2005 :  13:29:38  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
On the main forum page here at Snitzdefault.asp says "There are currently 2984 topics and there are active topics since you last visited."

Should this not be (in my case) "There are currently 2984 topics and there are 4 active topics since you last visited.

Or is this by design?

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 13 April 2005 :  14:21:57  Show Profile
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.”
Go to Top of Page

MarkJH
Senior Member

United Kingdom
1722 Posts

Posted - 13 April 2005 :  16:19:30  Show Profile  Visit MarkJH's Homepage
Ooh, secret forums!

Bandlink.net - http://www.bandlink.net/
Bandlink Music Forums - http://www.bandlink.net/forum/
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 13 April 2005 :  17:31:57  Show Profile
Yup. We got lots of secret forums hidden from you guys.

Support Snitz Forums
Go to Top of Page

Podge
Support Moderator

Ireland
3775 Posts

Posted - 13 April 2005 :  18:02:43  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
I have to say I never noticed that in about 5 years.

How exactly does it work? e.g.

If an admin views the default page and presumably has access to all forums does it display the number of active topics?
If a registered user views the main page does it not count those active topics which the member has access to?

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 13 April 2005 :  18:39:12  Show Profile
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
Go to Top of Page

Ghostnetworks
New Member

95 Posts

Posted - 13 April 2005 :  20:34:18  Show Profile  Visit Ghostnetworks's Homepage
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.

Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 13 April 2005 :  23:08:22  Show Profile
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
Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 14 April 2005 :  05:02:19  Show Profile  Visit Gremlin's Homepage
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
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.2 seconds. Powered By: Snitz Forums 2000 Version 3.4.07