SMF For Free Support Forum
Signup For Free Forum
July 04, 2009, 11:39:24 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]
  Print  
Author Topic: [Code] Membergroup Color  (Read 1793 times)
0 Members and 1 Guest are viewing this topic.
Agent Moose
Moderator
*****
Offline Offline

Posts: 776


Do not PM me for Code Support or Request


View Profile
« on: July 28, 2007, 08:39:00 pm »

Add this to your headers if you don't have it...
Code:
<script src="/jquery.js"></script>

Footers:
Code:
<script>
function color_group_name() {
//Created by Agent Moose (smcodes.smfforfree3.com)
var group = new Array()
group[group.length] = ["Newbie","orange"]
group[group.length] = ["MEMBER GROUP","COLOR"]

for(f=0;f<group.length;f++){
$("div.smalltext").each(function() {
if(this.innerHTML.match(group[f][0])){
this.innerHTML = this.innerHTML.replace(group[f][0],"<font color='" + group[f][1] + "'>" + group[f][0] + "</font>");
};});};}
color_group_name();
</script>

What this code does is let you add color to the Membergroup name that showes up in the post.  It doesn't change the color of the username, just the little membergroup that showes under there username.

MEMBER GROUP = The Name of the member group.
COLOR = The color it will be.

Preview
« Last Edit: May 02, 2008, 09:14:42 pm by Agent Moose » Logged

Want to know how good your board is?  Why not get it reviewed at Revolution X!
rileyks
SMF For Free Sponsors
*
Offline Offline

Posts: 523


View Profile
« Reply #1 on: July 29, 2007, 01:10:57 pm »

Great Job!  I like alot!  I added just enough for all my different staff.  Question - can you add to them?  Some of the colors depending on the stylesheet colors in the posts make them very light...lol.
Logged

LaundryLady
Global Moderator
*
Offline Offline

Posts: 3056


Internet Challenged


View Profile
« Reply #2 on: July 29, 2007, 03:42:51 pm »

Good Question, can we use the hex colors( for example #00000)?
Logged
Agent Moose
Moderator
*****
Offline Offline

Posts: 776


Do not PM me for Code Support or Request


View Profile
« Reply #3 on: July 29, 2007, 06:36:52 pm »

Yes, you can use HEX
Logged

Want to know how good your board is?  Why not get it reviewed at Revolution X!
rileyks
SMF For Free Sponsors
*
Offline Offline

Posts: 523


View Profile
« Reply #4 on: July 29, 2007, 11:02:28 pm »

Cool!  Will have to play with it some more tomorrow then...lol.  Thanks!!!!
Logged

Laugh-nd-kid
SMF For Free Master
*
Offline Offline

Posts: 1412


Thankyou for this great software SMF For Free!


View Profile
« Reply #5 on: July 30, 2007, 03:38:24 am »

good ole code.
Logged

rileyks
SMF For Free Sponsors
*
Offline Offline

Posts: 523


View Profile
« Reply #6 on: July 30, 2007, 02:52:43 pm »

Yep...that worked great!  tyvm all!
Logged

OhioLawyer
SMF For Free Newbie
*
Offline Offline

Posts: 13


View Profile
« Reply #7 on: October 21, 2008, 09:38:52 am »

hmmm it didn't do anything.  And I don't see any difference in the test link you provided either.  What is wrong?

wiiunite.smfforfree3.com
« Last Edit: October 21, 2008, 10:07:59 am by OhioLawyer » Logged
?
SMF For Free Hero
*
Offline Offline

Posts: 557



View Profile
« Reply #8 on: October 21, 2008, 10:56:52 am »

I don't see any change either, maybe I have javascript disabled, I don't know.
Logged

Shimmy Shabby
SMF For Free Full Member
*
Offline Offline

Posts: 145



View Profile
« Reply #9 on: October 22, 2008, 04:46:26 pm »

I don't see any change either, maybe I have javascript disabled, I don't know.
May i see the code you used please?
Logged




Pages: [1]
  Print  
 
Jump to:  

cheap low cost web hosting reviews

Powered by SMF 1.1.9 | SMF © 2006-2009, Simple Machines LLC
ServerBeach Coupon
Page created in 0.468 seconds with 17 queries.