Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Admin name different colour to other users?

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!
Before posting, make sure you have read this topic!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
CharlyMIS Posted - 01 May 2008 : 12:43:37
Have searched in various different ways, didn't find what I was looking for

I was wondering if anyone has tried this... I'd like my username on my forum to be a different colour to the usernames of other members. I've got the Active Users mod installed and I'm a different colour there, but I'd like to carry this over and be a different colour in the main forum as well.

For example, here on Snitz, all the usernames show up as dark blue on the left hand side of the posts, and normal blue in the 'Author' field when looking at a certain forum. I'd like to be able to change that to a different colour for Admin on my forum.

Is it possible, and how difficult is it, and what do I need to do?

I'm using the latest version, 3.4.06. Thanks in advance for any help - if I've missed out anything you need to know, please ask <
10   L A T E S T    R E P L I E S    (Newest First)
cripto9t Posted - 04 May 2008 : 16:40:21
I just didn't experiment enough .

This doesn't work
"a.admin:link {color:red;}" & vbNewLine & _
                "a.admin:visited {color:red;}" & vbNewLine & _
                "a.admin:hover {color:red;}" & vbNewLine & _
                "a.admin:active {color:red;}" & vbNewLine & _
                ".spnMessageText a:link    {color:" & strForumLinkColor & ";text-decoration:" & strForumLinkTextDecoration & "}" & vbNewLine & _
		".spnMessageText a:visited {color:" & strForumVisitedLinkColor & ";text-decoration:" & strForumVisitedTextDecoration & "}" & vbNewLine & _
		".spnMessageText a:hover   {color:" & strForumHoverFontColor & ";text-decoration:" & strForumHoverTextDecoration & "}" & vbNewLine & _
		".spnMessageText a:active  {color:" & strForumActiveLinkColor & ";text-decoration:" & strForumActiveTextDecoration & "}" & vbNewLine & _
		".spnSearchHighlight {background-color:" & strSearchHiLiteColor & "}" & vbNewLine & _

This does. As you can see, the anchor class has to follow the span class
		".spnMessageText a:link    {color:" & strForumLinkColor & ";text-decoration:" & strForumLinkTextDecoration & "}" & vbNewLine & _
		".spnMessageText a:visited {color:" & strForumVisitedLinkColor & ";text-decoration:" & strForumVisitedTextDecoration & "}" & vbNewLine & _
		".spnMessageText a:hover   {color:" & strForumHoverFontColor & ";text-decoration:" & strForumHoverTextDecoration & "}" & vbNewLine & _
		".spnMessageText a:active  {color:" & strForumActiveLinkColor & ";text-decoration:" & strForumActiveTextDecoration & "}" & vbNewLine & _

                "a.admin:link {color:red;}" & vbNewLine & _
                "a.admin:visited {color:red;}" & vbNewLine & _
                "a.admin:hover {color:red;}" & vbNewLine & _
                "a.admin:active {color:red;}" & vbNewLine & _


this is what I was trying to use which doesn't work no matter where you place it.
	        ".admin a:link    {color:red;}" & vbNewLine & _
		".admin a:visited {color:red;}" & vbNewLine & _
		".admin a:hover   {color:red;}" & vbNewLine & _
		".admin a:active  {color:red;}" & vbNewLine & _

and this works no matter where you place it
".spnMessageText a:link.admin1 {color:red;}" & vbNewLine & _
                ".spnMessageText a:visited.admin1 {color:red;}" & vbNewLine & _
                ".spnMessageText a:hover.admin1 {color:red;}" & vbNewLine & _
                ".spnMessageText a:active.admin1 {color:red;}" & vbNewLine & _

Think "cascade" and css isn't that frustrating .<
cripto9t Posted - 04 May 2008 : 13:08:52
Posted download link in the w/code forum
<
cripto9t Posted - 04 May 2008 : 10:03:46
I tried something similar to what chopper posted and it wouldn't work.
The anchor class wouldn't trump the span class. testing with ie6 and firefox2?.

So I went a different route and wrote a little function to get the class in the span tag based on M_Level.
Its a little more db friendly also.
So far I've just made the changes to default.asp.
I'll post something a little later when I have more.<
texanman Posted - 03 May 2008 : 23:37:38
I tried it, it doesn't change the colors.Imean Chopper's version doesn't do anyting.<
phy1729 Posted - 03 May 2008 : 23:18:13
SQL could be shortened to

