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)
 Moderator dropdown list
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Martijn
Starting Member

10 Posts

Posted - 02 April 2002 :  12:50:48  Show Profile
Hi, I've tried to design a dropdown list with the moderators of a certain forum on the default.asp page.
I couldn't get the code to work right.
My intention is to build a mod where you would be able to select the moderator from a dropdown list(and if selected, be transeferred to his profile page).

Can someone do this?

Raichelle
Junior Member

370 Posts

Posted - 02 April 2002 :  15:59:28  Show Profile
Ya I remember a while back and I asked about it and someone create a mod for it and im using it on my forum right now and It looks much better. Try doing a search and it should be around.

Also I suggest for you to check archive while doing a search because I believe it might have been archived but its still on snitz.

Go to Top of Page

Raichelle
Junior Member

370 Posts

Posted - 02 April 2002 :  16:02:32  Show Profile
Ok I did a search and found it for you

here http://forum.snitz.com/forum/topic.asp?ARCHIVE=true&TOPIC_ID=16339

Go to Top of Page

Nathan
Help Moderator

USA
7664 Posts

Posted - 02 April 2002 :  16:28:33  Show Profile  Visit Nathan's Homepage
I also did one.

Change the listForumModerators function in inc_functions.asp with this

function listForumModerators(fForum_ID)

dim strSql
dim rsChk

'## Forum_SQL
strSql = "SELECT " & strMemberTablePrefix & "MEMBERS.M_NAME, " & strMemberTablePrefix & "MEMBERS.MEMBER_ID" &_
" FROM " & strTablePrefix & "MODERATOR " &_
" , " & strMemberTablePrefix & "MEMBERS " &_
" WHERE (" & strTablePrefix & "MODERATOR.FORUM_ID = " & ChkString(fForum_ID, "SQLString") & ") " &_
" AND (" & strTablePrefix & "MODERATOR.MEMBER_ID = " & strMemberTablePrefix & "MEMBERS.MEMBER_ID )"

Set rsChk = Server.CreateObject("ADODB.Recordset")
rsChk.open strSql, my_Conn

if rsChk.EOF or not(ChkQuoteOk(fForum_ID)) then
listForumModerators = ""
exit function
end if
fMods = "<form name=""modform_" & fForum_ID & """>" & VBNewLine & _
"<select name=""sel"" size=""1"" onChange=""javascript:GetProfile(document.modform_" & fForum_ID & ".sel.options[document.modform_" & fForum_ID & ".sel.selectedIndex].value)"" style=""width:100px;"">" & VBNewLine & _
"<option>Moderators</option>" & VBNewLine
do until rsChk.EOF
fMods = fMods & "<option value=""pop_profile.asp?mode=display&id=" & rsChk("MEMBER_ID") & """>" & rsChk("M_NAME") & "</option>" & VBNewLine
rsChk.MoveNext
loop
fMods = fMods & "</select>" & VBNewLine & _
"</form>"
rsChk.close
set rsChk = nothing

listForumModerators = fMods
end function


And add this near the top of defatult.asp
<script language="JavaScript">
function GetProfile(URL){
if (URL != ""){
window.location.href = URL;
}
}
</script>


  Nathan Bales - Romans 15:13
----------------------------------

Snitz Exchange | Do's and Dont's


Edited by - Nathan on 03 April 2002 13:35:50
Go to Top of Page

Martijn
Starting Member

10 Posts

Posted - 03 April 2002 :  04:35:47  Show Profile
Whow, thank you guys!
Never could have done it

Go to Top of Page

Morten
Junior Member

Denmark
251 Posts

Posted - 03 April 2002 :  07:18:39  Show Profile
Nathan I get an script error by this, whereever I put the script on default.asp (I have replaced the function in inc_funtions.asp)

"document.modform.sel.options" is null or not an object
Code:0

I´m using MSIE 6.0 - do you know what this is ? or didn´t I find the right spot to place the script at default.asp ?

Morten

Go to Top of Page

Nathan
Help Moderator

USA
7664 Posts

Posted - 03 April 2002 :  13:37:36  Show Profile  Visit Nathan's Homepage
I had forgotten to account for multiple forums. The code is updated above, and tested with mutiple forums in IE 6.0 and Mozilla 0.9.9

  Nathan Bales - Romans 15:13
----------------------------------

Snitz Exchange | Do's and Dont's
Go to Top of Page

Martijn
Starting Member

10 Posts

Posted - 03 April 2002 :  15:21:21  Show Profile
quote:

I had forgotten to account for multiple forums. The code is updated above, and tested with mutiple forums in IE 6.0 and Mozilla 0.9.9

  Nathan Bales - Romans 15:13
----------------------------------

Snitz Exchange | Do's and Dont's




I'd modded the code myself, it works but in a different way, thanks anyway

Go to Top of Page

Morten
Junior Member

Denmark
251 Posts

Posted - 03 April 2002 :  20:24:36  Show Profile
Thanks Nathan, your fix made it!

Morten

<marquee>Bad marquee behavior, look what I take with me =><marquee>
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.32 seconds. Powered By: Snitz Forums 2000 Version 3.4.07