Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 admin level revisited (SiSL)
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

zerakh
Junior Member

120 Posts

Posted - 01 October 2005 :  10:16:01  Show Profile
I just tried this out and had a few problems. I followed the directions and installed it.

When I try and edit my members, I receive an error::

Expected end of statement

/forum/inc_profile.asp, line 507

"                      <td bgColor=""" & strPopUpTableColor """ align=""right"" valign=""middle"" nowrap><b><font face=""" & strDefaultFontFace """ size="" strDefaultFontSize """>Admin Levels: </font></b></td>" & vbNewLine & _
------------------------------------------------------------^




I looked at other places where this code occurs, and it has the same code, but when I remove the " it still gives me the error in the same location.

How do I go about changing it?

also...I noticed this in the original admin level mod- where does the link for admin options go?

before installing this, I have my link (admin options) listed below the login, but after I install this I lose that link. how can I get this back- otherwise its just plain annoying to try and do admin functions.

muzishun
Senior Member

United States
1079 Posts

Posted - 01 October 2005 :  10:28:57  Show Profile  Visit muzishun's Homepage
You're just missing a couple of "&"'s in there along with one ". It should look like this:

"                      <td bgColor=""" & strPopUpTableColor & """ align=""right"" valign=""middle"" nowrap><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Admin Levels: </font></b></td>" & vbNewLine & _

Bill Parrott
Senior Web Programmer, University of Kansas
Co-Owner and Code Monkey, Eternal Second Designs (www.eternalsecond.com)
Personal Website (www.chimericdream.com)
Go to Top of Page

SiSL
Average Member

Turkey
671 Posts

Posted - 01 October 2005 :  10:44:00  Show Profile  Visit SiSL's Homepage
Okay, I found out my Editor program has eaten a lot of "&"'s and ")"'s during putting them on text area.. I'll fix install file again

CHIP Online Forum

My Mods
Select All Code | Fix a vulnerability for your private messages | Avatar Categories W/ Avatar Gallery Mod | Complaint Manager
Admin Level Revisited | Merge Forums | No More Nested Quotes Mod
Go to Top of Page

zerakh
Junior Member

120 Posts

Posted - 01 October 2005 :  10:47:29  Show Profile
how about this one::

Expected end of statement

/forum/inc_profile.asp, line 513

Response.Write	"                      <font face=""" & strDefaultFontFace & """ size="" & strDefaultFontSize & """>Forum Master: </font>" & vbNewLine & _
-------------------------------------------------------------------------------------------------------------------------^
Go to Top of Page

SiSL
Average Member

Turkey
671 Posts

Posted - 01 October 2005 :  10:48:38  Show Profile  Visit SiSL's Homepage
For there should be like this for quick reference:

Response.Write	"                    <tr>" & vbNewLine & _
				"                      <td bgColor=""" & strPopUpTableColor & """ align=""right"" valign=""middle"" nowrap><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Admin Levels: </font></b></td>" & vbNewLine & _
				"                      <td bgColor=""" & strPopUpTableColor & """ valign=""top"">" & vbNewLine
	
		EditingAdminLevel = CLng(getALevel(strDBNTUserName, Request.Cookies(strUniqueID & "User")("Pword")))	
		if rs("MEMBER_ID") = intAdminMemberID or EditingAdminLevel <= rs("M_ALEVEL") then
			if rs("MEMBER_ID") = intAdminMemberID then 
				Response.Write	"                      <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>FORUM MASTER</font>" & vbNewLine & _
						"                      <input type=""hidden"" value=""" & rs("M_ALEVEL") & """ name=""ALevel"">" & vbNewLine
			else 
				Response.Write	"                      <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" 
				if rs("M_ALEVEL") = 3 Then Response.Write "FORUM MASTER"
				if rs("M_ALEVEL") = 2 Then Response.Write "Super Admin"
				if rs("M_ALEVEL") = 1 Then Response.Write "Maintenance Admin"
				if rs("M_ALEVEL") = 0 Then Response.Write "Global Moderator"
				
				Response.Write  "</font>" & vbNewLine & _
						"                      <input type=""hidden"" value=""" & rs("M_ALEVEL") & """ name=""ALevel"">" & vbNewLine
			end if
		else
			
			Response.Write	"                      <select value=""1"" name=""ALevel"">" & vbNewLine & _
					"                           <option value=""0"""

				if rs("M_ALEVEL") = 0 then Response.Write(" selected")
						Response.Write	">Global Moderator</option>" & vbNewLine 
				if EditingAdminLevel > 1 Then
						Response.Write		"                           <option value=""1"""
						if rs("M_ALEVEL") = 1 then Response.Write(" selected")
						Response.Write	">Maintenance Admin</option>" & vbNewLine 
				End If
				if EditingAdminLevel > 2 Then
					Response.Write		"                           <option value=""2"""
					if rs("M_ALEVEL") = 2 then Response.Write(" selected")
					Response.Write	">Super Admin</option>" & vbNewLine 
				End If					
			Response.Write "                      </select>" & vbNewLine
		
		end if
		Response.Write	"                      </td>" & vbNewLine & _
				"                    </tr>" & vbNewLine

