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/Code)
 Mod Top Posters
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

GauravBhabu
Advanced Member

4288 Posts

Posted - 11 October 2002 :  17:54:54  Show Profile
Mod Top Posters
Author: Rakesh Jain(GauravBhabu)
Date : Oct 09, 2002

This will display Top Posters on main forum page

DEMO
username: snitz
password: snitz

Modifications required to be made in default.asp

Step 1:
Add the following code at the end of sub WriteStatistics()
Note: Modify the value for iTopPosterNum to show less/more Top Posters.
Default setting is 5. see statement in red below.


strSql = "SELECT M_NAME, MEMBER_ID, M_POSTS FROM " & strMemberTablePrefix & "MEMBERS " &_
	" ORDER BY M_POSTS desc;"

Dim iTopPosterNum, rsTopPosters, TopPostersFound, arrTopPosters
Dim iPoster, TopPoster_Name, TopPoster_ID, TopPoster_Posts
set rsTopPosters = Server.CreateObject("ADODB.Recordset")
iTopPosterNum = 5
rsTopPosters.open TopSQL(strSql, iTopPosterNum ), my_Conn
if not rsTopPosters.EOF then
   arrTopPosters = rsTopPosters.GetRows()
   TopPostersFound = true
else
   TopPostersFound = false
end if
rsTopPosters.close
set rsTopPosters = nothing

if TopPostersFound then 
   Response.Write (vbNewLine & _	
   "  <tr>" & vbNewline & _
   "   <td bgcolor=""" & strForumCellColor & """ colspan=""" & sGetColspan(6,5) & """>" & _
   "    <font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """>Top Posters: " & _
   "     <span class=""spnMessageText"">")
   for iPoster = 0 to ubound(arrTopPosters, 2)
       TopPoster_Name = chkString(arrTopPosters(0, iPoster), "display")
       TopPoster_ID = arrTopPosters(1, iPoster)
       TopPoster_Posts = arrTopPosters(2, iPoster)
       if iPoster > 0 then Response.write (", ")
       Response.write (profileLink(TopPoster_Name,TopPoster_Id) & "(" & TopPoster_Posts & " posts)")
   next
   Response.Write (vbNewLine & _		
   "     </span>.</font>" & vbNewline & _
   "    </td>" & vbNewline & _
   "   </tr>")	
end if
Erase arrTopPosters
TopPoster_Name = Empty
TopPoster_ID = Empty
TopPoster_Posts = Empty

Step 2:
Find the following statements on Lines 906-910

if ShowLastHere then
	Response.Write	"5"
else
	Response.Write	"4"
end if

Modify as below

if ShowLastHere then
	Response.Write	"6"
else
	Response.Write	"5"
end if


Note:
Make backup of your files before modifying/adding the code.
Post bugs and or help questions in the Mod Implementation Forum.


CSS and HTML4.01 Compilant Snitz Forum . ForumSquare . Rakesh Jain

It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.

Prayer Of Forgiveness
"I forgive all living beings. May all living beings forgive me!
I cherish the friendliness towards all and harbour enmity towards none." -- Aavashyaka Sutra(Translated)

Edited by - GauravBhabu on 13 October 2002 02:16:54

Airborne
Starting Member

38 Posts

Posted - 11 October 2002 :  19:04:40  Show Profile
That one works perfectly thanks
Go to Top of Page

user_99
Starting Member

Austria
10 Posts

Posted - 12 October 2002 :  13:40:24  Show Profile
Perfect work-looks great...

:-)

THX, Armin
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 12 October 2002 :  23:54:54  Show Profile  Visit dayve's Homepage
any screenshots or demos I can get a look at?

Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 13 October 2002 :  02:17:36  Show Profile
quote:
Originally posted by dayve

any screenshots or demos I can get a look at?


DEMO
username: snitz
password: snitz
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 13 October 2002 :  03:33:10  Show Profile  Visit dayve's Homepage
ahhh, now I see... thanks G.

Go to Top of Page

PingSpike
Starting Member

21 Posts

Posted - 13 October 2002 :  14:28:40  Show Profile
Hi, excellent mod (thanks very much!)

I editied one line so it doesn't show deleted members, nor does it show myself on my own forum.

Change:

if iPoster > 0 then Response.write (", ")
Response.write (profileLink(TopPoster_Name,TopPoster_Id) & " (" & TopPoster_Posts & "), ")


To:

If TopPoster_Name <> "n/a" And TopPoster_Name <> "PingSpike" Then
Response.write (profileLink(TopPoster_Name,TopPoster_Id) & " (" & TopPoster_Posts & "), ")
End If



Thanks again, excellent mod !

Go to Top of Page

Ez4arab
Junior Member

479 Posts

Posted - 22 October 2002 :  22:58:15  Show Profile  Visit Ez4arab's Homepage
if you want to reomve the admin and moderator form the top poster

strSql = "SELECT M_NAME, MEMBER_ID, M_POSTS, M_LEVEL " &_
"FROM " & strMemberTablePrefix & "MEMBERS " &_
"WHERE M_LEVEL =1" &_
" ORDER BY M_POSTS desc;"

Ez4arab web site Ez4arab |

Edited by - Ez4arab on 22 October 2002 23:23:43
Go to Top of Page

user_99
Starting Member

Austria
10 Posts

Posted - 23 October 2002 :  06:29:34  Show Profile
... works great!

thx armin
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 23 October 2002 :  17:51:32  Show Profile  Visit dayve's Homepage
quote:
Originally posted by Ez4arab

if you want to reomve the admin and moderator form the top poster

strSql = "SELECT M_NAME, MEMBER_ID, M_POSTS, M_LEVEL " &_
"FROM " & strMemberTablePrefix & "MEMBERS " &_
"WHERE M_LEVEL =1" &_
" ORDER BY M_POSTS desc;"




NEVER, NEVER, NEVER...!!! I worked too hard in order to not be shown!!!

Go to Top of Page

kwhipp
Junior Member

USA
407 Posts

Posted - 23 October 2002 :  18:42:38  Show Profile  Visit kwhipp's Homepage  Send kwhipp an AOL message  Send kwhipp an ICQ Message  Send kwhipp a Yahoo! Message
This is excellent!

I agree with dayve, this is one more chance to show my username.

- Kevin
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 23 October 2002 :  18:57:23  Show Profile
Admins are also humans
Go to Top of Page

Ez4arab
Junior Member

479 Posts

Posted - 23 October 2002 :  20:47:59  Show Profile  Visit Ez4arab's Homepage
quote:

NEVER, NEVER, NEVER...!!! I worked too hard in order to not be shown!!!


Dayve,
This will let member work hard to remove his name form the list of top poster

Ez4arab web site Ez4arab |
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.22 seconds. Powered By: Snitz Forums 2000 Version 3.4.07