Agent Moose
|
 |
« on: May 23, 2009, 09:01:20 am » |
|
Footers: <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> Original Request: http://revolutionx.smfforfree3.com/index.php/topic,578.0.htmlThis code changes the username of a person according to which membergroup they are in. MEMBERGROUP = The membergroup name. START HTML = The First tag for HTML END HTML = The End tags for HTML. Here are two example for editing the code: memColor[memColor.length] = ["Newcomer","<font color='red'>","</font>"]; memColor[memColor.length] = ["Starter","<b><i>","</i></b>"]; Enjoy 
|
|
« Last Edit: May 23, 2009, 06:59:10 pm by Agent Moose »
|
Report Spam
Logged
|
|
|
|
|
Andrew
|
 |
« Reply #1 on: May 23, 2009, 10:44:58 am » |
|
Looks good, im a bit confused though. Im using this one: <script type="text/javascript"> var memColor = new Array(); memColor[memColor.length] = ["Administrator","<font color='#FF0000'","</font>"];
//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> Not working. Also for adding the runescape crown, I would place this in the spot for START HTML right? <img src='IMAGE URL' /> Right?
|
|
|
|
|
Exilis
Optimistic & Creative
Global Moderator
 
Offline
Posts: 929
 Badges: (View All)
|
 |
« Reply #2 on: May 23, 2009, 01:21:14 pm » |
|
You need to close the font tag so it's <script type="text/javascript"> var memColor = new Array(); memColor[memColor.length] = ["Administrator","<font color='#FF0000'>","</font>"];
//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> And yes, to do the crown do: <script type="text/javascript"> var memColor = new Array(); memColor[memColor.length] = ["Administrator","<img src='crown.gif' /><font color='#FF0000'>","</font>"];
//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>
|
|
|
|
Andrew
|
 |
« Reply #3 on: May 23, 2009, 02:58:05 pm » |
|
The 1st code doesnt seem to be working for me. I havent tried the 2nd one on account the 1st one isnt working yet  .
|
|
|
|
Agent Moose
|
 |
« Reply #4 on: May 23, 2009, 06:50:29 pm » |
|
Heh, I forgot a parentheses  First post updated.
|
|
|
|
Andrew
|
 |
« Reply #5 on: May 24, 2009, 02:35:26 am » |
|
<script type="text/javascript"> var memColor = new Array(); memColor[memColor.length] = ["Administrator","<img src='http://i197.photobucket.com/albums/aa75/hockeysMVP222/warlord.gif' /><font color='#FF0000'>","</font>"];
//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>
Still nothing 
|
|
|
|
Exilis
Optimistic & Creative
Global Moderator
 
Offline
Posts: 929
 Badges: (View All)
|
 |
« Reply #6 on: May 24, 2009, 06:19:29 am » |
|
You're using the old code, not the new one. Use this: <script type="text/javascript"> var memColor = new Array(); memColor[memColor.length] = ["Administrator","<img src='http://i197.photobucket.com/albums/aa75/hockeysMVP222/warlord.gif' /><font color='#FF0000'>","</font>"];
//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>
|
|
|
|
Andrew
|
 |
« Reply #7 on: May 24, 2009, 09:41:50 am » |
|
You're using the old code, not the new one. Use this: <script type="text/javascript"> var memColor = new Array(); memColor[memColor.length] = ["Administrator","<img src='http://i197.photobucket.com/albums/aa75/hockeysMVP222/warlord.gif' /><font color='#FF0000'>","</font>"];
//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> Negative 
|
|
|
|
Agent Moose
|
 |
« Reply #8 on: May 24, 2009, 01:24:49 pm » |
|
I saw the new one work >.< I shall keep messing with it 
|
|
|
|
|
el mafioso
Exclusive
 
Offline
Posts: 553
SOTW 1st Champion
 Badges: (View All)
|
It works I used to have this code in a forum that I had before but I had to close it
|
|
|
|
Mojobojo82
MVP
 
Offline
Gender: 
Posts: 838
 Badges: (View All)
|
I love this code. Helps a lot with the Mods and Admin crowns 
|
|
|
|
Mojobojo82
MVP
 
Offline
Gender: 
Posts: 838
 Badges: (View All)
|
Argh not working now. This is my code. <script type="text/javascript"> var memColor = new Array(); memColor[memColor.length] = ["Administrator","<img src='http://i137.photobucket.com/albums/q232/LaundryLady1947/Runescape/mod_gold.gif' /><font color='#F7FF0B'>","</font>"]; memColor[memColor.length] = ["Global Moderator","<img src='http://i137.photobucket.com/albums/q232/LaundryLady1947/Runescape/mod_silver.gif' /><font color='#A2A2A2'>","</font>"]; memColor[memColor.length] = ["Moderator","<img src='http://i137.photobucket.com/albums/q232/LaundryLady1947/Runescape/mod_silver.gif' /><font color='#A2A2A2'>","</font>"]; memColor[memColor.length] = ["V.I.P Member","<img src='' /><font color='#F6FF07'>","</font>"]; memColor[memColor.length] = ["Donator","<img src='' /><font color='#FF0000'>","</font>"];
//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>
|
|
« Last Edit: June 27, 2009, 07:34:28 am by mojobojo82 »
|
Report Spam
Logged
|
|
|
|
|
|