CHIP Online Forum

My Mods
Select All Code | Fix a vulnerability for your private messages | Avatar Categories W/ Avatar Gallery Mod | Complaint Manager
Admin Level Revisited | Merge Forums | No More Nested Quotes Mod
Go to Top of Page

SiSL
Average Member

Turkey
671 Posts

Posted - 01 October 2005 :  10:50:52  Show Profile  Visit SiSL's Homepage
quote:
Originally posted by zerakh

how about this one::

Expected end of statement

/forum/inc_profile.asp, line 513

Response.Write	"                      <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Forum Master: </font>" & vbNewLine & _
-------------------------------------------------------------------------------------------------------------------------^




It should be with trpile """, I'm checking all codes now on Install file (Did I have to say I hate WSYWYG editors?

CHIP Online Forum

My Mods
Select All Code | Fix a vulnerability for your private messages | Avatar Categories W/ Avatar Gallery Mod | Complaint Manager
Admin Level Revisited | Merge Forums | No More Nested Quotes Mod
Go to Top of Page

SiSL
Average Member

Turkey
671 Posts

Posted - 01 October 2005 :  10:57:09  Show Profile  Visit SiSL's Homepage
Please inform me if you have other problems because of my stupidity posting codes in Dreamweaver >:/

CHIP Online Forum

My Mods
Select All Code | Fix a vulnerability for your private messages | Avatar Categories W/ Avatar Gallery Mod | Complaint Manager
Admin Level Revisited | Merge Forums | No More Nested Quotes Mod
Go to Top of Page

SiSL
Average Member

Turkey
671 Posts

Posted - 01 October 2005 :  11:11:23  Show Profile  Visit SiSL's Homepage
quote:
Originally posted by zerakh

also...I noticed this in the original admin level mod- where does the link for admin options go?

before installing this, I have my link (admin options) listed below the login, but after I install this I lose that link. how can I get this back- otherwise its just plain annoying to try and do admin functions.



OK, for admin functions for you to get back, you must "manually" edit your database MEMBERS table.

1. Find the row that your username at (if you are the one that installed Snitz first time, it should be first row of MEMBERS table)

2. Go to M_ALEVEL coloumn at this row and type 3 you will have all admin options and admin options link.

CHIP Online Forum

My Mods
Select All Code | Fix a vulnerability for your private messages | Avatar Categories W/ Avatar Gallery Mod | Complaint Manager
Admin Level Revisited | Merge Forums | No More Nested Quotes Mod

Edited by - SiSL on 01 October 2005 11:13:17
Go to Top of Page

zerakh
Junior Member

120 Posts

Posted - 01 October 2005 :  11:13:29  Show Profile
ok...that seemed to work....I guess the guide that you wrote were missing those.

now- my other question comes in:: how do I get the link for admin options back?

In order to change the user to a specific administrator- I added in a dropdown box.

	Response.Write	"                      <select value=""1"" name=""Level""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
                                                "                           <option value=""1"""
				if rs("M_ALEVEL") = 3 Then Response.Write (" selected")     
			        Response.Write	">FORUM MASTER</option>" & vbNewLine & _
				       		"			   <option value=""2"""
				if rs("M_ALEVEL") = 2 Then Response.Write (" selected")     
			        Response.Write	">Super Admin</option>" & vbNewLine & _
				       	       "			   <option value=""3"""
				if rs("M_ALEVEL") = 1 Then Response.Write (" selected")     
			        Response.Write	">Maintenance Admin</option>" & vbNewLine & _
				       	       "			   <option value=""4"""   
				if rs("M_ALEVEL") = 0 Then Response.Write (" selected")     
			        Response.Write	">Global Moderator</option>" & vbNewLine & _  
			    		    	"                      </select>" & vbNewLine 
				       					


