Author |
Topic |
Davecl
Junior Member
United Kingdom
105 Posts |
Posted - 06 June 2006 : 08:01:36
|
think I've done it
intRankLevel5 should be CInt(intRankLevel5)
just got to get a 5 star member to check it out now< |
Dave |
|
|
i011877
Junior Member
Denmark
169 Posts |
Posted - 07 July 2006 : 16:55:24
|
Ehrrmmm! Could someone please sum this up?
I want to have all my users being able to change their title.< |
|
|
|
CalloftheHauntedMaster
Junior Member
289 Posts |
Posted - 07 July 2006 : 17:03:02
|
And while they're at it, can they explain how to create a post count level before users can change their own levels?< |
This account was hacked into by Image, a very honest guy as you all can see! Stealing people's passwords is his pasttime. Beware of this, before you register at his forums! |
|
|
Davecl
Junior Member
United Kingdom
105 Posts |
Posted - 08 July 2006 : 01:04:20
|
quote: Originally posted by i011877
Ehrrmmm! Could someone please sum this up?
I want to have all my users being able to change their title.
Got this working.
in inc_profile.asp find (approx line 260)
if strMode = "goModify" 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
add the code in green
if strMode = "goModify" or (strMode = "goEdit" and (rs("M_POSTS") >= CInt(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
you can change CInt(intRankLevel5) to any level you want so that different ranks of members can alter their titles.
in pop_profile.asp beginning at line 1158 find the following:
strSql = "UPDATE " & strMemberTablePrefix & "MEMBERS " if trim(Request.Form("Password")) <> "" then strPassword = sha256("" & Request.Form("Password")) strSql = strSql & " SET M_PASSWORD = '" & ChkString(strPassword,"SQLString") & "', " else strSql = strSql & " SET" end if strSql = strSql & " M_COUNTRY = '" & ChkString(Request.Form("Country"),"SQLString") & "', "
And add the following code immediately after it:
set rs = my_conn.Execute("SELECT M_POSTS FROM " & strMemberTablePrefix & "MEMBERS WHERE M_NAME = '" & ChkString(Request.Form("Name"), "SQLString") & "'") if rs("M_POSTS") >= CInt(intRankLevel5) or mlev > 2 then strSql = strSql & " M_TITLE = '" & ChkString(Request.Form("Title"),"SQLString") & "', " end if rs.Close set rs = nothing
this works fine for me, hope that's summed it up ok for you < |
Dave |
|
|
i011877
Junior Member
Denmark
169 Posts |
Posted - 09 July 2006 : 09:12:39
|
Ngggh! Did not work
Could you have a look?
Included inc_profile.asp & pop_profile.asp www.myforum.dk/profile.rar< |
|
|
|
Davecl
Junior Member
United Kingdom
105 Posts |
Posted - 10 July 2006 : 04:09:52
|
Try these
changes made at line 224 in inc_profile.asp 1204 in pop_profile.asp
www.parrotlinks.com/profile.rar
let me know when you got it then i can take it down< |
Dave |
Edited by - Davecl on 10 July 2006 04:11:06 |
|
|
i011877
Junior Member
Denmark
169 Posts |
Posted - 10 July 2006 : 05:37:06
|
Nope did not work, ****! Can not even show the profile, when I click a member.
Thanks for giving it a shot anyway < |
|
|
|
Davecl
Junior Member
United Kingdom
105 Posts |
Posted - 11 July 2006 : 04:15:55
|
mmm maybe some conflicting mods or something.. sorry i couldn't help< |
Dave |
|
|
i011877
Junior Member
Denmark
169 Posts |
Posted - 27 July 2006 : 15:56:33
|
inc_profile:
if strMode = "goModify" or (strMode = "goEdit" and (rs("M_POSTS") >= CInt(intRankLevel1) or rs("M_LEVEL") > 1 ))then
Response.Write " <tr>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ align=""right"" valign=""middle"" nowrap><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Titel:</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 pop_profile.asp:
set rs = my_conn.Execute("SELECT M_POSTS FROM " & strMemberTablePrefix & "MEMBERS WHERE M_NAME = '" & ChkString(Request.Form("Name"), "SQLString") & "'")
if rs("M_POSTS") >= CInt(intRankLevel1) then
strSql = strSql & " M_TITLE = '" & ChkString(Request.Form("Title"),"SQLString") & "', "
end if
rs.Close
set rs = nothing WORKED!
Is there a problem with this solution?< |
|
|
|
Davecl
Junior Member
United Kingdom
105 Posts |
Posted - 28 July 2006 : 02:13:12
|
can't see why this works yet it didn't before when all you've changed is the mlev check in pop_profile.asp which allowed mods & admins to change peoples titles.
can't see any problem with it though. < |
Dave |
|
|
Topic |
|