SMF For Free Support Forum
Signup For Free Forum
September 03, 2010, 12:03:24 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 362 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
Helpers
*
Offline Offline

Posts: 1792


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

мσנσвσנσ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: 13750



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
Hostgator Hosting
Page created in 0.332 seconds with 19 queries. (Pretty URLs adds 0.025s, 2q)