SMF For Free Support Forum
Signup For Free Forum
September 06, 2008, 12:46:04 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome to SMF For Free. The best free SMF Host
 
   Home   Help Search Arcade Gallery Login Register  

Pages: [1] 2
  Print  
Author Topic: [Code] Users Key in Who's Online for SMF 1.0  (Read 3363 times)
0 Members and 1 Guest are viewing this topic.
webworldx
Code Master's
***
Offline Offline

Posts: 24



View Profile WWW
« on: June 26, 2006, 09:30:27 am »

Code:
<script type='text/javascript'>
/*
[SMF] Users Key
Created by iFusion
*/
var userKey = new Array();
userKey[0] = [ "Admin" , "#FF0000" ];
userKey[1] = [ "Mods" , "#00FF00" ];

var uKey = "";
for(i=0;i<userKey.length;i++){
 uKey += "[ <span style='color: " + userKey[i][1] + "'>" + userKey[i][0] + "</span> ] ";
}

var iTD = document.getElementsByTagName('TD');
for(i=iTD.length-1;i>0;i--){
 if(iTD[i].className=="windowbg2" && iTD[i].firstChild.tagName == "A" && iTD[i].firstChild.href.match(/action=who/i) != null){
  iTD[i].getElementsByTagName('SPAN')[0].innerHTML += "<br /><strong>Users Key:</strong> " + uKey; break;
}}
</script>

Add it into your footer, and change the userKey to admins, mods, members etc and add colors Smiley
« Last Edit: February 10, 2008, 08:22:51 pm by simply sibyl » Logged

DC
SMF For Free Sr. Member
*
Offline Offline

Posts: 295



View Profile
« Reply #1 on: June 26, 2006, 10:34:27 am »

how would this react with the colors that one are already has...for one has the ability to change this in the membergroup modifications. i have all my member groups color coded for the users on line.
Logged

webworldx
Code Master's
***
Offline Offline

Posts: 24



View Profile WWW
« Reply #2 on: June 26, 2006, 10:37:28 am »

Go into Admin >> Edit Member Groups, click Modify next to each group, and you'll have the group name, and the group color in hex.

Then just add more of these lines (incrementing the number)

userKey[1] = [ "Mods" , "#00FF00" ];

to reflect the group name, and the group color.  The code automatically lists them in a line, with brackets around.
Logged

DC
SMF For Free Sr. Member
*
Offline Offline

Posts: 295



View Profile
« Reply #3 on: June 26, 2006, 10:42:27 am »

yes i kinda figured that....but what i was asking, is what will this code do that the forum isnt already doing....right now all my member groups when they are showing ..all have their special color...and that is from the colors i have chosen for the different groups an have placed alreddy there. So what will putting the code in the footers do?
Logged

SMF For Free
Administrator
*
Offline Offline

Posts: 3330


View Profile WWW
« Reply #4 on: June 26, 2006, 11:02:56 am »

Below who is online says the group titles.
Example: Users Key: [ Admin ] [ Mods ] 
Has colors too
Logged

SMF For Free-Free Simple Machines Forum hosting.
DC
SMF For Free Sr. Member
*
Offline Offline

Posts: 295



View Profile
« Reply #5 on: June 26, 2006, 11:28:55 am »

ahhhhh ok i tinks i under stands now...thinks i has seen dat on forums Wink  thanks smf Smiley
Logged

Crayfish
Global Moderator
*
Offline Offline

Posts: 3278


I Approve of this Message


View Profile
« Reply #6 on: June 26, 2006, 11:39:33 am »

I love that! Look amazing, great job!
Edit:

Here's a picture of the User Key in action on my forum(BlackDay theme)
« Last Edit: August 30, 2006, 04:45:10 pm by crasyandconfused » Logged

chiquitita
SMF For Free Sr. Member
*
Offline Offline

Posts: 402



View Profile WWW
« Reply #7 on: October 22, 2006, 11:46:38 am »

Im using it now, very cool! Cool Thanks
Logged

warrior
SMF For Free Member
*
Offline Offline

Posts: 28



View Profile
« Reply #8 on: November 05, 2006, 08:05:20 pm »

where is the footer??
Logged

Gordie
SMF For Free Hero
*
Online Online

Posts: 593


I'm around somewhere!!!


View Profile WWW
« Reply #9 on: November 06, 2006, 12:50:48 am »

Admin Control Panel ---> "manage styles"
Near the top, click on " Edit Headers/Footers"
Logged



Susan
SMF For Free Member
*
Offline Offline

Posts: 25


View Profile
« Reply #10 on: November 06, 2006, 07:51:05 am »

Thank you for the code,yes it doesnt work with firefox but it works with IE  angel
Logged
collegeteam
SMF For Free Member
*
Offline Offline

Posts: 39


College Team


View Profile WWW
« Reply #11 on: November 06, 2006, 12:53:52 pm »

its not working on my site, just check it out http://collegeteam.smfforfree.com
Logged

SMF is a great site
Crayfish
Global Moderator
*
Offline Offline

Posts: 3278


I Approve of this Message


View Profile
« Reply #12 on: November 06, 2006, 02:03:01 pm »

I can't see your code because it's not in your site right now.

Can you post the code you tried here?
Logged

Coreeeey
SMF For Free Sr. Member
*
Offline Offline

Posts: 311



View Profile WWW
« Reply #13 on: September 16, 2007, 12:40:23 pm »

Forum Url: http://pspforums.smfforfree3.com
This code is not working for me and I really want to use it. I have the code copied into my footer exactly as it is posted here. All I changed were the Names and the Colors.

If this makes a difference I should tell you that I have the add tabs code in my footer and I also have a few picture/links in my footer.
« Last Edit: September 16, 2007, 12:45:37 pm by Coreeeey » Logged

Gordie
SMF For Free Hero
*
Online Online

Posts: 593


I'm around somewhere!!!


View Profile WWW
« Reply #14 on: September 16, 2007, 12:55:34 pm »

Can you post the code you used please. I have used this code in the past without problems.
Logged





Pages: [1] 2
  Print  
 
Jump to:  

Powered by SMF 1.1.5 | SMF © 2006-2008, Simple Machines LLC
ServerBeach Coupon
Page created in 0.27 seconds with 17 queries.