Advertise Here

Author Topic: [Code] Change Username Across Board V4  (Read 13153 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 V4
« on: July 27, 2007, 09:20:10 pm »
Add this to your headers if you don't have it:
Code: [Select]
<script src="/jquery.js"></script>Footers:
Code: [Select]
<script>
function name_across_board() {
//Created by Agent Moose (smcodes.smfforfree3.com)
$(function() {
var vfour = new Array()
vfour[vfour.length] = ["Agent Moose","","orange","<b>"]
vfour[vfour.length] = ["OLD NAME","NEW NAME","COLOR","OTHER"]

for(f=0;f<vfour.length;f++){
$("a").each(function() {
if(this.innerHTML == vfour[f][0]){this.innerHTML = this.innerHTML.replace(vfour[f][0],"<font color='" + vfour[f][2] + "'>" + vfour[f][3] + vfour[f][(vfour[f][1] != "" ? 1 : 0)] + "</font>");};
});};});}
name_across_board();
</script>

OLD NAME = The persons name you want to change
NEW NAME = (OPTIONAL) This will give a new name to the person.
COLOR = The color of the username
OTHER = You may add any HTML here.

If you notice, I made this code more like V2 of it, but with some changes.  It will not change the whole link to the name, if the name of the person is in it.  If that makes since.
« Last Edit: June 04, 2008, 10:47:12 am by simply sibyl »
Check out Revolution X's Brand new Code Index!

Offline HIW

  • SMF For Free Member
  • *
  • Posts: 56
    • View Profile

  • Total Badges: 11
    Badges: (View All)
    Topic Starter Combination Level 2 Level 1 50 Posts
Re: [Code] Change Username Across Board V4
« Reply #1 on: March 06, 2008, 10:08:24 am »
Not wanting to sound like a noob... but can you explain what it exactly is please?

I.e. what it does...

Offline LaundryLady

  • Helpers
  • *
  • Posts: 3253
  • Internet Challenged
    • View Profile

  • Total Badges: 26
    Badges: (View All)
    Seventh year Anniversary Sixth year Anniversary Search Poll Voter Level 5
Re: [Code] Change Username Across Board V4
« Reply #2 on: March 06, 2008, 10:15:09 am »
You can change a persons Display name to some thing special.  You can also can the color that they show up in the index.  Say you have a member that needs a special color and they are not staff, you can change it there.  You can also give them an image or such with html.

It's a nice little code.  I used it for a while and will  probably be putting it back when I get time.


And I Play:  Mafia-Mandemz

Offline HIW

  • SMF For Free Member
  • *
  • Posts: 56
    • View Profile

  • Total Badges: 11
    Badges: (View All)
    Topic Starter Combination Level 2 Level 1 50 Posts
Re: [Code] Change Username Across Board V4
« Reply #3 on: March 06, 2008, 10:36:13 am »
You can change a persons Display name to some thing special.  You can also can the color that they show up in the index.  Say you have a member that needs a special color and they are not staff, you can change it there.  You can also give them an image or such with html.

It's a nice little code.  I used it for a while and will  probably be putting it back when I get time.

Why not just go into their profile? Surely it's easier...

Offline LaundryLady

  • Helpers
  • *
  • Posts: 3253
  • Internet Challenged
    • View Profile

  • Total Badges: 26
    Badges: (View All)
    Seventh year Anniversary Sixth year Anniversary Search Poll Voter Level 5
Re: [Code] Change Username Across Board V4
« Reply #4 on: March 06, 2008, 10:55:49 am »
For part of it you can, but if you want to make someone who isn't staff and you don't want to put them in their own member group this can help.  You can give them their own color and graphic for instance. 



And I Play:  Mafia-Mandemz

Offline HIW

  • SMF For Free Member
  • *
  • Posts: 56
    • View Profile

  • Total Badges: 11
    Badges: (View All)
    Topic Starter Combination Level 2 Level 1 50 Posts
Re: [Code] Change Username Across Board V4
« Reply #5 on: March 06, 2008, 12:13:41 pm »
Ah right I getcha... rather clever really :)

Offline Elijah

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

  • Total Badges: 8
    Badges: (View All)
    Topic Starter Combination Level 2 Level 1 First Post
Re: [Code] Change Username Across Board V4
« Reply #6 on: October 28, 2008, 09:51:53 pm »
im kinda confused on this...

I know im new but its just that im looking for the header and cant find it lol...

I probaly sound so noobish right now but i need help...

Thanks,
Elijah

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 V4
« Reply #7 on: October 28, 2008, 09:52:33 pm »
Admin > Manage Styles >  Edit Header/Footer

Offline Elijah

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

  • Total Badges: 8
    Badges: (View All)
    Topic Starter Combination Level 2 Level 1 First Post
Re: [Code] Change Username Across Board V4
« Reply #8 on: October 29, 2008, 08:37:27 pm »
oh okay thanks  8)

Offline мσנσвσנσ82

  • SMF For Free Sr. Member
  • *
  • Posts: 310
    • View Profile
    • Darkilscape

  • Total Badges: 14
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: [Code] Change Username Across Board V4
« Reply #9 on: June 22, 2009, 04:05:48 am »
Cool code.
Adding it now



Offline Lolcopte

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

  • Total Badges: 4
    Badges: (View All)
    Topic Starter Level 1 First Post Windows User
Re: [Code] Change Username Across Board V4
« Reply #10 on: January 11, 2014, 03:05:53 am »
sorry for gravedigging,again.
but in the new SMF version : 2.0.6
i cant seem to find the header/footer.
i used global headers & footers mod but it did not work.
please help :P

cheers :D.

 

Related Topics

  Subject / Started by Replies Last post
50 Replies
8562 Views
Last post July 30, 2007, 09:58:16 am
by Agent Moose
27 Replies
6616 Views
Last post May 19, 2009, 07:33:01 am
by Seldom Fail
14 Replies
4939 Views
Last post May 18, 2009, 09:32:27 pm
by Seldom Fail
12 Replies
8288 Views
Last post October 01, 2009, 01:58:15 am
by Zion
26 Replies
10088 Views
Last post October 29, 2012, 11:20:59 pm
by WVaGAL