Advertise Here

Author Topic: [Code] Change "Moderator" Text  (Read 5081 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 "Moderator" Text
« on: June 22, 2007, 12:26:02 am »
Place in Footers.
Code: [Select]
<script>
function change_moderator_text_v2(one,plural) {
//Created by Agent Moose at smcodes.smfforfree3.com
var div = document.getElementsByTagName("div");
for(x=0;x<div.length;x++){
if(div[x].innerHTML.match("Moderator: || Moderators:")){
div[x].innerHTML = div[x].innerHTML.replace("Moderator:",one);
div[x].innerHTML = div[x].innerHTML.replace("Moderators:",plural);
};};};
change_moderator_text_v2("ONE MODERATOR","MORE THAN ONE MODERATOR");
</script>

ONE MODERATOR = If there is only one moderator, (EG: Leader:)
MORE THAN ONE MODERATOR = If there is more than one moderator(EG: Leaders:[It will automaticly change when you have more than one moderator...])

You may Use HTML with this code too :)
« Last Edit: May 02, 2008, 09:33:19 pm by Agent Moose »
Check out Revolution X's Brand new Code Index!

Offline neko-ka-san

  • SMF For Free Member
  • *
  • Posts: 64
  • I make graphics!
    • View Profile
    • http://kurenaishi.smfforfree3.com

  • Total Badges: 14
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: Change "Moderator" Text
« Reply #1 on: June 22, 2007, 11:45:04 am »
Moose, I need to put <script> and </script> on top and bottom of the code right?

Don't steal codes or graphics! The credits penguins will find you and take your soul!

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 "Moderator" Text
« Reply #2 on: June 22, 2007, 11:46:16 am »
Woops, yea ya do.  I will edit the code.  Sorry abou that.
Check out Revolution X's Brand new Code Index!

Offline neko-ka-san

  • SMF For Free Member
  • *
  • Posts: 64
  • I make graphics!
    • View Profile
    • http://kurenaishi.smfforfree3.com

  • Total Badges: 14
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: Change "Moderator" Text
« Reply #3 on: June 22, 2007, 11:53:51 am »
It's okay. I'm glad I know at least that much about javascript. The code works great thanks a whole bunch!! :D

Don't steal codes or graphics! The credits penguins will find you and take your soul!

Offline deathwilldie

  • Style Designer
  • *
  • Posts: 770
  • Give me an idea for a Stylesheet
    • View Profile
    • Revolution X

  • Total Badges: 28
    Badges: (View All)
    Tenth year Anniversary Nineth year Anniversary Search Eighth year Anniversary Seventh year Anniversary
Re: Change "Moderator" Text
« Reply #4 on: June 22, 2007, 04:49:57 pm »
Very nice code.  I was wondering when you were going to make it.

Offline neko-ka-san

  • SMF For Free Member
  • *
  • Posts: 64
  • I make graphics!
    • View Profile
    • http://kurenaishi.smfforfree3.com

  • Total Badges: 14
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: Change "Moderator" Text
« Reply #5 on: June 22, 2007, 07:50:46 pm »
Moose, just another thing. This code works fine when I have one moderator on it, but if I add another person it changes back to original moderators. Does it change like that because it becomes plural?

Don't steal codes or graphics! The credits penguins will find you and take your soul!

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 "Moderator" Text
« Reply #6 on: June 22, 2007, 08:00:00 pm »
hmmm..Yep.  That would be it.  I will try to make it so that it will change the text no matter what.

Try this:
Code: [Select]
<script>
function change_moderator_text() {
//Created by Agent Moose at smcodes.smfforfree3.com
$(function() {
text = "YOUR TEXT HERE"
$("div.smalltext").each(function() {
if(this.innerHTML.match(/Moderators:/i)) {
this.innerHTML = this.innerHTML.replace("Moderators:",""+text+"");
}});});}
change_moderator_text();
</script>
« Last Edit: June 22, 2007, 08:02:19 pm by Agent Moose »
Check out Revolution X's Brand new Code Index!

Offline neko-ka-san

  • SMF For Free Member
  • *
  • Posts: 64
  • I make graphics!
    • View Profile
    • http://kurenaishi.smfforfree3.com

  • Total Badges: 14
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: Change "Moderator" Text
« Reply #7 on: June 22, 2007, 09:15:32 pm »
It worked! Thanks Moose!

Don't steal codes or graphics! The credits penguins will find you and take your soul!

Offline Bullet_RHLI

  • SMF For Free Full Member
  • *
  • Posts: 174
  • Join Massive Gaming Site Forums!!!
    • View Profile
    • Agent Mooses Rewind

  • Total Badges: 18
    Badges: (View All)
    Topic Starter Combination Level 4 Level 3 Level 2
Re: Change "Moderator" Text
« Reply #8 on: June 22, 2007, 11:16:13 pm »
what is this for, I dont understand
Thanks Hurrican47 For Making This

you want to apply for staff, please pm me!!!

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 "Moderator" Text
« Reply #9 on: June 22, 2007, 11:43:37 pm »
It changes the text that showes who is the moderators of the board.
Check out Revolution X's Brand new Code Index!

Offline Bullet_RHLI

  • SMF For Free Full Member
  • *
  • Posts: 174
  • Join Massive Gaming Site Forums!!!
    • View Profile
    • Agent Mooses Rewind

  • Total Badges: 18
    Badges: (View All)
    Topic Starter Combination Level 4 Level 3 Level 2
Re: Change "Moderator" Text
« Reply #10 on: June 23, 2007, 12:03:35 am »
can u post a picture of what u mean, I still dont understand
Thanks Hurrican47 For Making This

you want to apply for staff, please pm me!!!

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 "Moderator" Text
« Reply #11 on: June 23, 2007, 12:35:24 am »


It changes the text that is in the red box.
Check out Revolution X's Brand new Code Index!

 

Related Topics

  Subject / Started by Replies Last post
10 Replies
3146 Views
Last post April 01, 2008, 08:23:03 am
by Vice
3 Replies
3263 Views
Last post July 27, 2007, 05:10:31 pm
by doggiedoo86
6 Replies
2382 Views
Last post October 17, 2008, 11:19:15 am
by - Lawrence -
12 Replies
4301 Views
Last post December 20, 2008, 05:55:31 pm
by OutOfOrder
3 Replies
2225 Views
Last post September 01, 2009, 12:32:55 am
by Jish