SMF For Free Support Forum
Signup For Free Forum
March 21, 2010, 11:24:22 am *
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: Username colors according to their Membergroups?  (Read 320 times)
0 Members and 1 Guest are viewing this topic.
NYNick
SMF For Free Member
*
Offline Offline

Posts: 62


View Profile
« on: June 22, 2009, 09:59:09 am »

For some reason, I thought there was a code that changed names across the board {posts, profiles, online list, and PMs} according to their Member Groups so you didn't have to do it on an individual basis... Was I wrong? I'm running on little to no sleep, so I could be crazy  idiot2
Logged
Andrew
SMF For Free Sponsors
*
Offline Offline

Posts: 1574


Andrew At Your Service!


View Profile WWW
« Reply #1 on: June 22, 2009, 10:31:10 am »

There is one.

Make sure this in in your headers:
Code:
<script src="/jquery.js"></script>

This goes in your footers:
Code:
<script type="text/javascript">
var memColor = new Array();
memColor[memColor.length] = ["MEMBERGROUP NAME","START HTML","END HTML"];

//Created by Agent Moose (revolutionx.smfforfree3.com)
if(location.href.match("topic,")){
for(f=0;f<memColor.length;f++){
$("div.smalltext").each(function(){
if(this.innerHTML.match(memColor[f][0] + "<br")){
$(this).prev().children().html(memColor[f][1] + $(this).prev().children().html() + memColor[f][2]);
};});};};
</script>

MEMBERGROUP NAME= the name of the membergroup.
START HTML= the begging HTML tag, ex: <font color='red'>
END HTML= the closing HTML tag, ex: </font>

To add more membergroups that change the username, add more of these lines:
Code:
memColor[memColor.length] = ["MEMBERGROUP NAME","START HTML","END HTML"];
Logged

Support Page


Click the banner to join me on Club Cooee!
мσנσвσנσ82
SMF For Free Sr. Member
*
Offline Offline

Posts: 310



View Profile WWW
« Reply #2 on: June 29, 2009, 03:17:30 am »

This code doesn't work for me  Cry
Logged



simply sibyl
Global Moderator
*
Offline Offline

Posts: 13309



View Profile WWW
« Reply #3 on: June 29, 2009, 11:38:47 am »

This code doesn't work for me  Cry

We need more information then "it doesnt work for me"
Post your code here so we can see what you did and post your forum's url.   
« Last Edit: June 29, 2009, 11:41:16 am by simply sibyl » Logged



Pages: [1]
  Print  
 
Jump to:  



Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC
ServerBeach Coupon
Page created in 0.278 seconds with 15 queries. (Pretty URLs adds 0.095s, 2q)