strSql = "SELECT M_LEVEL "
   strSql = strSql & "FROM " & strMemberTablePrefix & "MEMBERS "
   strSql = strSql & "WHERE MEMBER_ID = " & fID
<
Etymon Posted - 03 May 2008 : 22:20:35
Also, if you create a variable instead of using the record set rsLink2("M_LEVEL"), that will help you some. Something like will work:

Dim AdminColor
AdminColor = rsLink2("M_LEVEL")


if fID = intAdminMemberID then
LinkLevelStyle = "class=""strAdminStyle2"""
elseif AdminColor = 3 then
LinkLevelStyle = "class=""strAdminStyle2"""
elseif AdminColor = 2 then
LinkLevelStyle = "class=""strModoStyle2"""
else
LinkLevelStyle = ""
end if

<
Etymon Posted - 03 May 2008 : 21:54:01
The above will work. I have done something similar for my wife's site. I applied the same for a larger site, and it took a performance hit. You may want to keep track of your access times (in the footer [if you have the time activated]). Keep track of when you first installed the code and then monitor it as your site grows. The above code is a little different than mine, so I am sure it may bring different results for you.<
Chopper Posted - 03 May 2008 : 18:07:42
in inc_func_common.asp

Replace

function profileLink(fName, fID)
	if instr(fName,"img src=") > 0 then
		strExtraStuff = ""
	else
		strExtraStuff = " title=""View " & fName & "'s Profile""" & dWStatus("View " & fName & "'s Profile")
	end if
	if strUseExtendedProfile then
		strReturn = "<a href=""pop_profile.asp?mode=display&id=" & fID & """" & strExtraStuff & ">"
	else
		strReturn = "<a href=""JavaScript:openWindow3('pop_profile.asp?mode=display&id=" & fID & "')""" & strExtraStuff & ">"
	end if
	profileLink = strReturn & fName & "</a>"
end function


With

function profileLink(fName, fID)
	if instr(fName,"img src=") > 0 then
		strExtraStuff = ""
	else
		strExtraStuff = " title=""View " & fName & "'s Profile""" & dWStatus("View " & fName & "'s Profile")
	end if

   '## Forum SQL - Get user status
   strSql = "SELECT M_LEVEL "
   strSql = strSql & "FROM " & strMemberTablePrefix & "MEMBERS "
   strSql = strSql & "WHERE MEMBER_ID = " & fID & " "
   strSql = strSql & "AND M_NAME = '" & fName & "' "
   strSql = strSql & "AND M_STATUS = " & 1

   Set rsLink2 = my_Conn.Execute(strSql)

   if rsLink2.EOF or rsLink2.BOF then
      LinkLevelStyle = ""
   else
      if fID = intAdminMemberID then
         LinkLevelStyle = "class=""strAdminStyle2"""
      elseif rsLink2("M_LEVEL") = 3 then
         LinkLevelStyle = "class=""strAdminStyle2"""
      elseif rsLink2("M_LEVEL") = 2 then
         LinkLevelStyle = "class=""strModoStyle2"""
      else
         LinkLevelStyle = ""
      end if
   end if

   rsLink2.Close
   Set rsLink2 = nothing

	if strUseExtendedProfile then
		strReturn = "<a " & LinkLevelStyle & " href=""pop_profile.asp?mode=display&id=" & fID & """" & strExtraStuff & ">"
	else
		strReturn = "<a " & LinkLevelStyle & " href=""JavaScript:openWindow3('pop_profile.asp?mode=display&id=" & fID & "')""" & strExtraStuff & ">"
	end if
	profileLink = strReturn & fName & "</a>"
end function



In inc_header.asp

