Forum statistics
Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=25127
Printed Date: 04 April 2026 at 3:31am Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com
Topic: Forum statistics
Posted By: dimoss
Subject: Forum statistics
Date Posted: 10 January 2008 at 2:46pm
Hi,
Is it possible to put also the forum statistics which shows in the default.asp page in another page of my site? If yes, how? Thanks,
Dimos
|
Replies:
Posted By: StarDust
Date Posted: 10 January 2008 at 3:51pm
You will have to code a module to do that.
Tell me some more and i'll try to help you out.
------------- http://board.ebizbd.net/"> Tips, mods and skins for WWF v9.x
|
Posted By: namtoday
Date Posted: 11 January 2008 at 2:45am
What he said is quite detail, he wants a statistic module @ his own site. The easiest way to do it, probably is you can go to default.asp page, and delete wherever webwizforum displays a forum (dont delete any SQL command).But it will probably alot slower compared with a code that speciallized in doing the job as it has to load almost the default page.
|
Posted By: dimoss
Date Posted: 11 January 2008 at 1:28pm
Finally I found what I was looking for. I put it here for other also. <% Dim rsForumStatsMod Dim adoStatsModCon Dim strStatsModCon Dim strSQLStatsMod Dim strStatsModForumPath Dim intForumStatsTotalMembers Dim intForumStatsTotalTopics Dim intForumStatsTotalThreads Dim intForumStatsTotalPosts
'The path to the forum strStatsModForumPath = "/forum/"
'Default connection strStatsModCon = "Provider=sqloledb;Data Source=xxx; User Id=xxx; Password=xxx; Database=xxx"
'Open connection. Makes it so access doesnt crash as much Set adoStatsModCon = Server.CreateObject("ADODB.Connection") adoStatsModCon.Open strStatsModCon
'Make the connection to display newest members Set rsForumStatsMod = Server.CreateObject("ADODB.Recordset")
'Count Members strSQLStatsMod = "SELECT Count(tblAuthor.Author_ID) AS Total_members FROM tblAuthor;" rsForumStatsMod.Open strSQLStatsMod, adoStatsModCon intForumStatsTotalMembers = Clng(rsForumStatsMod("Total_members")) rsForumStatsMod.Close
'Count Topics strSQLStatsMod = "SELECT Count(tblTopic.Topic_ID) AS Total_topics FROM tblTopic;" rsForumStatsMod.Open strSQLStatsMod, adoStatsModCon intForumStatsTotalTopics = Clng(rsForumStatsMod("Total_topics")) rsForumStatsMod.Close
'Count Replies strSQLStatsMod = "SELECT Count(tblThread.Thread_ID) AS Total_threads FROM tblThread;" rsForumStatsMod.Open strSQLStatsMod, adoStatsModCon intForumStatsTotalThreads = Clng(rsForumStatsMod("Total_threads") - intForumStatsTotalTopics) rsForumStatsMod.Close
intForumStatsTotalPosts = intForumStatsTotalTopics + intForumStatsTotalThreads
Response.Write(vbCrLf & "We have " & "<b>" & intForumStatsTotalMembers & "</b>" & " members who have made " & "<b>" & intForumStatsTotalPosts & "</b>" & " posts in total" & "<br>" & "(" & intForumStatsTotalTopics & " topics and " & intForumStatsTotalThreads & " replies)." & " ")
'Reset Server Objects Set rsForumStatsMod = Nothing adoStatsModCon.Close Set adoStatsModCon = Nothing %>
Post edited by admin as it contained the users database login username and password!
|
|