The Forum has been Updated
The code has been upgraded to the latest .NET core version. Please check instructions in the Community Announcements about migrating your account.
نوشته شده در
i011877, search in progress.
Its a small change if I'm not mistaking.<
portfolio - linkshrinker - oxle - twitter
نوشته شده در
Found it! http://forum.snitz.com/forum/topic.asp?ARCHIVE=true&TOPIC_ID=47643
Old topic though, so be carefull.<
Old topic though, so be carefull.<
portfolio - linkshrinker - oxle - twitter
نوشته شده در
نوشته شده در
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.<
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
نوشته شده در
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
<
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
آخرین ویرایش توسط
نوشته شده در
Yep, I guess that would work.
alternatively you could do it like this:
in this way not only 'Moderator' would be disallowed, but also 'moderator' and 'moderAtor'.
<
Code:
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 = nothingportfolio - linkshrinker - oxle - twitter
آخرین ویرایش توسط
نوشته شده در
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
نوشته شده در
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.<
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
نوشته شده در
sorry, wrong track here.<
portfolio - linkshrinker - oxle - twitter
آخرین ویرایش توسط
نوشته شده در
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 thefact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Email Member
Message Member
Post Moderation
بارگزاری فایل
If you're having problems uploading, try choosing a smaller image.
پیشنمایش مطلب
Send Topic
Loading...
