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/Code)
 Different Username Styles for Admins and Mods
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

cripto9t
Average Member

USA
881 Posts

Posted - 04 May 2008 :  13:05:16  Show Profile  Reply with Quote
Not sure what to call this mod, so for now it's the "User Class Mod". It's not very descriptive so if you have a better idea for a name, let me know.

What this mod does: Admin and Moderators Usernames are displayed using a different css style, i.e. (font color, weight, whatever), than normal users.

This mod adds a couple of new css classes, 1 for admins and 1 for mods, to the css in "inc_header.asp". A function then determines which class to use depending on the the members forum rank.

Download here May have to Right Click and Save

Files I've modified to use this.
  • default.asp
  • forum.asp
  • topic.asp
  • active.asp
  • members.asp

If I've missed any let me know.<

    _-/Cripto9t\-_

Edited by - cripto9t on 04 May 2008 13:06:22

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 04 May 2008 :  14:54:18  Show Profile  Reply with Quote
You missed a marker in forum.asp:

In your modified version, after line 455 (tM_NAME = 13), you need a marker line to identify the next line belongs to your changes.

In forum.asp; lines 543-545 need to be changed (the remark will not allow continuing):

Response.Write " </td>" & vbNewLine
'##USER_CLASS ## CHANGE line below ###################################################################################
Response.Write " <td bgcolor=""" & CColor & """ valign=""middle"" align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """><span class=""" & GetMembersColor(Topic_MLevel) & """>" & profileLink(chkString(Topic_MName,"display"),Topic_Author) & "</span></font></td>" & vbNewLine & _


Also, in default.asp; lines 1066 & 1068 need to be changed (the remark will not allow continuing):

