Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Hilight admins and mods
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Hilight admins and mods

 Post Reply Post Reply Page  12>
Author
FreeMen View Drop Down
Groupie
Groupie


Joined: 19 November 2003
Location: Denmark
Status: Offline
Points: 132
Post Options Post Options   Thanks (0) Thanks(0)   Quote FreeMen Quote  Post ReplyReply Direct Link To This Post Topic: Hilight admins and mods
    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?

Back to Top
dj air View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj air Quote  Post ReplyReply Direct Link To This Post 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---



Edited by dj air
Back to Top
FreeMen View Drop Down
Groupie
Groupie


Joined: 19 November 2003
Location: Denmark
Status: Offline
Points: 132
Post Options Post Options   Thanks (0) Thanks(0)   Quote FreeMen Quote  Post ReplyReply Direct Link To This Post Posted: 25 April 2004 at 12:34pm

I'm using Access.

I'll try your code. thanks!

Back to Top
FreeMen View Drop Down
Groupie
Groupie


Joined: 19 November 2003
Location: Denmark
Status: Offline
Points: 132
Post Options Post Options   Thanks (0) Thanks(0)   Quote FreeMen Quote  Post ReplyReply Direct Link To This Post 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>"

Back to Top
dj air View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj air Quote  Post ReplyReply Direct Link To This Post 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.

Back to Top
FreeMen View Drop Down
Groupie
Groupie


Joined: 19 November 2003
Location: Denmark
Status: Offline
Points: 132
Post Options Post Options   Thanks (0) Thanks(0)   Quote FreeMen Quote  Post ReplyReply Direct Link To This Post 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...

Back to Top
dj air View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj air Quote  Post ReplyReply Direct Link To This Post 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.

Back to Top
FreeMen View Drop Down
Groupie
Groupie


Joined: 19 November 2003
Location: Denmark
Status: Offline
Points: 132
Post Options Post Options   Thanks (0) Thanks(0)   Quote FreeMen Quote  Post ReplyReply Direct Link To This Post 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!?

Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.