Advertise Here

Author Topic: [Code] Change Username Across Board v7  (Read 14016 times)

0 Members and 1 Guest 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 v7
« on: December 11, 2008, 06:55:35 pm »
Put this in your Header if you do not already have it:

Code: [Select]
<script src="/jquery.js"></script>

Footers:
Code: [Select]
<script>
var v7 = new Array();
v7[v7.length] = ["ID","NEW NAME","COLOR"];

function name_across_board(){
var Name = document.links;
for(v=0;v<Name.length;v++){
for(x=0;x<v7.length;x++){
if(Name[v].href.match("action=profile;u=" + v7[x][0] + "$") && Name[v].parentNode.tagName == "b"){
Name[v].innerHTML = v7[x][1] != "" ? v7[x][1] : Name[v].innerHTML;
Name[v].style.color = v7[x][2];
};};};};
name_across_board();
</script>

I need to think of a better name than Change Username Across Board v7...I have to many version of this code :P

Anyway, this is just like all the others, but instead of going by the Member Name, it goes by the Members ID.

ID = The Members ID Number (go to Admin > Members to find members ID numbers.)
NEW NAME = the New Name for that member (You may use HTML).  If you don't want that user to have a new name, just leave it blank.
COLOR = The color of that username.

To do this for more then one member add more of these right under the first one:
Code: [Select]
v7[v7.length] = ["ID","NEW NAME","COLOR"];

To use an image before the name:   change that part of the code to this:
Code: [Select]
v7[v7.length] = ["ID","<img src='IMAGE URL'> NEW NAME","COLOR"];
Put your pic's url where it says:   IMAGE URL


Enjoy :)
« Last Edit: June 15, 2009, 10:28:20 am by Agent Moose »
Check out Revolution X's Brand new Code Index!

Offline bamdidyblam

  • SMF For Free Newbie
  • *
  • Posts: 5
    • View Profile

  • Total Badges: 5
    Badges: (View All)
    Topic Starter Level 1 First Post Second year Anniversary One year Anniversary
Re: [Code] Change Username Across Board v7
« Reply #1 on: June 10, 2009, 10:29:46 pm »
ok im confused. the members name im trying to change is connor. so in the member id i type connor then new i typed connor again and then in color i typed orange. and his name is still white. what did i do wrong? also by the "html" does that mean i can add an icon by it?

Offline Andrew

  • Helpers
  • *
  • Posts: 2060
  • Andrew at your service
    • View Profile
    • Alabama Weather Prediction

  • Total Badges: 32
    Badges: (View All)
    10 Poll Votes Level 6 Eighth year Anniversary Seventh year Anniversary Sixth year Anniversary
Re: [Code] Change Username Across Board v7
« Reply #2 on: June 10, 2009, 10:40:54 pm »
ok im confused. the members name im trying to change is connor. so in the member id i type connor then new i typed connor again and then in color i typed orange. and his name is still white. what did i do wrong? also by the "html" does that mean i can add an icon by it?

You did the ID part wrong ;)
To get the members ID, you will need to go to Admin > Members
Connors name will be there, along with the ID, put the ID in the part for ID, and then NEW NAME is optional, then you can put orange for the COLOR part.

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: [Code] Change Username Across Board v7
« Reply #3 on: June 10, 2009, 10:43:51 pm »
ok im confused. the members name im trying to change is connor. so in the member id i type connor then new i typed connor again and then in color i typed orange. and his name is still white. what did i do wrong? also by the "html" does that mean i can add an icon by it?

I think you can only do things like make the name in bold or italic in html there 
There are other codes that let you put images by the names - such as the runescape crown code
There is a Guide for that here:
How to add a runescape crown next to name
You can change the color of their name and use an icon with it using that code
       
« Last Edit: June 12, 2009, 07:53:13 pm by simply sibyl »

Offline 4markie

  • SMF For Free Full Member
  • *
  • Posts: 141
    • View Profile
    • MARS- Markie's Action Replay Site

  • Total Badges: 14
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: [Code] Change Username Across Board v7
« Reply #4 on: June 12, 2009, 06:36:27 pm »
Andrew, i think there's a problem with that code (I tried it and it didn't work), can you take a look at it please?




*faulty code edited out of post
« Last Edit: June 12, 2009, 07:52:50 pm by simply sibyl »

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: [Code] Change Username Across Board v7
« Reply #5 on: June 12, 2009, 07:40:22 pm »
4Markie hi.   The code Andrew posted would not work because the original code was messed up.
Moose fixed it -  Ive cleared out those posts so no one else winds up using that one.

This code would work better for you for what you are wanting to do:
How to add a runescape crown next to name
 
« Last Edit: June 12, 2009, 07:52:07 pm by simply sibyl »

Offline 4markie

  • SMF For Free Full Member
  • *
  • Posts: 141
    • View Profile
    • MARS- Markie's Action Replay Site

  • Total Badges: 14
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: [Code] Change Username Across Board v7
« Reply #6 on: June 12, 2009, 08:03:01 pm »
4Markie hi.   The code Andrew posted would not work because the original code was messed up.
Moose fixed it -  Ive cleared out those posts so no one else winds up using that one.