"<font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """>Please welcome our newest member: "
'##USER_CLASS ## CHANGE line below ###############################################################################
Response.Write "<span class=""" & GetMembersColor(NewMember_Level) & """>" & profileLink(NewMember_Name,NewMember_Id) & "</span>.</font></td>" & vbNewline & _

<

Edited by - Carefree on 04 May 2008 15:48:36
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 04 May 2008 :  15:18:50  Show Profile  Reply with Quote
Also, I now get a subscript out-of-range (Number 3) error in this function, the error is on this line:
ModMemLev = fForumMod(3)

function listForumModerators(fForum_ID)
fForumMods = split(strForumMods,"|")
for iModerator = 0 to ubound(fForumMods)
fForumMod = split(fForumMods(iModerator),",")
ModForumID = fForumMod(0)
ModMemID = fForumMod(1)
ModMemName = fForumMod(2)
ModMemLev = fForumMod(3)
if cLng(ModForumID) = cLng(fForum_ID) then
if fMods = "" then
'##USER_CLASS ## CHANGE line below #################################################################################
fMods = "<nobr><span class=""" & GetMembersColor(ModMemLev) & """>" & profileLink(chkString(ModMemName,"display"),ModMemID) & "</span></nobr>"
else
'##USER_CLASS ## CHANGE line below #################################################################################
fMods = fMods & ", <nobr><span class=""" & GetMembersColor(ModMemLev) & """>" & profileLink(chkString(ModMemName,"display"),ModMemID) & "</span></nobr>"
end if
end if
next
if fMods = "" then fMods = " "
listForumModerators = fMods
end function


Should there have been a table change to the DBase?<
Go to Top of Page

cripto9t
Average Member

USA
881 Posts

Posted - 04 May 2008 :  16:51:04  Show Profile  Reply with Quote
Nope, no db changes. Let me look at the readme because everythings working fine for me.<

    _-/Cripto9t\-_
Go to Top of Page

cripto9t
Average Member

USA
881 Posts

Posted - 04 May 2008 :  17:09:39  Show Profile  Reply with Quote
Carefree I missed a few marks
Near the top of default.asp - Note that I changed the name of the variable "ModLev" to "ModMemLev" to be more consistant with existing code.
	if recModeratorCount = "" then
		fMods = " "
	else
		mFORUM_ID = 0
		mMEMBER_ID = 1
		mM_NAME = 2
'##USER_CLASS ## ADD line below #############################################################################
                mM_Lev = 3

		for iModerator = 0 to recModeratorCount
			ModForumID = allModeratorData(mFORUM_ID, iModerator)
			ModMemID = allModeratorData(mMEMBER_ID, iModerator)
			ModMemName = replace(allModeratorData(mM_NAME, iModerator),"|","#124")
'##USER_CLASS ## ADD line below ############################################################################
                        ModMemLev = cLng(allModeratorData(mM_Lev, iModerator))

			if iModerator = 0 then
'##USER_CLASS ## ADD "," & ModMemLev" to the line below ###################################################
				strForumMods = ModForumID & "," & ModMemID & "," & ModMemName & "," & ModMemLev
			else
'##USER_CLASS ## ADD "," & ModMemLev" to the line below ###################################################
				strForumMods = strForumMods & "|" & ModForumID & "," & ModMemID & "," & ModMemName & "," & ModMemLev
			end if
		next
	end if
end if

Thanks for pointing out my errors. I'm to leave the 2 marks that bring errors and point it out in the readme.<

    _-/Cripto9t\-_
Go to Top of Page

texanman
Junior Member

United States
410 Posts

Posted - 04 May 2008 :  23:18:41  Show Profile  Reply with Quote
Cripto9t thanks for your efforts.
<

Edited by - texanman on 05 May 2008 01:17:10
Go to Top of Page

texanman
Junior Member

United States
410 Posts

Posted - 05 May 2008 :  10:56:55  Show Profile  Reply with Quote
Hello Cripto9t:

I just implemented the Mod. It works except for this:
If the login name has space in it (e.g. Adam Smith), interestingly, the mod makes the admin/mod name bold but no change in color.

I believe I have made all the changes correctly.

Any input?

Thanks<

Edited by - texanman on 05 May 2008 11:39:07
Go to Top of Page

cripto9t
Average Member

USA
881 Posts

Posted - 05 May 2008 :  12:08:27  Show Profile  Reply with Quote
quote:
Originally posted by texanman

Hello Cripto9t:

I just implemented the Mod. It works except for this:
If the login name has space in it (e.g. Adam Smith), interestingly, the mod makes the admin/mod name bold but no change in color

I just tested this and it s working fine for me.
I would check the spelling of the color.
If your using the active users variable, check the source (html output) and make sure it has a value.<

    _-/Cripto9t\-_
Go to Top of Page

texanman
Junior Member

United States
410 Posts

Posted - 05 May 2008 :  13:35:22  Show Profile  Reply with Quote
Thanks for responding.

I am not using AU variables and I checked the color spelling and I went through the changes 3 times.
The only difference between my files and yours is in topic.asp where I made changes from this topic:

http://forum.snitz.com/forum/topic.asp?TOPIC_ID=66959

I am not sure if the problem from this.<
Go to Top of Page

texanman
Junior Member

United States
410 Posts

Posted - 05 May 2008 :  15:25:31  Show Profile  Reply with Quote
Found one more missing marker in Forum.asp line 480 after Topic_MName =
Still that doesn't solve my problem. There could be more missing markers?!<
Go to Top of Page

cripto9t
Average Member

USA
881 Posts

Posted - 05 May 2008 :  19:04:33  Show Profile  Reply with Quote
quote:
Originally posted by texanman

Found one more missing marker in Forum.asp line 480 after Topic_MName =
Still that doesn't solve my problem. There could be more missing markers?!


Thanks, the marker right above that is in the wrong place. It needs to be 1 line down.
		Topic_LastPostReplyID = arrTopicData(tT_LAST_POST_REPLY_ID, iTopic)
		Topic_MName = arrTopicData(tM_NAME, iTopic)
'##USER_CLASS ## ADD line below #################################################################################
                Topic_MLevel = arrTopicData(tM_LEVEL, iTopic)
		Topic_LastPostAuthorName = arrTopicData(tLAST_POST_AUTHOR_NAME, iTopic)
'##USER_CLASS ## ADD line below #################################################################################
                Topic_LastPostAuthorLevel = arrTopicData(tLAST_POST_AUTHOR_LEVEL, iTopic)

That might help, but the fact that the "bold" part works means the span and the css class are connecting.
Does it work with names without a space? Is it just happening on one page or every page?

If it's just one page, post a link to a txt file and I'll give it a look.<

    _-/Cripto9t\-_
Go to Top of Page

texanman
Junior Member

United States
410 Posts

Posted - 05 May 2008 :  20:19:34  Show Profile  Reply with Quote
Yes, works with names without space in all pages. The bold for names with space is also in all pages.<
Go to Top of Page
  Previous Topic Topic Next Topic  
 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.37 seconds. Powered By: Snitz Forums 2000 Version 3.4.07