Print Page | Close Window

Hilight admins and mods

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=10124
Printed Date: 09 April 2026 at 1:00am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Hilight admins and mods
Posted By: FreeMen
Subject: Hilight admins and mods
Date Posted: 24 April 2004 at 2:34am

Hi

I've been doing a search, but can't find anything about it.

I would like my admins and mods to be hilightet in the who's online list on default.asp
Like when I see a mod in the list, his name is bold or another color!?

Is this possible?




Replies:
Posted By: dj air
Date Posted: 25 April 2004 at 12:00pm

locate the section where its written...

and create  query inside the section with the user details so its in the loop...

the query should get the users groupID ..... and then use the groupID to query the groups table and see if the group type is set to 1 or 2

1 = admin

2= moderator

then use an if statement

if intGroup_Type = 1 OR intGroup_Type = 2 then response.write "<b>"

write username

if intGroup_Type = 1 OR intGroup_Type = 2 then response.write "</b>"

the above code will work if the intGroup_Type is set to the group type in the database

--edit ---

if you have different moderators for different forums you will have to also query the permissions table woith the group ID and see if the moderation feature is enabled in the forum for the group

I would suggest not using this as there is a few queries to be used every time... which will slow it down

what version are you using Access or SQL

--edit---



Posted By: FreeMen
Date Posted: 25 April 2004 at 12:34pm

I'm using Access.

I'll try your code. thanks!



Posted By: FreeMen
Date Posted: 25 April 2004 at 12:55pm

I can't get it to work... :(

I have to place your code in here right? :

strMembersOnline = strMembersOnline & "<a href=""JavaScript:openWin('pop_up_profile.asp?PF=" & saryActiveUsers(1, intArrayPass) & "','profile','toolbar=0,location=0,status=0,menubar=0,scroll bars=1,resizable=1,width=590,height=425')"" class=""smLink"">" & saryActiveUsers(2, intArrayPass) & "</a>"



Posted By: dj air
Date Posted: 26 April 2004 at 1:24pm
 

strMembersOnline = strMembersOnline & "<a href=""JavaScript:openWin('pop_up_profile.asp?PF=" & saryActiveUsers(1, intArrayPass) & "','profile','toolbar=0,location=0,status=0,menubar=0,scroll bars=1,resizable=1,width=590,height=425')"" class=""smLink"">"

if intGroup_Type = 1 OR intGroup_Type = 2 then strMembersOnline = strMembersOnline  &"<b>"

strMembersOnline   = strMembersOnline  & saryActiveUsers(2, intArrayPass) & "</a>"

if intGroup_Type = 1 OR intGroup_Type = 2 then strMembersOnline = strMembersOnline  &"</b>"

 

if you have done the correct queries etc the section gicves you an example ,... that is if the intGroup_Type is correct value. but you can use the above code to help do it.



Posted By: FreeMen
Date Posted: 26 April 2004 at 1:49pm

Sorry to bother you so much, but I can't get it to work...

The code looks original like this:

  If saryActiveUsers(1, intArrayPass) = 2 Then

   intActiveGuests = intActiveGuests + 1

  'Else add the name of the members name of the active users to the members online string
  Else
   If strMembersOnline <> "" Then strMembersOnline = strMembersOnline & ", "
   strMembersOnline = strMembersOnline & "<a href=""JavaScript:openWin('pop_up_profile.asp?PF=" & saryActiveUsers(1, intArrayPass) & "','profile','toolbar=0,location=0,status=0,menubar=0,scroll bars=1,resizable=1,width=590,height=425')"" class=""smLink"">" & saryActiveUsers(2, intArrayPass) & "</a>"
  End If

Where do you want your code? If I put it instead of

 & saryActiveUsers(2, intArrayPass) & "</a>"

I get an error...



Posted By: dj air
Date Posted: 26 April 2004 at 1:57pm

 If saryActiveUsers(1, intArrayPass) = 2 Then

   intActiveGuests = intActiveGuests + 1

  'Else add the name of the members name of the active users to the members online string
  Else
   If strMembersOnline <> "" Then strMembersOnline = strMembersOnline & ", "
 

strMembersOnline = strMembersOnline & "<a href=""JavaScript:openWin('pop_up_profile.asp?PF=" & saryActiveUsers(1, intArrayPass) & "','profile','toolbar=0,location=0,status=0,menubar=0,scroll bars=1,resizable=1,width=590,height=425')"" class=""smLink"">"

if intGroup_Type = 1 OR intGroup_Type = 2 then strMembersOnline = strMembersOnline  &"<b>"

strMembersOnline   = strMembersOnline  & saryActiveUsers(2, intArrayPass) & ""

if intGroup_Type = 1 OR intGroup_Type = 2 then strMembersOnline = strMembersOnline  &"</b>"

strMembersOnline = strMembersOnline &"</a>"

  End If

the code above is the code you just provided with the editing .. the part in bold are the sections ive changed... remember you need to set a query ..to use the ID to check ifg the user is a moderator.



Posted By: FreeMen
Date Posted: 26 April 2004 at 2:01pm

Getting this:

Microsoft VBScript runtime error '800a01f4'

Variable is undefined: 'intGroup_Type'

/forum/default2.asp, line 580

But when I dim it, I just get the normal view!?



Posted By: dj air
Date Posted: 26 April 2004 at 2:06pm

right i know why this is .... yes the dim needs to be done ...

what you need is the query to check if the user is a moderator.. if you give me a while ill have time to write the query and ill tell you where to put it.



Posted By: FreeMen
Date Posted: 26 April 2004 at 2:07pm
Thanks so much!!! No need to hurry!


Posted By: dj air
Date Posted: 26 April 2004 at 2:52pm

right i think this will work..its working if im logged into my website (it shows me as bold)

http://members.aol.com/aaronhoc/admin_show.zip - download this file and upload/replace the existing one

it will be worth checking with other users loggedin ..wones that are admins, moderators and general users.

you shoul;d be able to just replace the existing one..

if you have any problems reply back



Posted By: FreeMen
Date Posted: 26 April 2004 at 2:59pm

Now I don't see my self and only half of the members online...

Ideas?



Posted By: dj air
Date Posted: 26 April 2004 at 5:35pm

you should be able to see them online

i tested it on my site .... also the original code is there ..all i have added is a few queries, and an if statement to write <b> and </b>

 



Posted By: mforce
Date Posted: 11 August 2004 at 4:27am
hi,

the download adress giving error, could you fix it, please?



Posted By: dj air
Date Posted: 11 August 2004 at 7:25am

people can download it from http://www.breathofair.info/forum/default.asp.zip - www.breathofair.info/forum/default.asp.zip

i have a colour coded version aswell that i have done in the MOD's forum .. different colour depending on group type



Posted By: FreeMen
Date Posted: 27 August 2004 at 3:26am

I've looked in the mods section, but can't find it!?



-------------
http://www.tomtom-user.dk - TomTom-User.dk
Running WWF SQL with more than 32.000 members...



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net