Advertise Here

Author Topic: [Code] Change Username Across Board V5  (Read 6445 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 V5
« on: September 22, 2007, 10:32:25 am »
Add this to the top of 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)
var vfive = new Array();
vfive[vfive.length] = ["OLD NAME","NEW NAME","COLOR","OTHER","1/0","CUSTOM MESSAGE"]

for(l=0;l<vfive.length;l++){
$("a:contains(" + vfive[l][0] + ")").html("<font color='"+vfive[f][2]+"'>"+vfive[f][3]+vfive[f][(vfive[f][1] != "" ? 1 : 0)]+"</font>");
if(vfive[l][4] == '1'){
if(location.href.match(/topic/i)){
$("td b a:contains(vfive[l][0])").after("<div class='custommessage'><strong>Custom Message:</strong><br>"+vfive[l][5]+"</div>");
};};};};
name_across_board();
</script>

Ok, here is V5 of the Change Username Across Board code.  I have added the Custom Message code to it so that you have one code for the price of two!
OLD NAME = The persons name you want to change and give the Custom Message too
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.
1/0 = Put 1 if the person wants a custom message, put 0 if they don't want one
CUSTOM MESSAGE = The custom message that person wants.

If you want to add more users, add more of these lines:
vfive[vfive.length] = ["OLD NAME","NEW NAME","COLOR","OTHER","1/0","CUSTOM MESSAGE"]

I hope you like it!
« Last Edit: June 11, 2009, 09:44:06 am by Agent Moose »
Check out Revolution X's Brand new Code Index!

Offline BadgerGirl*naf

  • SMF For Free Full Member
  • *
  • Posts: 135
    • View Profile
    • MGS Forums

  • Total Badges: 16
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: Change Username Across Board V5
« Reply #1 on: September 22, 2007, 10:33:48 am »
Great code once again... are u gonna add it to our site?

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: Change Username Across Board V5
« Reply #2 on: September 22, 2007, 05:57:32 pm »
Badgergirl, you can do that yourself, just copy and paste into the areas Moose has indicated.  It's really easy after you work with them a little bit.

Moose, I like this and am gonna set it up as soon as I can get a more stable connection.


And I Play:  Mafia-Mandemz

Offline Laugh-nd-kid

  • SMF For Free Master
  • *
  • Posts: 1409
  • Thankyou for this great software SMF For Free!
    • View Profile

  • Total Badges: 21
    Badges: (View All)
    Topic Starter Combination Level 4 Level 3 Level 2
Re: Change Username Across Board V5
« Reply #3 on: September 23, 2007, 12:24:12 pm »
Good code.

Wondering though..

If it's a '0', would you just leave custom message blank? Or remove it.

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 V5
« Reply #4 on: September 24, 2007, 02:27:09 pm »
You would need to put a space in there, or text.  If it is just blank, the whole code will not work.
Check out Revolution X's Brand new Code Index!

Offline Sherry

  • SMF For Free Full Member
  • *
  • Posts: 119
    • View Profile

  • Total Badges: 11
    Badges: (View All)
    Topic Starter Combination Level 2 Level 1 100 Posts
Re: [Code] Change Username Across Board V5
« Reply #5 on: December 28, 2008, 07:25:54 pm »
Forum Url: http://pittcountymomsclub.smfforfree2.com
Can someone take a look and see what is wrong with this code? I can't get it to work.


