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)
 Users changing their own title..
 New Topic  Reply to Topic
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

i011877
Junior Member

Denmark
169 Posts

Posted - 23 May 2006 :  08:57:20  Show Profile  Visit i011877's Homepage  Reply with Quote
Hmm this is not actually a MOD, but kindda..
I have seen this topic before, but are not able to find it

How do I change the code, so that users can change their own title in their profile?

Anyone..<


MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 23 May 2006 :  10:47:28  Show Profile  Visit MarcelG's Homepage  Reply with Quote
i011877, search in progress.
Its a small change if I'm not mistaking.<

portfolio - linkshrinker - oxle - twitter
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 23 May 2006 :  10:49:39  Show Profile  Visit MarcelG's Homepage  Reply with Quote
Found it! http://forum.snitz.com/forum/topic.asp?ARCHIVE=true&TOPIC_ID=47643
Old topic though, so be carefull.<

portfolio - linkshrinker - oxle - twitter
Go to Top of Page

i011877
Junior Member

Denmark
169 Posts

Posted - 23 May 2006 :  12:30:27  Show Profile  Visit i011877's Homepage  Reply with Quote
Thanks mate!

I'll get right to it <


Go to Top of Page

Davecl
Junior Member

United Kingdom
105 Posts

Posted - 24 May 2006 :  10:24:09  Show Profile  Visit Davecl's Homepage  Reply with Quote
I have implemented these changes and they seem to work fine

However I was wondering if there is a way to restrict what titles people can use.. e.g they cannot use "moderator" or "admin" or any other that i wish them not to use.

Thanks.<

Dave
Go to Top of Page

Davecl
Junior Member

United Kingdom
105 Posts

Posted - 25 May 2006 :  01:30:48  Show Profile  Visit Davecl's Homepage  Reply with Quote
would this work??

set rs = my_conn.Execute("SELECT M_POSTS FROM " & strMemberTablePrefix & "MEMBERS WHERE M_NAME = '" & ChkString(Request.Form("Name"), "SQLString") & "'")
if rs("M_POSTS") >= intRankLevel5 or mlev > 2 and Request.Form("Title")<> "Moderator" then
strSql = strSql & " M_TITLE = '" & ChkString(Request.Form("Title"),"SQLString") & "', "
end if
rs.Close
set rs = nothing
<

Dave

Edited by - Davecl on 25 May 2006 01:31:19
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 25 May 2006 :  07:59:13  Show Profile  Visit MarcelG's Homepage  Reply with Quote
Yep, I guess that would work.
alternatively you could do it like this:
set rs = my_conn.Execute("SELECT M_POSTS FROM " & strMemberTablePrefix & "MEMBERS WHERE M_NAME = '" & ChkString(Request.Form("Name"), "SQLString") & "'")
if rs("M_POSTS") >= intRankLevel5 or mlev > 2 and (lcase(Request.Form("Title")) <> "moderator" and  _
lcase(Request.Form("Title")) <> "admin" and _
lcase(Request.Form("Title")) <> "administrator" and _
lcase(Request.Form("Title")) <> "mod") then
strSql = strSql & " M_TITLE = '" & ChkString(Request.Form("Title"),"SQLString") & "', "
end if
rs.Close
set rs = nothing

in this way not only 'Moderator' would be disallowed, but also 'moderator' and 'moderAtor'.
<

portfolio - linkshrinker - oxle - twitter

Edited by - MarcelG on 25 May 2006 08:01:50
Go to Top of Page

Davecl
Junior Member

United Kingdom
105 Posts

Posted - 25 May 2006 :  10:00:22  Show Profile  Visit Davecl's Homepage  Reply with Quote
Thanks Marcel, that was my next question.. how do I make a list of all titles that can't be used
I'll get on with that now.<

Dave
Go to Top of Page

Davecl
Junior Member

United Kingdom
105 Posts

