Author |
Topic |
Andy Humm
Average Member
United Kingdom
908 Posts |
Posted - 17 June 2009 : 05:24:30
|
Within the active users mod, when a moderator or admin is online their name is shown as a different font colour ie strAUModColor or strAUAdminColor. I am trying to get the moderator links on the default.asp page to correspond with the same font colours. Within inc_activeusers.asp line 73 there is this code: if rsAM("M_LEVEL") = 2 then strActiveMemberList = strActiveMemberList & "<font color=""" & strAUModColor & """>" elseif rsAM("M_LEVEL") = 3 then strActiveMemberList = strActiveMemberList & "<font color=""" & strAUAdminColor & """>" end if
I believe the code in default.asp for the moderators listing is Response.Write "<font face=""" & strDefaultFontFace & """ color=""" & strForumFontColor & """ size=""" & strFooterFontSize & """><span class=""spnMessageText"">" & listForumModerators(ForumID) & "</span></font></td>" & vbNewline
I tried to get the font face to the same set up as activeusers.asp but I am stuck (too many Ifs and Thens??. Any help would be greatly appreciated rgds andy |
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 17 June 2009 : 13:58:40
|
Look at this function, Andy. The bit you want is in red.
|
|
|
Andy Humm
Average Member
United Kingdom
908 Posts |
Posted - 17 June 2009 : 17:21:15
|
Hi CF, thank you so far.. Given this function above, I am trying to see how to tie it into the code: Response.Write "<font face=""" & strDefaultFontFace & """ color=""" & strForumFontColor & """ size=""" & strFooterFontSize & """><span class=""spnMessageText"">" & listForumModerators(ForumID) & "</span></font></td>" & vbNewline
Do I need to swap the color=""" & strForumFontColor & """ to see the function? I tried to add the complete function to inc_func_common.asp - tilt!
Confused Dot com rgds andy |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 18 June 2009 : 14:30:10
|
That function is within default.asp, Andy - at the very bottom. Just modify your function to incorporate the color changes. |
|
|
modifichicci
Average Member
Italy
787 Posts |
|
Andy Humm
Average Member
United Kingdom
908 Posts |
Posted - 18 June 2009 : 17:26:49
|
CF- Spotted thanks and adjusted function to the code you have provided, but both the admin and moderators name/profile link remain in same colours as all the other links within the forum. See forum image
The active user moderator link is red, but moderators column the moderators have profile link colours the same as the rest of default.asp and rest of forum. thanking you as always andy |
|
|
Andy Humm
Average Member
United Kingdom
908 Posts |
Posted - 02 July 2009 : 06:03:59
|
I having great difficulty trying to make the profilelink function identify the different user names ie separate the administrators and moderators and ensure their links correspond with the active users settings and all the rest stay as normal.
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
The active users uses this I think:
if rsAM("M_LEVEL") = 2 then
strActiveMemberList = strActiveMemberList & "<font color=""" & strAUModColor & """>"
elseif rsAM("M_LEVEL") = 3 then
strActiveMemberList = strActiveMemberList & "<font color=""" & strAUAdminColor & """>"
end if Any guidance would be greatly appreciated if this can be done. |
|
|
Etymon
Advanced Member
United States
2385 Posts |
Posted - 02 July 2009 : 06:53:10
|
I am just pulling this from an old forum where I did this once before and have since not touched it for quite some time. It might just work as it is or it may have some of my own stuff in it.
|
Edited by - Etymon on 02 July 2009 06:55:16 |
|
|
Andy Humm
Average Member
United Kingdom
908 Posts |
Posted - 02 July 2009 : 12:50:30
|
thank you etymon for this function I have tried it and receive the following error: Microsoft VBScript runtime error '800a000d' Type mismatch: 'getMemberLevel' /forum/inc_func_common.asp, line 1733
I am trying to find a way to get the Mlev (member level) incorporated to distinguish admininstrator/moderator and members
|
|
|
Etymon
Advanced Member
United States
2385 Posts |
Posted - 02 July 2009 : 17:07:48
|
Ah, yes, I created a custom function. Place it in inc_function_common.asp above the ProfileLink function):
|
Edited by - Etymon on 02 July 2009 17:14:14 |
|
|
Andy Humm
Average Member
United Kingdom
908 Posts |
Posted - 03 July 2009 : 04:32:50
|
Thanks etymon, that is the business. I was looking at the additional need for the getMemberLevel but could get it to work.. Thanking you for the stirling support. Andy |
|
|
Etymon
Advanced Member
United States
2385 Posts |
Posted - 03 July 2009 : 05:27:28
|
You are quite welcome, Andy! |
|
|
Andy Humm
Average Member
United Kingdom
908 Posts |
Posted - 05 July 2009 : 17:11:37
|
Etymon, since I have updated the profilelink function, which is great, I have noticed a few other pages, probably incorporated with mods etc., the profile link colours are not activated to show the same.
If any one is interested to standardise the pages here are the minor changes necessary:
On the following pages, the text in italic is original coding and the line immediately below is new profilelink code
Searchlog.asp
members.asp
privateread.asp
pm_view.asp
subscription_list.asp
Thanks etymon for your initial support. |
|
|
Etymon
Advanced Member
United States
2385 Posts |
Posted - 05 July 2009 : 19:24:43
|
I am happy that you are having fun with it, Andy. I suppose that I need to package this up as a MOD-Addon to Active Users. |
Edited by - Etymon on 05 July 2009 19:25:05 |
|
|
Andy Humm
Average Member
United Kingdom
908 Posts |
Posted - 06 July 2009 : 05:41:37
|
Sounds good Etymon, its easier to share then. |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 06 July 2009 : 09:08:51
|
Should move the line in red up a line (before the "end if"), so that it won't try to close after an EOF.
quote:
|
|
|
Topic |
|