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
Previous Page
Author Previous Topic Topic Next Topic
Page: of 2

Davecl
Junior Member

United Kingdom
105 Posts

Posted - 06 June 2006 :  08:01:36  Show Profile  Visit Davecl's Homepage  Reply with Quote
think I've done it

intRankLevel5 should be CInt(intRankLevel5)

just got to get a 5 star member to check it out now<

Dave
Go to Top of Page

i011877
Junior Member

Denmark
169 Posts

Posted - 07 July 2006 :  16:55:24  Show Profile  Visit i011877's Homepage  Reply with Quote
Ehrrmmm!
Could someone please sum this up?

I want to have all my users being able to change their title.<


Go to Top of Page

CalloftheHauntedMaster
Junior Member

289 Posts

Posted - 07 July 2006 :  17:03:02  Show Profile  Reply with Quote
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!
Go to Top of Page

Davecl
Junior Member

United Kingdom
105 Posts

Posted - 08 July 2006 :  01:04:20  Show Profile  Visit Davecl's Homepage  Reply with Quote
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
Go to Top of Page

i011877
Junior Member

Denmark
169 Posts

Posted - 09 July 2006 :  09:12:39  Show Profile  Visit i011877's Homepage  Reply with Quote
Ngggh!
Did not work

Could you have a look?

Included inc_profile.asp & pop_profile.asp
www.myforum.dk/profile.rar<


Go to Top of Page

Davecl
Junior Member

United Kingdom
105 Posts

Posted - 10 July 2006 :  04:09:52  Show Profile  Visit Davecl's Homepage  Reply with Quote
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
Go to Top of Page

i011877
Junior Member

Denmark
169 Posts

Posted - 10 July 2006 :  05:37:06  Show Profile  Visit i011877's Homepage  Reply with Quote
Nope did not work, ****!
Can not even show the profile, when I click a member.

Thanks for giving it a shot anyway <


Go to Top of Page

Davecl
Junior Member

United Kingdom
105 Posts

Posted - 11 July 2006 :  04:15:55  Show Profile  Visit Davecl's Homepage  Reply with Quote
mmm maybe some conflicting mods or something.. sorry i couldn't help<

Dave
Go to Top of Page

i011877
Junior Member

Denmark
169 Posts

Posted - 27 July 2006 :  15:56:33  Show Profile  Visit i011877's Homepage  Reply with Quote
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?<


Go to Top of Page

Davecl
Junior Member

United Kingdom
105 Posts

Posted - 28 July 2006 :  02:13:12  Show Profile  Visit Davecl's Homepage  Reply with Quote
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
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Previous 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.1 seconds. Powered By: Snitz Forums 2000 Version 3.4.07