This code would work better for you for what you are wanting to do:
How to add a runescape crown next to name
 

Oh thanks  :uglystupid2:. I already am using that version of the RS crowns code. The code that Andrew posted was exactly what I was looking for because I was searching for another version of the runescape crowns code. But it didn't turn out to work, and now I know why :D.

Thanks anyhow
« Last Edit: June 12, 2009, 08:06:14 pm by 4markie »

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: [Code] Change Username Across Board v7
« Reply #7 on: June 12, 2009, 08:07:42 pm »
Here -  I did it as Andrew did but with the updated code:
(tested and it works)

Code: [Select]
<script>
var v7 = new Array();
v7[v7.length] = ["ID","<img src='IMAGE URL'> NEW NAME","COLOR"];

function name_across_board(){
var Name = document.links;
for(v=0;v<Name.length;v++){
for(x=0;x<v7.length;x++){
if(Name[v].href.match("action=profile;u=" + v7[x][0] + "$")){
Name[v].innerHTML = v7[x][1] != "" ? v7[x][1] : Name[v].innerHTML;
Name[v].style.color = v7[x][2];
};};};};
name_across_board();
</script>

*added directions for using an image with the code to the first post
« Last Edit: June 12, 2009, 08:13:09 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: [Code] Change Username Across Board v7
« Reply #8 on: June 12, 2009, 09:33:16 pm »
Sweet :)  Thanks for editing the post simple :D
Check out Revolution X's Brand new Code Index!

Offline 4markie

  • SMF For Free Full Member
  • *
  • Posts: 141
    • View Profile
    • MARS- Markie's Action Replay Site

  • Total Badges: 14
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: [Code] Change Username Across Board v7
« Reply #9 on: June 12, 2009, 09:37:19 pm »
Here -  I did it as Andrew did but with the updated code:
(tested and it works)

Code: [Select]
<script>
var v7 = new Array();
v7[v7.length] = ["ID","<img src='IMAGE URL'> NEW NAME","COLOR"];

function name_across_board(){
var Name = document.links;
for(v=0;v<Name.length;v++){
for(x=0;x<v7.length;x++){
if(Name[v].href.match("action=profile;u=" + v7[x][0] + "$")){
Name[v].innerHTML = v7[x][1] != "" ? v7[x][1] : Name[v].innerHTML;
Name[v].style.color = v7[x][2];
};};};};
name_across_board();
</script>

*added directions for using an image with the code to the first post

Thanks simple :)

Offline 4markie

  • SMF For Free Full Member
  • *
  • Posts: 141
    • View Profile
    • MARS- Markie's Action Replay Site

  • Total Badges: 14
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: [Code] Change Username Across Board v7
« Reply #10 on: June 12, 2009, 09:50:09 pm »
I've just discovered a bug with this code, this code will change anything that links back to the addressed profile into what you put as "NEW NAME"

(EX: The "View profile" button on your posts will be changed to what you put as "NEW NAME")

Is there a way around this?

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: [Code] Change Username Across Board v7
« Reply #11 on: June 12, 2009, 10:22:42 pm »
ack!    Moose will have to fix this.

Offline 4markie

  • SMF For Free Full Member
  • *
  • Posts: 141
    • View Profile
    • MARS- Markie's Action Replay Site

  • Total Badges: 14
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: [Code] Change Username Across Board v7
« Reply #12 on: June 13, 2009, 09:23:57 am »
ack!    Moose will have to fix this.

I'll post a screenshot in a minute.  ;)

UPDATE: Here's the screenshot



Look inside the red box in the image, the "view profile" icon is changed. I'm assuming the fact it links back to your profile is causing this to happen.  :o
« Last Edit: June 13, 2009, 09:32:29 am by 4markie »

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: [Code] Change Username Across Board v7
« Reply #13 on: June 13, 2009, 12:17:18 pm »
Agh. (is that even a word?)

Anyway, I know why it does this, but I can't fix the code till I get back home. (I'm at my grandparents house ^_^)  I will be getting back sometime tomorrow.  I shall try to fix it then :)
Check out Revolution X's Brand new Code Index!

Offline Games

  • SMF For Free Member
  • *
  • Posts: 43
    • View Profile
    • Games

  • Total Badges: 11
    Badges: (View All)
    Apple User Topic Starter Combination Level 2 Level 1
Re: [Code] Change Username Across Board v7
« Reply #14 on: June 13, 2009, 04:45:39 pm »
Cool. Runescape is very popular, so this should go over well  :D

www.everygame.smfforfree.com
If you even remotely like games, join today!

 

Related Topics

  Subject / Started by Replies Last post
50 Replies
13030 Views
Last post July 30, 2007, 09:58:16 am
by Agent Moose
27 Replies
9605 Views
Last post May 19, 2009, 07:33:01 am
by Seldom Fail
10 Replies
15720 Views
Last post January 11, 2014, 03:05:53 am
by Lolcopte
14 Replies
6448 Views
Last post May 18, 2009, 09:32:27 pm
by Seldom Fail