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)
 Name moderators is forum in FORUM.ASP
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

zbenggg
Junior Member

Israel
227 Posts

Posted - 02 January 2003 :  16:58:17  Show Profile
Hello,

I want is in
forum.asp
show name's user's of moderators is forum

Example:



How ?

To thank

I love Israel

Edited by - ruirib on 02 January 2003 17:18:23

Hamlin
Advanced Member

United Kingdom
2386 Posts

Posted - 02 January 2003 :  16:59:56  Show Profile
When you say manager do you mean the forum moderators?
Go to Top of Page

zbenggg
Junior Member

Israel
227 Posts

Posted - 02 January 2003 :  17:01:13  Show Profile
Yes,
I edit my message...

I love Israel

Edited by - zbenggg on 02 January 2003 17:01:35
Go to Top of Page

Hamlin
Advanced Member

United Kingdom
2386 Posts

Posted - 02 January 2003 :  17:54:15  Show Profile
Forum.asp

This will display the moderator names, with a link to their profile at the top of forum.asp.

I think this is how you want it, if not just shout and I will play with it some more.

As a side note most/all of the code is taken from snitz forums default.asp.

Line 395-404 approx, add the code in red...



		"          </select>" & vbNewLine & _
		"          <input type=""hidden"" name=""Cookie"" value=""1"">" & vbNewLine & _
		"          </td></form>" & vbNewLine & _
		"        </tr>" & vbNewLine

Dim strForumMods : strForumMods = GetForumMods(FORUM_ID)
'@-Only show extra row if we have mods
if len(strForumMods) > 0 then
response.write	"	<tr>" & vbNewLine &_
		"	 <td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" &_
			 strForumMods &_
		"	</font></td>" & vbNewLine &_
		"	</tr>"
end if

if maxpages > 1 then
	Response.Write	"        <tr>" & vbNewLine & _
			"          <td colspan=""3"" align=""right"" valign=""bottom"">" & vbNewLine & _
			"            <table border=""0"" align=""right"">" & vbNewLine & _
			"              <tr>" & vbNewLine
	Call DropDownPaging(1)



Then at the end of the file, but above the last %> add this function.



Function GetForumMods(FORUM_ID)
Dim strSQl    
Dim rsMods : Set rsMods = Server.CreateObject("ADODB.Recordset")
Dim strReturn : strReturn = "Moderators&nbsp;:&nbsp;"

strSql ="SELECT ME.MEMBER_ID, ME.M_NAME " & _
	" FROM " & strTablePrefix & "MODERATOR MO" & _
	" , " & strMemberTablePrefix & "MEMBERS ME"  & _
	" WHERE (MO.MEMBER_ID = ME.MEMBER_ID) AND (MO.FORUM_ID = " & chkString(FORUM_ID,"SQLSTRING") & ")" & _
	" ORDER BY ME.M_NAME"
	
	rsMods.open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText
		
	if rsMods.EOF then
		recModeratorCount = ""
	else
		allModeratorData = rsMods.GetRows(adGetRowsRest)
		recModeratorCount = UBound(allModeratorData,2)
	end if

	rsMods.close
	set rsMods = nothing

	if recModeratorCount = "" then
		strReturn = ""
	else
		mMEMBER_ID = 0
		mM_NAME = 1

		for iModerator = 0 to recModeratorCount
			ModMemID = allModeratorData(mMEMBER_ID, iModerator)
			ModMemName = allModeratorData(mM_NAME, iModerator)
                        
			strReturn = strReturn &	"<a href=""pop_profile.asp?mode=display&id=" & ModMemID & """" & dWStatus("View " & chkString(ModMemName,"display") & "'s profile") & " tabindex=""-1""><acronym title=""View " & chkString(ModMemName,"display") & "'s profile"">" & chkString(ModMemName,"display") & "</acronym></a>" & vbNewline                        
			
		next
	end if	
				  
GetForumMods = strReturn    
End Function



EDIT - changed some code, and again

Edited by - Hamlin on 02 January 2003 18:11:30
Go to Top of Page

zbenggg
Junior Member

Israel
227 Posts

Posted - 02 January 2003 :  18:15:11  Show Profile
quote:
Originally posted by Hamlin

Forum.asp

Then at the end of the file, but above the last %> add this function.



Function GetForumMods(FORUM_ID)
Dim strSQl    
Dim rsMods : Set rsMods = Server.CreateObject("ADODB.Recordset")
Dim strReturn : strReturn = "Moderators&nbsp;:&nbsp;"

strSql ="SELECT ME.MEMBER_ID, ME.M_NAME " & _
	" FROM " & strTablePrefix & "MODERATOR MO" & _
	" , " & strMemberTablePrefix & "MEMBERS ME"  & _
	" WHERE (MO.MEMBER_ID = ME.MEMBER_ID) AND (MO.FORUM_ID = " & chkString(FORUM_ID,"SQLSTRING") & ")" & _
	" ORDER BY ME.M_NAME"
	
	rsMods.open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText
		
	if rsMods.EOF then
		recModeratorCount = ""
	else
		allModeratorData = rsMods.GetRows(adGetRowsRest)
		recModeratorCount = UBound(allModeratorData,2)
	end if

	rsMods.close
	set rsMods = nothing

	if recModeratorCount = "" then
		strReturn = ""
	else
		mMEMBER_ID = 0
		mM_NAME = 1

		for iModerator = 0 to recModeratorCount
			ModMemID = allModeratorData(mMEMBER_ID, iModerator)
			ModMemName = allModeratorData(mM_NAME, iModerator)
                        
			strReturn = strReturn &	"<a href=""pop_profile.asp?mode=display&id=" & ModMemID & """" & dWStatus("View " & chkString(ModMemName,"display") & "'s profile") & " tabindex=""-1""><acronym title=""View " & chkString(ModMemName,"display") & "'s profile"">" & chkString(ModMemName,"display") & "</acronym></a>" & vbNewline                        
			
		next
	end if	
				  
GetForumMods = strReturn    
End Function



EDIT - changed some code, and again



I not to understand
is thanks

I love Israel
Go to Top of Page

zbenggg
Junior Member

Israel
227 Posts

Posted - 02 January 2003 :  18:19:50  Show Profile
YESSSSSSSSSSSSSSSSSSSSSS...
thank you very much

I love Israel
Go to Top of Page

Hamlin
Advanced Member

United Kingdom
2386 Posts

Posted - 02 January 2003 :  18:22:08  Show Profile
Your welcome
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.33 seconds. Powered By: Snitz Forums 2000 Version 3.4.07