March 28, 2024, 06:16:52 am
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to Revolution X, where Coding meets Graphics.
 
  Home Help Search Arcade Affiliates Staff List Calendar Members Login Register  

Membergroup Changes Username

Pages: [1]   Go Down
  Print  
Author Topic: Membergroup Changes Username  (Read 1238 times)
0 Members and 1 Guest are viewing this topic.
Agent Moose
Administrator
Adminitrator
Offline Offline

Gender: Male
Posts: 1,470



View Profile WWW
Badges: (View All)
Tenth year Anniversary Nineth year Anniversary Search
« on: May 23, 2009, 09:01:20 am »

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>
Original Request: http://revolutionx.smfforfree3.com/index.php/topic,578.0.html

This 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:
Code:
memColor[memColor.length] = ["Newcomer","<font color='red'>","</font>"];
memColor[memColor.length] = ["Starter","<b><i>","</i></b>"];

Enjoy Smiley
« Last Edit: May 23, 2009, 06:59:10 pm by Agent Moose » Report Spam   Logged


Share on Facebook Share on Twitter

Andrew
Exclusive
Exclusive
Offline Offline

Gender: Male
Posts: 539



View Profile WWW
Badges: (View All)
Combination Topic Starter Poll Voter
« Reply #1 on: May 23, 2009, 10:44:58 am »

Looks good, im a bit confused though.

Im using this one:
Code:
<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?
Code:
<img src='IMAGE URL' />

Right?
Report Spam   Logged

Exilis
Optimistic & Creative
Global Moderator
Global Moderator
Offline Offline

Posts: 929


View Profile
Badges: (View All)
Tenth year Anniversary Linux User Combination
« Reply #2 on: May 23, 2009, 01:21:14 pm »

You need to close the font tag so it's
Code:
<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:
Code:
<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>
Report Spam   Logged

Global Mod, (sort of) at your service.

http://twitter.com/timothyaveni

Andrew
Exclusive
Exclusive
Offline Offline

Gender: Male
Posts: 539



View Profile WWW
Badges: (View All)
Combination Topic Starter Poll Voter
« 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 Tongue.
Report Spam   Logged

Agent Moose
Administrator
Adminitrator
Offline Offline

Gender: Male
Posts: 1,470



View Profile WWW
Badges: (View All)
Tenth year Anniversary Nineth year Anniversary Search
« Reply #4 on: May 23, 2009, 06:50:29 pm »

Heh, I forgot a parentheses Tongue

First post updated.
Report Spam   Logged


Andrew
Exclusive
Exclusive
Offline Offline

Gender: Male
Posts: 539



View Profile WWW
Badges: (View All)
Combination Topic Starter Poll Voter
« Reply #5 on: May 24, 2009, 02:35:26 am »

Code:
<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 Sad
Report Spam   Logged

Exilis
Optimistic & Creative
Global Moderator
Global Moderator
Offline Offline

Posts: 929


View Profile
Badges: (View All)
Tenth year Anniversary Linux User Combination
« Reply #6 on: May 24, 2009, 06:19:29 am »

You're using the old code, not the new one.
Use this:
Code:
<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>
Report Spam   Logged

Global Mod, (sort of) at your service.

http://twitter.com/timothyaveni

Andrew
Exclusive
Exclusive
Offline Offline

Gender: Male
Posts: 539



View Profile WWW
Badges: (View All)
Combination Topic Starter Poll Voter
« Reply #7 on: May 24, 2009, 09:41:50 am »

You're using the old code, not the new one.
Use this:
Code:
<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 Tongue
Report Spam   Logged

Agent Moose
Administrator
Adminitrator
Offline Offline

Gender: Male
Posts: 1,470



View Profile WWW
Badges: (View All)
Tenth year Anniversary Nineth year Anniversary Search
« Reply #8 on: May 24, 2009, 01:24:49 pm »

I saw the new one work >.<

I shall keep messing with it Tongue
Report Spam   Logged


Mojobojo82
MVP
MVP
Offline Offline

Gender: Male
Posts: 838


View Profile
Badges: (View All)
« Reply #9 on: June 17, 2009, 05:43:41 am »

Works fine with me.
Report Spam   Logged






el mafioso
Exclusive
Exclusive
Offline Offline

Posts: 553


SOTW 1st Champion


View Profile
Badges: (View All)
« Reply #10 on: June 17, 2009, 01:52:54 pm »

It works I used to have this code in a forum that I had before but I had to close it
Report Spam   Logged

Mojobojo82
MVP
MVP
Offline Offline

Gender: Male
Posts: 838


View Profile
Badges: (View All)
« Reply #11 on: June 19, 2009, 03:02:16 am »

I love this code. Helps a lot with the Mods and Admin crowns Smiley
Report Spam   Logged






Mojobojo82
MVP
MVP
Offline Offline

Gender: Male
Posts: 838


View Profile
Badges: (View All)
« Reply #12 on: June 26, 2009, 07:08:14 pm »

Argh not working now.

This is my code.
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






Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum

Powered by SMF | SMF © 2016, Simple Machines
Privacy Policy