Posted - 26 May 2006 :  08:51:54  Show Profile  Visit Davecl's Homepage  Reply with Quote
oh dear

i got a 5 star member to try and change his title but the field is not showing up when he edits his profile, this is the code in inc_profile.asp

if strMode = "goModify" or (strMode = "goEdit" and (rs("M_POSTS") >= intRankLevel5 or rs("M_LEVEL") > 1 )) then
Response.Write " <tr>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ align=""right"" valign=""middle"" nowrap><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Title: </font></b></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><input name=""Title"" size=""25"" maxLength=""50"" value=""" & CleanCode(rs("M_TITLE")) & """></font></td>" & vbNewLine & _
" </tr>" & vbNewLine
end if


it works fine for me but i am obviously the forum admin, it's just not showing up for 5 star members apparently.<

Dave
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 26 May 2006 :  09:35:31  Show Profile  Visit MarcelG's Homepage  Reply with Quote
Dave, when a normal member edits his profile the mode isn't goEdit, but Edit afaik.
So, strMode = "goEdit" should be strMode = "Edit"


sorry, wrong track here.<

portfolio - linkshrinker - oxle - twitter

Edited by - MarcelG on 26 May 2006 09:36:21
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 26 May 2006 :  09:49:49  Show Profile  Reply with Quote
quote:
Originally posted by MarcelG
in this way not only 'Moderator' would be disallowed, but also 'moderator' and 'moderAtor'.
If you're on a Windows machine, VBScript is not case sensitive (don't know about components on other OSes), so no need for the lower case.

Was also going to say that I'd posted the necessary changes for this a while back but I just spotted that that's what ye're working from!

<

Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

Davecl
Junior Member

United Kingdom
105 Posts

Posted - 27 May 2006 :  01:06:52  Show Profile  Visit Davecl's Homepage  Reply with Quote
Shaggy, I know you posted this method originally, here

http://forum.snitz.com/forum/topic.asp?ARCHIVE=true&TOPIC_ID=47643&whichpage=1

and I wonder if you have any ideas as to why it will let me (Admin) change my title but not my 5 star members??

Thanks<

Dave
Go to Top of Page

Davecl
Junior Member

United Kingdom
105 Posts

Posted - 29 May 2006 :  03:13:42  Show Profile  Visit Davecl's Homepage  Reply with Quote
bump<

Dave
Go to Top of Page

Davecl
Junior Member

United Kingdom
105 Posts

Posted - 03 June 2006 :  03:19:10  Show Profile  Visit Davecl's Homepage  Reply with Quote
still struggling with this <

Dave

Edited by - Davecl on 03 June 2006 03:19:35
Go to Top of Page

Davecl
Junior Member

United Kingdom
105 Posts

Posted - 06 June 2006 :  06:43:51  Show Profile  Visit Davecl's Homepage  Reply with Quote
if strMode = "goModify" or (strMode = "goEdit" and (rs("M_POSTS") >= intRankLevel5 or rs("M_LEVEL") > 1 )) then
Response.Write " <tr>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ align=""right"" valign=""middle"" nowrap><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Title: </font></b></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><input name=""Title"" size=""25"" maxLength=""50"" value=""" & CleanCode(rs("M_TITLE")) & """></font></td>" & vbNewLine & _
" </tr>" & vbNewLine
end if

could it be because rs("M_TITLE") doesn't actually contain a value until their title has been edited??<

Dave
Go to Top of Page

Davecl
Junior Member

United Kingdom
105 Posts

Posted - 06 June 2006 :  07:29:00  Show Profile  Visit Davecl's Homepage  Reply with Quote
nope, checked that out.

this is really annoying now.. i have changed intRankLevel5 to 0 so in theory anybody can change their title but the "Title" field still doesn't show up.
If I remove the intRankLevel check it works fine<

Dave
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.28 seconds. Powered By: Snitz Forums 2000 Version 3.4.07