Web Wiz - Green Windows Web Hosting - Celebrating 25 Years!

  New Posts New Posts RSS Feed - v8.02 Forum Statistics oddity
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

v8.02 Forum Statistics oddity

 Post Reply Post Reply
Author
WebG View Drop Down
Groupie
Groupie


Joined: 19 November 2004
Status: Offline
Points: 59
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebG Quote  Post ReplyReply Direct Link To This Post Topic: v8.02 Forum Statistics oddity
    Posted: 28 May 2006 at 5:51am
I just upgraded from 7.9x to 8.02.     I have the board locked down (no browsing) unless you're signed in as a user.
 
The forum statistics were displayed just fine for anybody (including guests) who wandered by the main page in the 7.9x system.  
 
Now, after the upgrade, users get this on the main page ONLY after they've signed in.
     Our users have posted 18,161 Posts in 1,115 Topics in 15 Forum(s)
 
What guests and non-logged in people see is this:
     Our users have posted 0 Posts in 0 Topics in 0 Forum(s)
Any suggestions on what needs to be tweaked in DEFAULT.ASP to get the stats displaying correctly if you haven't logged in?   And is this normal / expected behavior?
 
 
ALSO, where would we modify the number of forums being displayed?  While the admins may know that there are 15 different forums, we may not want the users, especially new ones, to know -- I can yank the forum count from displaying I guess, but if it was dynamic for each user...

 


Edited by WebG - 28 May 2006 at 5:54am
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 28 May 2006 at 11:04am
The forum stats only show those forums which are displayed, if you choose to hide forums from guests they won't see the stats for those fourms.
Back to Top
WebG View Drop Down
Groupie
Groupie


Joined: 19 November 2004
Status: Offline
Points: 59
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebG Quote  Post ReplyReply Direct Link To This Post Posted: 28 May 2006 at 4:18pm
Originally posted by -boRg- -boRg- wrote:

The forum stats only show those forums which are displayed, if you choose to hide forums from guests they won't see the stats for those fourms.
 
Well, that's not helpful (but I see in the code how that works and it's tied to the new streamlined DB access you've setup).  A lot of our users drop by the front page to see if there have been any new posts made, and if there aren't, they don't sign in.
 
I'll probably yank some code from the 7.9 version to get it working.  
 
Thanks for the reply.
 
Back to Top
WebG View Drop Down
Groupie
Groupie


Joined: 19 November 2004
Status: Offline
Points: 59
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebG Quote  Post ReplyReply Direct Link To This Post Posted: 28 May 2006 at 4:42pm
Here's what I did in DEFAULT.ASP:
 
Around line 445 or so, I added this:
 
'*******************************
lngNumberOfTopicsNOLOGIN = lngNumberOfTopicsNOLOGIN + CLng(sarryForums(6, intCurrentRecord))
lngNumberOfPostsNOLOGIN = lngNumberOfPostsNOLOGIN + CLng(sarryForums(7, intCurrentRecord))
'*******************************
Then, where the stats are displayed, I added these lines and modified the stat display as such:
 
dim tTopics
dim tPosts
If lngLoggedInUserID = 2 Then
  tTopics = lngNumberOfTopicsNOLOGIN
  tPosts = lngNumberOfPostsNOLOGIN
else
  tTopics = lngTotalNumberOfTopics
  tPosts = lngTotalNumberOfPosts
end if
Response.Write(strTxtOurUserHavePosted & " " & FormatNumber(tPosts, 0) & " " & strTxtPostsIn & " " & FormatNumber(tTopics, 0) & " " & strTxtTopicsIn & " our " & strTxtForums & _
It works exactly for what I want it to do, although I'm sure that I'm missing something or other.    It may be something to tweak for the next release if it's something other people would want as well.
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 28 May 2006 at 7:40pm
The forum stats use to contain stats of hidden forums, but allot of people considered this a security risk and demanded that it be removed.

Most people that if they hide a forum with no Access they don't want non-privileged people to know it exists, otherwise they would simply select to have the forum display but with a 'no access' sign for the forum, then it would be included in the stats.
Back to Top
jckruger View Drop Down
Groupie
Groupie
Avatar

Joined: 18 April 2006
Location: Australia
Status: Offline
Points: 135
Post Options Post Options   Thanks (0) Thanks(0)   Quote jckruger Quote  Post ReplyReply Direct Link To This Post Posted: 02 June 2006 at 12:47am
Hi WebG,
 
Why don't you remove the stats from the front page for not logged on people so your users are then obligated to log in to see what is going on.

I added this to remove the statistics for the main page at line 750

----------------------------------------------------------%>-------------------------------
'Loop back round for next category
 Loop
End If

If lngLoggedInUserID <> 0 AND lngLoggedInUserID <> 2 Then
%>
<br />
<table cellspacing="1" cellpadding="3" class="tableBorder" align="center">
 <tr class="tableLedger">
  <td colspan="2"><% = strTxtWhatsGoingOn %></td>

----------------------------------------------------------%>-------------------------------
 
And also another End IF at line 813
 
----------------------------------------------------------%>-------------------------------
'Response.Write(strTxtInTotalThereAre & " " & intActiveUsers & " <a href=""active_users.asp" & strQsSID1 & """>" & strTxtActiveUsers & "</a> " & strTxtOnLine & ", " & intActiveGuests & " " & strTxtGuestsAnd & " " & intActiveMembers & " " & strTxtMembers)
 If strMembersOnline <> "" Then Response.Write(vbCrLf & "   <br />" & strTxtMembers & " " & strTxtOnLine & ": " & strMembersOnline)
End If
End if
----------------------------------------------------------%>-------------------------------
 
Just my two cents worth.
 
Cheers
 
Justin
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.