Advertise Here

Author Topic: [Code] Change Username Across Board V2  (Read 12956 times)

0 Members and 2 Guests are viewing this topic.

Offline Agent Moose

  • Moderator
  • *****
  • Posts: 836
  • Do not PM me for Code Support or Request
    • View Profile

  • Total Badges: 32
    Badges: (View All)
    Search Level 6 Tenth year Anniversary Nineth year Anniversary Eighth year Anniversary
[Code] Change Username Across Board V2
« on: May 11, 2007, 09:33:52 pm »
This code allowes you to set a new name for a person, but that person can still login as there original one.  You can also add add color, bold, and other things like that.

Put in Footers
Code: [Select]
<script>
function nmeacrossb(){
//Created by Agent Moose (smcodes.smfforfree3.com)
var oldnewb = new Array()
oldnewb[oldnewb.length] = ["OLD NAME","NEW NAME","COLOR","OTHER"]

var Change = document.getElementsByTagName("a");
for(x=0;x<Change;x++){
for(l=0;l<oldnewb.length;l++){
if(Change[x].innerHTML.match(oldnewb[l][0])){
Change[x].innerHTML = "<font color='" + oldnewb[l][2] + "'>" + oldnewb[l][3] + oldnewb[l][(oldnewb[l][1] != "" ? 1 : 0)] + "</font>";
};};};};
nmeacrossb();
</script>
Put in Footer.

If you don't want the user to have a new name, then leave that part blank.  Other is where other HTML can go.

If you want to add more names, just add more of these lines:
Code: [Select]
oldnewb[oldnewb.length] = ["OLD NAME","NEW NAME","COLOR","OTHER"]
Enjoy :)
« Last Edit: May 02, 2008, 09:05:48 pm by Agent Moose »
Check out Revolution X's Brand new Code Index!

Offline simply sibyl

  • Helpers
  • *
  • Posts: 14347
  • On hiatus
    • View Profile
    • The Tent Dwellers

  • Total Badges: 31
    Badges: (View All)
    Level 6 Poll Voter Webmaster Arcade Highscore Windows User
Re: Change Username Across Board V2
« Reply #1 on: May 11, 2007, 09:35:29 pm »
Moose does that add color to their names in their posts or only in the online list?

Offline Agent Moose

  • Moderator
  • *****
  • Posts: 836
  • Do not PM me for Code Support or Request
    • View Profile

  • Total Badges: 32
    Badges: (View All)
    Search Level 6 Tenth year Anniversary Nineth year Anniversary Eighth year Anniversary
Re: Change Username Across Board V2
« Reply #2 on: May 11, 2007, 09:38:24 pm »
Every where.
Check out Revolution X's Brand new Code Index!

Offline simply sibyl

  • Helpers
  • *
  • Posts: 14347
  • On hiatus
    • View Profile
    • The Tent Dwellers

  • Total Badges: 31
    Badges: (View All)
    Level 6 Poll Voter Webmaster Arcade Highscore Windows User
Re: Change Username Across Board V2
« Reply #3 on: May 11, 2007, 09:42:50 pm »
cool thanks..just tried it on my test site..   its smf 1.1.2.    I get "done but with errors on page"  with IE7.. no error msg with firefox... and its not working. 

Question..   ["OLD NAME","NEW NAME","COLOR","OTHER"]
you said to leave that part blank if no name change is wanted.
Leave it as is correct?
I put a color code in for COLOR
didnt do anything for OTHER
tried it, then tried again by taking OTHER out

suggestions?
so that you know I have nothing else in the header file.

Offline Agent Moose

  • Moderator
  • *****
  • Posts: 836
  • Do not PM me for Code Support or Request
    • View Profile

  • Total Badges: 32
    Badges: (View All)
    Search Level 6 Tenth year Anniversary Nineth year Anniversary Eighth year Anniversary
Re: Change Username Across Board V2
« Reply #4 on: May 11, 2007, 09:45:02 pm »
This is how I would have mine

oldnewb[0] = ["Agent Moose","","red","<b>"]

You can leave the OTHER section blank just like I did for the NEW NAME section.

edit:
Preview is up in first post.
EDIT2:
Forgot to put where to put it.  It goes in Footers
« Last Edit: May 11, 2007, 09:47:17 pm by Agent Moose »
Check out Revolution X's Brand new Code Index!

Offline simply sibyl

  • Helpers
  • *
  • Posts: 14347
  • On hiatus
    • View Profile
    • The Tent Dwellers

  • Total Badges: 31
    Badges: (View All)
    Level 6 Poll Voter Webmaster Arcade Highscore Windows User
Re: Change Username Across Board V2
« Reply #5 on: May 11, 2007, 09:49:02 pm »
can you use color codes instead of words?

(i tried both ways)  still getting error

Offline Agent Moose

  • Moderator
  • *****
  • Posts: 836
  • Do not PM me for Code Support or Request
    • View Profile

  • Total Badges: 32
    Badges: (View All)
    Search Level 6 Tenth year Anniversary Nineth year Anniversary Eighth year Anniversary
