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

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Percentage of posts
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

mortioli
Average Member

United Kingdom
898 Posts

Posted - 09 August 2002 :  09:43:24  Show Profile  Visit mortioli's Homepage  Send mortioli an AOL message  Send mortioli a Yahoo! Message
I've just noticed this on peoples profiles:

Total Posts: 332
[1% of total forum posts / 1.27 posts per day]


I've seen it on other forums aswell.

Does anyone have the code for it please?

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 09 August 2002 :  10:24:54  Show Profile
OK, here's a little something I wrote myself with some help from Ruirib, Hamlin & Gremlin, I was going to package it up as a Mod before I saw that it was already included in 3.4. All line references below are for a clean copy of version 3.3.03.

In pop_profile.asp find the following beginning on line 424:
          <tr>
<td bgColor="<% =strPopUpTableColor %>" align=right nowrap valign=top><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">Total Posts: </font></b></td>
<td bgColor="<% =strPopUpTableColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><% = ChkString(rs("M_POSTS"), "display") %></font></td>
</tr>

And replace it with this:
<%' ################  BEGIN MeTV's Post Stats Mod  ################
end if
StrSQLTotals = "SELECT P_COUNT, P_A_COUNT FROM FORUM_TOTALS"
RSTotals = my_Conn.Execute(StrSQLTotals)
intPercentage = (ChkString(rs("M_POSTS"), "display") / (RSTotals("P_COUNT") + RSTotals("P_A_COUNT"))) * 100
intMemberDays = DateDiff("d",ChkDate(rs("M_DATE")),strForumTimeAdjust)
if intMemberDays = 0 then
intMemberDays = 1
end if
intMemberPostDays = ChkString(rs("M_POSTS"), "display") / intMemberDays
%>
<tr>
<td bgColor="<% =strPopUpTableColor %>" align=right nowrap valign=top><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">Total Posts: </font></b></td>
<td bgColor="<% =strPopUpTableColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><% = ChkString(rs("M_POSTS"), "display") %><br>(<% = FormatNumber(intPercentage,1)%>% of all posts)<br>(<% = FormatNumber(intMemberPostDays,2) %> posts per day)</font></td>
</tr>
<%' ################ END MeTV's Post Stats Mod ################ %>


c ya in the funny books
MeTV - tvthemetunes.net - forums
house of design - graphic design consultants

"I have not failed. I've just found 10000 ways that won't work."
Go to Top of Page

mortioli
Average Member

United Kingdom
898 Posts

Posted - 09 August 2002 :  11:50:51  Show Profile  Visit mortioli's Homepage  Send mortioli an AOL message  Send mortioli a Yahoo! Message
Cheers!

I was going to use it some other places aswell as profile, but thanks for the info on the placement.
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 09 August 2002 :  12:17:13  Show Profile
You're welcome!

You may have to make some changes to recordset names, etc. if you want to use it on other pages, let me know if you come across any problems.

c ya in the funny books
MeTV - tvthemetunes.net - forums
house of design - graphic design consultants

"I have not failed. I've just found 10000 ways that won't work."
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 09 August 2002 :  12:31:17  Show Profile  Visit dayve's Homepage
quote:
Originally posted by mortioli

Cheers!

I was going to use it some other places aswell as profile, but thanks for the info on the placement.



let me know if you are interested in doing something like this, I made this based on requests from my members and its proven to be pretty fast and very useful for those stat-mongers. :

http://www.burningsoulsforum.com/forum/members.asp


Edited by - dayve on 09 August 2002 12:31:37
Go to Top of Page

Darkness
Junior Member

Italy
145 Posts

Posted - 13 August 2002 :  16:43:28  Show Profile  Visit Darkness's Homepage
I have this error:

Microsoft VBScript compilation error '800a03fe'

Expected 'Select'

/forum/pop_profile.asp, line 424

end if
----^


Why?
Go to Top of Page

mortioli
Average Member

United Kingdom
898 Posts

Posted - 13 August 2002 :  17:10:27  Show Profile  Visit mortioli's Homepage  Send mortioli an AOL message  Send mortioli a Yahoo! Message
Yeah that would cool dayve! Cheers!
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 13 August 2002 :  17:15:52  Show Profile  Visit dayve's Homepage
quote:
Originally posted by mortioli

Yeah that would cool dayve! Cheers!



I am at work right now, I will post the code later this evening.

Go to Top of Page

Darkness
Junior Member

Italy
145 Posts

Posted - 13 August 2002 :  17:43:23  Show Profile  Visit Darkness's Homepage
If i try this code :


<%' ################  BEGIN MeTV's Post Stats Mod  ################

StrSQLTotals = "SELECT P_COUNT, P_A_COUNT FROM FORUM_TOTALS"
RSTotals = my_Conn.Execute(StrSQLTotals)
intPercentage = (ChkString(rs("M_POSTS"), "display") / (RSTotals("P_COUNT") + RSTotals("P_A_COUNT"))) * 100
intMemberDays = DateDiff("d",ChkDate(rs("M_DATE")),strForumTimeAdjust)
if intMemberDays = 0 then
intMemberDays = 1
end if
intMemberPostDays = ChkString(rs("M_POSTS"), "display") / intMemberDays
%>
<tr>
<td bgColor="<% =strPopUpTableColor %>" align=right nowrap valign=top><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">Total Posts: </font></b></td>
<td bgColor="<% =strPopUpTableColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><% = ChkString(rs("M_POSTS"), "display") %><br>(<% = FormatNumber(intPercentage,1)%>% of all posts)<br>(<% = FormatNumber(intMemberPostDays,2) %> posts per day)</font></td>
</tr>
<%' ################ END MeTV's Post Stats Mod ################ %>


All works fine...
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 14 August 2002 :  05:27:27  Show Profile
Sorry about that little "end if" problem, I just copied and pasted that bit of code from my pop_profile.asp. If you read back over some of my posts, you'll notice there's always a problem with "end if" when I try to help people!

c ya in the funny books
MeTV - tvthemetunes.net - forums
house of design - graphic design consultants

"I have not failed. I've just found 10000 ways that won't work."
Go to Top of Page

mortioli
Average Member

United Kingdom
898 Posts

Posted - 14 August 2002 :  12:25:07  Show Profile  Visit mortioli's Homepage  Send mortioli an AOL message  Send mortioli a Yahoo! Message
quote:
Originally posted by dayve

quote:
Originally posted by mortioli

Yeah that would cool dayve! Cheers!



I am at work right now, I will post the code later this evening.



No problem! Cheers mate!
Go to Top of Page

vweyes
New Member

74 Posts

Posted - 18 August 2002 :  18:26:24  Show Profile
wow... that works great!

Forums: rtcw.gamespage.com
Website: http://www.planetwolfenstein.com/atb/
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.21 seconds. Powered By: Snitz Forums 2000 Version 3.4.07