Code: [Select]
<script>
function name_across_board(){
//Created by Agent Moose (smcodes.smfforfree3.com)
$(function() {
var vfive = new Array()
vfive[vfive.length] = ["Sherry","Sherry","AA00FF","<img src="http://i39.tinypic.com/e6awci.jpg" border="0">","0"," "]
vfive[vfive.length] = ["Rita","Rita","FF00FF","<img src="http://i39.tinypic.com/313rdqd.jpg" border="0">","0"," "]
vfive[vfive.length] = ["zachsmom","zachsmom","348781","<img src="http://i44.tinypic.com/mv52qb.jpg" border="0">","0"," "]
vfive[vfive.length] = ["Michelle","Michelle","32CD99","<img src="http://i44.tinypic.com/2wbucyx.jpg" border="0">","0"," "]
vfive[vfive.length] = ["OAEOverlease","OAEOverlease","00BFFF","<img src="http://i43.tinypic.com/2a6laon.jpg" border="0">","0"," "]
vfive[vfive.length] = ["Nicole","Nicole","66CCFF","<img src="http://i42.tinypic.com/wb2rde.jpg" border="0">","0"," "]

for(l=0;l<vfive.length;l++){
$("a:contains(vfive[l][0])").html("<font color='"+vfive[f][2]+"'>"+vfive[f][3]+vfive[f][(vfive[f][1] != "" ? 1 : 0)]+"</font>")
if (vfive[l][4] == '1') {
if(location.href.match(/topic/i)){
$("td b a:contains(vfive[l][0])").after("<div class='custommessage'><strong>Custom Message:</strong><br>"+vfive[l][5]+"</div>");
};};};});};
</script>

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 V5
« Reply #6 on: December 28, 2008, 07:40:45 pm »
Try doing the image urls this way instead   (using single quotes around the url):

"<img src='IMAGE URL' />"


Offline Sherry

  • SMF For Free Full Member
  • *
  • Posts: 119
    • View Profile

  • Total Badges: 11
    Badges: (View All)
    Topic Starter Combination Level 2 Level 1 100 Posts
Re: [Code] Change Username Across Board V5
« Reply #7 on: December 28, 2008, 07:42:40 pm »
Thanks. I'll try that.

Offline Sherry

  • SMF For Free Full Member
  • *
  • Posts: 119
    • View Profile

  • Total Badges: 11
    Badges: (View All)
    Topic Starter Combination Level 2 Level 1 100 Posts
Re: [Code] Change Username Across Board V5
« Reply #8 on: December 28, 2008, 07:56:50 pm »
Maybe I am just too tired of something but I still can't get it to work. I think I did what you told me too.  :-\

Here is what it looks like now...

Code: [Select]
<script>
function name_across_board(){
//Created by Agent Moose (smcodes.smfforfree3.com)
$(function() {
var vfive = new Array()
vfive[vfive.length] = ["Sherry","Sherry","AA00FF","<img src='http://i39.tinypic.com/e6awci.jpg' />","0"," "]
vfive[vfive.length] = ["Rita","Rita","FF00FF","<img src='http://i39.tinypic.com/313rdqd.jpg' />","0"," "]
vfive[vfive.length] = ["zachsmom","zachsmom","348781","<img src='http://i44.tinypic.com/mv52qb.jpg' />","0"," "]
vfive[vfive.length] = ["Michelle","Michelle","32CD99","<img src='http://i44.tinypic.com/2wbucyx.jpg' />","0"," "]
vfive[vfive.length] = ["OAEOverlease","OAEOverlease","00BFFF","<img src='http://i43.tinypic.com/2a6laon.jpg' />","0"," "]
vfive[vfive.length] = ["Nicole","Nicole","66CCFF","<img src='http://i42.tinypic.com/wb2rde.jpg' />","0"," "]

for(l=0;l<vfive.length;l++){
$("a:contains(vfive[l][0])").html("<font color='"+vfive[f][2]+"'>"+vfive[f][3]+vfive[f][(vfive[f][1] != "" ? 1 : 0)]+"</font>")
if (vfive[l][4] == '1') {
if(location.href.match(/topic/i)){
$("td b a:contains(vfive[l][0])").after("<div class='custommessage'><strong>Custom Message:</strong><br>"+vfive[l][5]+"</div>");
};};};});};
</script> 
 

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 V5
« Reply #9 on: December 28, 2008, 07:59:58 pm »
put a # before each of the color codes

for instance instead of "AAOOFF"  it should be "#AAOOFF"

sorry, I shoulda noticed that as well


Make sure all of the original names are the "usernames" not the "display names" and its case sensitive so be sure that is correct for them as well.
« Last Edit: December 28, 2008, 08:02:31 pm by simply sibyl »

Offline Sherry

  • SMF For Free Full Member
  • *
  • Posts: 119
    • View Profile

  • Total Badges: 11
    Badges: (View All)
    Topic Starter Combination Level 2 Level 1 100 Posts
Re: [Code] Change Username Across Board V5
« Reply #10 on: December 28, 2008, 08:19:18 pm »
Okay I added # before each of the color codes and I doubled checked the spellings and cases of each usernames and made sure that they are not their display names. Still doesn't work.

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 V5
« Reply #11 on: December 29, 2008, 10:05:41 am »
Sherry since it looks like you are only using the part to change the names color and add an image use this code instead...    Places to edit are in Capital Letters - should be pretty self explanatory.    I know this code works.

Code: [Select]
<script>
function name_across_board(){
//Created by Agent Moose (smcodes.smfforfree3.com)
var vfour = new Array()
vfour[vfour.length] = ["OLD NAME","NEW NAME","COLOR","<img src='IMAGE URL' />"];
for(f=0;f<vfour.length;f++){
$("a[href*='u=']").each(function() {
if(this.innerHTML.match(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>

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 V5
« Reply #12 on: December 29, 2008, 01:37:03 pm »
I just went from V4 to V5(this one), removed everything from V4, and tried putting in this one, its not working for me..here is the code I put in my footers:
Code: [Select]
<script>
function name_across_board(){
//Created by Agent Moose (smcodes.smfforfree3.com)
$(function() {
var vfive = new Array()
vfive[vfive.length] = ["Andrew","","#FF0000","<u>","1","Site owner"]
vfive[vfive.length] = ["Chris","","#FF0000","<u>","1","Site designer"]
vfive[vfive.length] = ["Admiral Savvy","","#FF0000","<u> <b> <marquee>","1","Guildmaster"]
vfive[vfive.length] = ["Ben D","","#FF0000","<u>","0"," "]
vfive[vfive.length] = ["Ironhook","","#FF0000","<u>","0"," "]
vfive[vfive.length] = ["Mahek-p","","#FF0000","<u>","1","Site owner"]
vfive[vfive.length] = ["Nautical Nattie","","#33FF00","<marquee> <u>","0","Partner of the week"]

for(l=0;l<vfive.length;l++){
$("a:contains(vfive[l][0])").html("<font color='"+vfive[f][2]+"'>"+vfive[f][3]+vfive[f][(vfive[f][1] != "" ? 1 : 0)]+"</font>")
if (vfive[l][4] == '1') {
if(location.href.match(/topic/i)){
$("td b a:contains(vfive[l][0])").after("<div class='custommessage'><strong>Custom Message:</strong><br>"+vfive[l][5]+"</div>");
};};};});};
</script>

Thanks for anyone that can help!

Offline Pan

  • SMF For Free Member
  • *
  • Posts: 33
    • View Profile
    • MangaFive Forum Community

  • Total Badges: 10
    Badges: (View All)
    Topic Starter Combination Level 2 Level 1 10 Posts
Re: [Code] Change Username Across Board V5
« Reply #13 on: May 18, 2009, 08:52:26 pm »
Can I leave the blank on the "OTHER" and "NEW NAME"?

Offline Seldom Fail

  • Helpers
  • *
  • Posts: 2082
  • Helping for 3 years! :)
    • View Profile
    • My Site!

  • Total Badges: 26
    Badges: (View All)
    Sixth year Anniversary Fifth year Anniversary Apple User Search Poll Voter
Re: [Code] Change Username Across Board V5
« Reply #14 on: May 18, 2009, 09:32:27 pm »
Can I leave the blank on the "OTHER" and "NEW NAME"?

Yes you should be able to.
<--- Donate to SMF For Free! :D

 

Related Topics

  Subject / Started by Replies Last post
50 Replies
13019 Views
Last post July 30, 2007, 09:58:16 am
by Agent Moose
27 Replies
9601 Views
Last post May 19, 2009, 07:33:01 am
by Seldom Fail
10 Replies
15713 Views
Last post January 11, 2014, 03:05:53 am
by Lolcopte
12 Replies
9584 Views
Last post October 01, 2009, 01:58:15 am
by Zion
26 Replies
14008 Views
Last post October 29, 2012, 11:20:59 pm
by WVaGAL