Replace
		"<style type=""text/css"">" & vbNewLine & _
		"<!--" & vbNewLine & _
		"a:link    {color:" & strLinkColor & ";text-decoration:" & strLinkTextDecoration & "}" & vbNewLine & _
		"a:visited {color:" & strVisitedLinkColor & ";text-decoration:" & strVisitedTextDecoration & "}" & vbNewLine & _
		"a:hover   {color:" & strHoverFontColor & ";text-decoration:" & strHoverTextDecoration & "}" & vbNewLine & _
		"a:active  {color:" & strActiveLinkColor & ";text-decoration:" & strActiveTextDecoration & "}" & vbNewLine & _
		".spnMessageText a:link    {color:" & strForumLinkColor & ";text-decoration:" & strForumLinkTextDecoration & "}" & vbNewLine & _
		".spnMessageText a:visited {color:" & strForumVisitedLinkColor & ";text-decoration:" & strForumVisitedTextDecoration & "}" & vbNewLine & _
		".spnMessageText a:hover   {color:" & strForumHoverFontColor & ";text-decoration:" & strForumHoverTextDecoration & "}" & vbNewLine & _
		".spnMessageText a:active  {color:" & strForumActiveLinkColor & ";text-decoration:" & strForumActiveTextDecoration & "}" & vbNewLine & _
		".spnSearchHighlight {background-color:" & strSearchHiLiteColor & "}" & vbNewLine & _
		"input.radio {background:" & strPopUpTableColor & ";color:#000000}" & vbNewLine & _
		"-->" & vbNewLine & _
		"</style>" & vbNewLine & _


with
		"<style type=""text/css"">" & vbNewLine & _
		"<!--" & vbNewLine & _
		"a:link    {color:" & strLinkColor & ";text-decoration:" & strLinkTextDecoration & "}" & vbNewLine & _
		"a:visited {color:" & strVisitedLinkColor & ";text-decoration:" & strVisitedTextDecoration & "}" & vbNewLine & _
		"a:hover   {color:" & strHoverFontColor & ";text-decoration:" & strHoverTextDecoration & "}" & vbNewLine & _
		"a:active  {color:" & strActiveLinkColor & ";text-decoration:" & strActiveTextDecoration & "}" & vbNewLine & _
		".spnMessageText a:link    {color:" & strForumLinkColor & ";text-decoration:" & strForumLinkTextDecoration & "}" & vbNewLine & _
		".spnMessageText a:visited {color:" & strForumVisitedLinkColor & ";text-decoration:" & strForumVisitedTextDecoration & "}" & vbNewLine & _
		".spnMessageText a:hover   {color:" & strForumHoverFontColor & ";text-decoration:" & strForumHoverTextDecoration & "}" & vbNewLine & _
		".spnMessageText a:active  {color:" & strForumActiveLinkColor & ";text-decoration:" & strForumActiveTextDecoration & "}" & vbNewLine & _
		".spnSearchHighlight {background-color:" & strSearchHiLiteColor & "}" & vbNewLine & _
		"input.radio {background:" & strPopUpTableColor & ";color:#000000}" & vbNewLine & _
		"a.stradminstyle2:link    {color:" & strAUAdminColor & ";background-color:transparent;text-decoration:none}" & vbNewLine & _
		"a.stradminstyle2:visited   {color:" & strAUAdminColor & ";background-color:transparent;text-decoration:none;}" & vbNewLine & _
		"a.stradminstyle2:hover    {color:" & strAUAdminColor & ";background-color:transparent;text-decoration:none}" & vbNewLine & _
		"a.stradminstyle2:active   {color:" & strAUAdminColor & ";background-color:transparent;text-decoration:none;}" & vbNewLine & _
		"a.strmodostyle2:link    {color:" & strAUModColor & ";background-color:transparent;text-decoration:none}" & vbNewLine & _
		"a.strmodostyle2:visited   {color:" & strAUModColor & ";background-color:transparent;text-decoration:none;}" & vbNewLine & _
		"a.strmodostyle2:hover    {color:" & strAUModColor & ";background-color:transparent;text-decoration:none}" & vbNewLine & _
		"a.strmodostyle2:active   {color:" & strAUModColor & ";background-color:transparent;text-decoration:none;}" & vbNewLine & _
		"-->" & vbNewLine & _
		"</style>" & vbNewLine & _
<
CharlyMIS Posted - 02 May 2008 : 18:14:06
Thanks for this, phy1729, I've passed the information to my other half and he's trying to sort it for me now <
phy1729 Posted - 01 May 2008 : 18:53:07
It's possible and shouldn't be too difficult because most of the code is already written for you in the Actives Users mod. You'll need to find the code that does the color swap in the Active Users mod and copy it over making sure the variables match and the alternate color is defined.<

Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.04 seconds. Powered By: Snitz Forums 2000 Version 3.4.07