SMF For Free Support Forum
Signup For Free Forum
October 06, 2008, 04:52:39 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome to SMF For Free. The best free SMF Host
 
   Home   Help Search Arcade Gallery Login Register  

Pages: [1]
  Print  
Author Topic: [Code] Change Username Across Board V4  (Read 4188 times)
0 Members and 1 Guest are viewing this topic.
Agent Moose
Moderator
*****
Offline Offline

Posts: 635


Do not PM me for Code Support or Request


View Profile
« on: July 27, 2007, 09:20:10 pm »

Add this to your headers if you don't have it:
Code:
<script src="/jquery.js"></script>
Footers:
Code:
<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 » Logged

SMC Code Index - The best Code Index for all your Needs!  Includes a bunch of codes not on Support.[/center]
HIW
SMF For Free Member
*
Offline Offline

Posts: 53


View Profile
« 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...
Logged
LaundryLady
Global Moderator
*
Offline Offline

Posts: 3046



View Profile WWW
« 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.
Logged

HIW
SMF For Free Member
*
Offline Offline

Posts: 53


View Profile
« 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...
Logged
LaundryLady
Global Moderator
*
Offline Offline

Posts: 3046



View Profile WWW
« 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. 

Logged

HIW
SMF For Free Member
*
Offline Offline

Posts: 53


View Profile
« Reply #5 on: March 06, 2008, 12:13:41 pm »

Ah right I getcha... rather clever really Smiley
Logged


Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.6 | SMF © 2006-2008, Simple Machines LLC
ServerBeach Coupon
Page created in 0.189 seconds with 16 queries.