Try this at about line 746. Only add the bits in RED to default.asp
-------------------------------------------------------%>---------------------------------
'Loop back round for next category
Loop
End If
If blnModerator OR blnAdmin Then
%>
<br />
<table cellspacing="1" cellpadding="3" class="tableBorder" align="center">
<tr class="tableLedger">
<td colspan="2"><% = strTxtWhatsGoingOn %></td>
</tr>
<tr class="tableSubLedger">
<td colspan="2"><% = strTxtForumStatistics %></td>
</tr>
<tr class="tableRow">
<td width="4%" align="center"><img src="<% = strImagePath %>stats_bar.gif" alt="<% = strTxtForumStatistics %>" /></td>
<td width="96%" nowrap><%
Response.Write(strTxtOurUserHavePosted & " " & FormatNumber(lngTotalNumberOfPosts, 0) & " " & strTxtPostsIn & " " & FormatNumber(lngTotalNumberOfTopics, 0) & " " & strTxtTopicsIn & " " & intNumberofForums & " " & strTxtForums & _
"<br />" & strTxtLastPost & "; " & DateFormat(dtmLastEntryDateAllForums) & " " & strTxtAt & " " & TimeFormat(dtmLastEntryDateAllForums) & " " & strTxtBy & " <a href=""member_profile.asp?PF=" & lngLastEntryUserIDAllForums & strQsSID2 & """>" & strLastEntryUserAllForums & "</a>")
'Display some statistics for the members
If lngNoOfMembers > 0 Then
Response.Write("<br />" & strTxtWeHave & " " & FormatNumber(lngNoOfMembers, 0) & " " & strTxtForumMembers & _
"<br />" & strTxtTheNewestForumMember & " <a href=""member_profile.asp?PF=" & saryMemebrStats(1,0) & strQsSID2 & """>" & saryMemebrStats(0, 0) & "</a>")
End If
%></td>
</tr><%
'Get the number of active users if enabled
If blnActiveUsers Then
%>
<tr class="tableSubLedger">
<td colspan="2"><a href="active_users.asp<% = strQsSID1 %>"><% = strTxtActiveUsers %></a></td>
</tr>
<tr class="tableRow">
<td width="4%" align="center"><a href="active_users.asp<% = strQsSID1 %>"><img src="<% = strImagePath %>active_users.gif" alt="<% = strTxtActiveUsers %>" border="0" /></a></td>
<td width="96%"><%
'Get the active users online
For intArrayPass = 1 To UBound(saryActiveUsers, 2)
'If this is a guest user then increment the number of active guests veriable
If saryActiveUsers(1, intArrayPass) = 2 Then
intActiveGuests = intActiveGuests + 1
'Else add the name of the members name of the active users to the members online string
ElseIf CBool(saryActiveUsers(8, intArrayPass)) = false Then
If strMembersOnline <> "" Then strMembersOnline = strMembersOnline & ", "
strMembersOnline = strMembersOnline & "<a href=""member_profile.asp?PF=" & saryActiveUsers(1, intArrayPass) & strQsSID2 & """>" & saryActiveUsers(2, intArrayPass) & "</a>"
End If
Next
'Calculate the number of members online and total people online
intActiveUsers = UBound(saryActiveUsers, 2)
intActiveMembers = intActiveUsers - intActiveGuests
'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
%>
-------------------------------------------------------%>---------------------------------
This should make the statistics available to ADMINS or MODS. You could change it dor ADMINS only too.
To change the Members button to be viewable only to admins you could add this in RED to navigation_buttons_inc.asp at about line 70
-------------------------------------------------------%>---------------------------------
'Display the other common buttons
If blnModerator OR blnAdmin Then Response.Write (" <a href=""active_topics.asp" & strQsSID1 & """ class=""nav"" accesskey=""2""><img src=""" & strImagePath & "active_topics.gif"" align=""absmiddle"" border=""0"" alt=""" & strTxtActiveTopics & """ />" & strTxtActiveTopics & "</a>")
If blnAdmin Then Response.Write (" <a href=""members.asp" & strQsSID1 & """ class=""nav""><img src=""" & strImagePath & "members_list.gif"" border=""0"" align=""absmiddle"" alt=""" & strTxtMembersList & """ />" & strTxtMemberlist & "</a>")
If blnCalendar Then Response.Write (" <a href=""calendar.asp" & strQsSID1 & """ class=""nav""><img src=""" & strImagePath & "calendar.gif"" border=""0"" align=""absmiddle"" alt=""" & strTxtCalendar & """ />" & strTxtCalendar & "</a>")
Response.Write (" <a href=""search_form.asp?FID=" & intForumID & strQsSID2 & """ class=""nav"" accesskey=""4""><img src=""" & strImagePath & "search.gif"" align=""absmiddle"" border=""0"" alt=""" & strTxtSearchTheForum & """ />" & strTxtSearch & "</a>")
Response.Write (" <a href=""help.asp" & strQsSID1 & """ class=""nav"" accesskey=""5""><img src=""" & strImagePath & "help_icon1.gif"" align=""absmiddle"" border=""0"" alt=""" & strTxtHelp & """ />" & strTxtHelp & "</a>")
-------------------------------------------------------%>---------------------------------
I haven't checked the code so backup first.
Cheers
Justin
Edited by jckruger - 07 June 2006 at 6:18am