Admin and Mod post name color - Posted (860 Views)
Junior Member
Bassman
Posts: 256
256
I was thinking of making the names from the admins and moderators in the posts on the left side red and green. After some hours of fiddling around with the following code I can use some help. It looks simple, just not a chance to make it happen.

Code:

	if lcase(strTopicNoWrapLeft) = "1" then Response.Write(" nowrap")
Response.Write ">" & vbNewLine

if mlev = 4 then
Response.Write " <p><b><span class=""postadminlink"">" & profileLink(ChkString(Member_Name,"display"),TMember_ID) & "</span></b><br />" & VbNewLine
end if
if mlev = 3 then
Response.Write " <p><b><span class=""postmodlink"">" & profileLink(ChkString(Member_Name,"display"),TMember_ID) & "</span></b><br />" & VbNewLine
end if
if mlev = 2 then
Response.Write " <p><b><span class=""postmodlink"">" & profileLink(ChkString(Member_Name,"display"),TMember_ID) & "</span></b><br />" & VbNewLine
end if
if mlev = 1 then
Response.Write " <p><font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""2""><b><span>" & profileLink(ChkString(Member_Name,"display"),TMember_ID) & "</span></b></font><br />" & VbNewLine
end if
if strShowRank = 1 or strShowRank = 3 then

All of the first posts user names are in red...sins this is the admin (Mlev4) css code color. Can somebody please kick me in the right direction blush<
 Sort direction, for dates DESC means newest first  
 Page size 
Posted
Senior Member
tribaliztic
Posts: 1532
1532
In the "active users mod" the moderators and admin have different colors, maybe you can take a look at it? <
/Tribaliztic
- www.gotlandrace.se -
Posted
Development Team Leader
Classicmotorcycling
Posts: 2085
2085
Bassman,

Your code does look simple and I would expect you to see them in red. Maybe something like this would work:
Code:
if Reply_MemberLevel = 4 then
Response.Write " <p><b><span class=""postadminlink"">" & profileLink(ChkString(Member_Name,"display"),TMember_ID) & "</span></b><br />" & VbNewLine
elseif Reply_MemberLevel = 3 then
Response.Write " <p><b><span class=""postmodlink"">" & profileLink(ChkString(Member_Name,"display"),TMember_ID) & "</span></b><br />" & VbNewLine
elsif Reply_MemberLevel = 2 then
Response.Write " <p><b><span class=""postmodlink"">" & profileLink(ChkString(Member_Name,"display"),TMember_ID) & "</span></b><br />" & VbNewLine
elseif Reply_MemberLevel = 1 then
Response.Write " <p><font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""2""><b><span>" & profileLink(ChkString(Member_Name,"display"),TMember_ID) & "</span></b></font><br />" & VbNewLine
end if
For the replies and this for the 1st post (can not give you the line numbers, but I am sure that you know how to find where).
Code:
if Member_Level = 4 then
Response.Write " <p><b><span class=""postadminlink"">" & profileLink(ChkString(Member_Name,"display"),TMember_ID) & "</span></b><br />" & VbNewLine
elsif Member_Level = 3 then
Response.Write " <p><b><span class=""postmodlink"">" & profileLink(ChkString(Member_Name,"display"),TMember_ID) & "</span></b><br />" & VbNewLine
elseif Member_Level = 2 then
Response.Write " <p><b><span class=""postmodlink"">" & profileLink(ChkString(Member_Name,"display"),TMember_ID) & "</span></b><br />" & VbNewLine
elseif Member_Level = 1 then
Response.Write " <p><font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""2""><b><span>" & profileLink(ChkString(Member_Name,"display"),TMember_ID) & "</span></b></font><br />" & VbNewLine
end if
I hope that points you in the right direction.

This is untested, but should work. <
Cheers,

David Greening
Posted
Junior Member
Bassman
Posts: 256
256
Indeed the red part was the problem, thanks Classicmotorcycling that code works great cool It was the Reply_MemberLevel not just mlev blush
here the final version:

around line 750

Code:

if  Reply_MemberLevel = 3 then
Response.Write " <p><b><span class=""postadminlink"">" & profileLink(ChkString(Reply_MemberName,"display"),Reply_Author) & "</span></b><br />" & VbNewLine
elseif Reply_MemberLevel = 2 then
Response.Write " <p><b><span class=""postmodlink"">" & profileLink(ChkString(Reply_MemberName,"display"),Reply_Author) & "</span></b><br />" & VbNewLine
elseif Reply_MemberLevel = 1 then
Response.Write " <p><font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""2""><b><span>" & profileLink(ChkString(Reply_MemberName,"display"),Reply_Author) & "</span></b></font><br />" & VbNewLine
end if

Around line 1040
Code:
if  	Member_Level = 3 then
Response.Write " <p><b><span class=""postadminlink"">" & profileLink(ChkString(Member_Name,"display"),TMember_ID) & "</span></b><br />" & VbNewLine
elseif Member_Level = 2 then
Response.Write " <p><b><span class=""postmodlink"">" & profileLink(ChkString(Member_Name,"display"),TMember_ID) & "</span></b><br />" & VbNewLine
elseif Member_Level = 1 then
Response.Write " <p><font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""2""><b><span>" & profileLink(ChkString(Member_Name,"display"),TMember_ID) & "</span></b></font><br />" & VbNewLine
end if

Edit: delete line Reply_MemberLevel = 4, thanks Shaggy<
Posted
Development Team Leader
Classicmotorcycling
Posts: 2085
2085
No problems, glad I could help and point you in the right direction... Forgot to change the other items, but was in a hurry at 5:30am (Melbourne, Australia time) this morning before work to point you there...<
Cheers,

David Greening
Posted
Junior Member
Bassman
Posts: 256
256
I found them David, the direction was great smile<
Posted
Support Moderator
Shaggy
Posts: 6780
6780
You can remove the first if statment from both those snippets David provided - M_LEVEL will only ever be between 1 & 3, never 4.
<
Search is your friend “I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Posted
Junior Member
Bassman
Posts: 256
256
Woops...thanks Shaggy<
Posted
Support Moderator
Shaggy
Posts: 6780
6780
No worries.
<
Search is your friend “I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
 
You Must enter a message