Re: Change Username Across Board V2
« Reply #6 on: May 11, 2007, 09:52:12 pm »
Yes you can.  Also, do you have this code in your Headers...you have to have it inorder for most of my codes to work...

Code: [Select]
<script language="JavaScript" type="text/javascript" src="http://209.85.48.12/9581/134/upload/p4217340.ibf">//Jquery code</script>
Check out Revolution X's Brand new Code Index!

Offline simply sibyl

  • Helpers
  • *
  • Posts: 14347
  • On hiatus
    • View Profile
    • The Tent Dwellers

  • Total Badges: 31
    Badges: (View All)
    Level 6 Poll Voter Webmaster Arcade Highscore Windows User
Re: Change Username Across Board V2
« Reply #7 on: May 11, 2007, 09:54:17 pm »
er no ..  i havent used any of your other codes,  so wouldnt know it was needed  lol

Offline Kimmie

  • SMF For Free Master
  • *
  • Posts: 2010
    • View Profile
    • Kimmie's Caverns

  • Total Badges: 19
    Badges: (View All)
    Topic Starter Combination Level 4 Level 3 Level 2
Re: Change Username Across Board V2
« Reply #8 on: May 11, 2007, 09:54:24 pm »
can this be modified to do it using an entire membergroup as well?
« Last Edit: May 11, 2007, 09:59:05 pm by Kimmieb »

Offline simply sibyl

  • Helpers
  • *
  • Posts: 14347
  • On hiatus
    • View Profile
    • The Tent Dwellers

  • Total Badges: 31
    Badges: (View All)
    Level 6 Poll Voter Webmaster Arcade Highscore Windows User
Re: Change Username Across Board V2
« Reply #9 on: May 11, 2007, 09:56:38 pm »
thanks.. it works fine now

Offline Agent Moose

  • Moderator
  • *****
  • Posts: 836
  • Do not PM me for Code Support or Request
    • View Profile

  • Total Badges: 32
    Badges: (View All)
    Search Level 6 Tenth year Anniversary Nineth year Anniversary Eighth year Anniversary
Re: Change Username Across Board V2
« Reply #10 on: May 11, 2007, 09:59:20 pm »
can this be modified to do it using an entire membergroup as well?

no, but I will see if I can make one.

EDIT:  Just tried and I couldn't get it...sorry.
« Last Edit: May 11, 2007, 10:07:55 pm by Agent Moose »
Check out Revolution X's Brand new Code Index!

Offline Kimmie

  • SMF For Free Master
  • *
  • Posts: 2010
    • View Profile
    • Kimmie's Caverns

  • Total Badges: 19
    Badges: (View All)
    Topic Starter Combination Level 4 Level 3 Level 2
Re: Change Username Across Board V2
« Reply #11 on: May 11, 2007, 10:10:22 pm »
can this be modified to do it using an entire membergroup as well?

no, but I will see if I can make one.

EDIT:  Just tried and I couldn't get it...sorry.

NP thanks for trying :)

EDIT - just tried your script on my test site and it works great! Thanks Moose!  8)

Offline simply sibyl

  • Helpers
  • *
  • Posts: 14347
  • On hiatus
    • View Profile
    • The Tent Dwellers

  • Total Badges: 31
    Badges: (View All)
    Level 6 Poll Voter Webmaster Arcade Highscore Windows User
Re: Change Username Across Board V2
« Reply #12 on: May 11, 2007, 10:12:44 pm »
I have been sitting here trying to figure out what html could be put in OTHER.  Uses for it, etc.  humm

ideas?   
« Last Edit: May 11, 2007, 10:16:40 pm by simply sibyl »

Offline Agent Moose

  • Moderator
  • *****
  • Posts: 836
  • Do not PM me for Code Support or Request
    • View Profile

  • Total Badges: 32
    Badges: (View All)
    Search Level 6 Tenth year Anniversary Nineth year Anniversary Eighth year Anniversary
Re: Change Username Across Board V2
« Reply #13 on: May 11, 2007, 10:23:37 pm »
<b>
<i>
<u>

That is all I tried so far...Those are the best ones to use too.
Check out Revolution X's Brand new Code Index!

Offline Kimmie

  • SMF For Free Master
  • *
  • Posts: 2010
    • View Profile
    • Kimmie's Caverns

  • Total Badges: 19
    Badges: (View All)
    Topic Starter Combination Level 4 Level 3 Level 2
Re: Change Username Across Board V2
« Reply #14 on: May 11, 2007, 10:39:02 pm »
<b>
<i>
<u>

That is all I tried so far...Those are the best ones to use too.

Thanks! This was my next question but I posted the "question" in the wrong topic...LOL

 

Related Topics

  Subject / Started by Replies Last post
27 Replies
9557 Views
Last post May 19, 2009, 07:33:01 am
by Seldom Fail
10 Replies
15674 Views
Last post January 11, 2014, 03:05:53 am
by Lolcopte
14 Replies
6424 Views
Last post May 18, 2009, 09:32:27 pm
by Seldom Fail
12 Replies
9573 Views
Last post October 01, 2009, 01:58:15 am
by Zion
26 Replies
13955 Views
Last post October 29, 2012, 11:20:59 pm
by WVaGAL