now...I did that in order to allow me to change the admin level of the person instead of just seeing the name:: global moderator written.
after doing this, I received this error:

quote:

Type mismatch: 'cLng'

/forum/pop_profile.asp, line 1535



line 1535 and then some::
strSql = strSql & ", M_LEVEL = " & cLng("0" & Request.Form("Level"))       
										' ######### ADMIN LEVELS ##########
					EditingAdminLevel = cLng(getALevel(strDBNTUserName, Request.Cookies(strUniqueID & "User")("Pword")))
					RequestAdminLevel = cLng("0" & Request.Form("ALevel"))
					if  IsAdminAllowed(strDBNTUserName, Request.Cookies(strUniqueID & "User")("Pword"),-1)=1 AND EditingAdminLevel > RequestAdminLevel then 
						strSql = strSql & ", M_ALEVEL = " & cLng("0" & Request.Form("ALevel"))
					end if
					' #################################
Go to Top of Page

zerakh
Junior Member

120 Posts

Posted - 01 October 2005 :  11:17:52  Show Profile
in regards to the database- how would I be able to edit it? either I get a blank page or some odd block symbols.
Go to Top of Page

SiSL
Average Member

Turkey
671 Posts

Posted - 01 October 2005 :  11:18:41  Show Profile  Visit SiSL's Homepage
ALEVEL should be select name, which type of database do you use?

CHIP Online Forum

My Mods
Select All Code | Fix a vulnerability for your private messages | Avatar Categories W/ Avatar Gallery Mod | Complaint Manager
Admin Level Revisited | Merge Forums | No More Nested Quotes Mod

Edited by - SiSL on 01 October 2005 11:19:38
Go to Top of Page

zerakh
Junior Member

120 Posts

Posted - 01 October 2005 :  11:20:31  Show Profile
I use access at the moment
Go to Top of Page

SiSL
Average Member

Turkey
671 Posts

Posted - 01 October 2005 :  11:21:24  Show Profile  Visit SiSL's Homepage
Do you have MS Access installed (from Office)?

CHIP Online Forum

My Mods
Select All Code | Fix a vulnerability for your private messages | Avatar Categories W/ Avatar Gallery Mod | Complaint Manager
Admin Level Revisited | Merge Forums | No More Nested Quotes Mod
Go to Top of Page

SiSL
Average Member

Turkey
671 Posts

Posted - 01 October 2005 :  11:29:39  Show Profile  Visit SiSL's Homepage
If you don't, you can do following...

Create a text file and rename its extension to asp. (eg. onetimeuse.asp)

Open it with text editor and type following. Don't forget to change yourusername part into your own forum name

<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="inc_header.asp" -->
strSql = "UPDATE " & strTablePrefix & "MEMBERS SET M_ALEVEL=3 WHERE"
strSql = strSql & " M_NAME='yourusername'"

my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords


Upload to your forum directory, run and delete after.

CHIP Online Forum

My Mods
Select All Code | Fix a vulnerability for your private messages | Avatar Categories W/ Avatar Gallery Mod | Complaint Manager
Admin Level Revisited | Merge Forums | No More Nested Quotes Mod
Go to Top of Page

zerakh
Junior Member

120 Posts

Posted - 01 October 2005 :  12:13:48  Show Profile
ok- that seemed to do the trick (almost :P)

I still cant get the link for the admin options.




Go to Top of Page

SiSL
Average Member

Turkey
671 Posts

Posted - 01 October 2005 :  12:52:08  Show Profile  Visit SiSL's Homepage
Weird really :( Did you previously installed this mod?

In inc_header.asp Did you add
	if mLev = 4 then aAllowed = cLng(IsAdminAllowed(strDBNTUserName, Request.Cookies(strUniqueID & "User")("Pword"),-1))


under this ?

mLev = cLng(chkUser(strDBNTUserName, Request.Cookies(strUniqueID & "User")("Pword"),-1))



I mean did you do step 3 and 4 ?

CHIP Online Forum

My Mods
Select All Code | Fix a vulnerability for your private messages | Avatar Categories W/ Avatar Gallery Mod | Complaint Manager
Admin Level Revisited | Merge Forums | No More Nested Quotes Mod

Edited by - SiSL on 01 October 2005 13:02:27
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.36 seconds. Powered By: Snitz Forums 2000 Version 3.4.07