Advertise Here

Author Topic: My background colors arent working  (Read 2247 times)

0 Members and 1 Guest are viewing this topic.

Offline Mayhem Maker

  • SMF For Free Full Member
  • *
  • Posts: 194
    • View Profile
    • Mayhem Maker's Forums!

  • Total Badges: 15
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
My background colors arent working
« on: July 18, 2008, 12:40:06 am »
Forum Url: http://extr3m3gaming.smfforfree4.com
I followed this tutorial to make it like the runescape forums,when admins/mods post the backgrounds sections are different.
Here's my footer:
Code: [Select]
<script>
if (location.href.match("topic,")){
var postColor = new Array()
postColor[postColor.length] = ["Administrator","FFFF33"]
postColor[postColor.length] = ["Global Moderator","33FF33"]



for(f=0;f<postColor.length;f++){
$($("tbody").contains(postColor[f][0])).each(function(){
$(this).addClass(postColor[f][0]+"Class")
});
document.write("<st"+"yle>."+postColor[f][0]+"Class{background-color: "+postColor[f][1]+";}</st"+"yle>")
};};
</script>
and Header:
Code: [Select]
<script src="/jquery.js"></script>
« Last Edit: July 18, 2008, 01:01:31 am by Mayhem Maker »

Click the Banner above to go to the Best Forums in the world!

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: My background colors arent working
« Reply #1 on: July 18, 2008, 02:23:27 am »
The color codes should be #FFFF33 and #33FF33   

(ya left off the #'s)  ;)

moving this to the codes board.
psst is easier if you reply to the code you are having trouble with..   keeps it all together
« Last Edit: July 18, 2008, 02:25:08 am by simply sibyl »

Offline Mayhem Maker

  • SMF For Free Full Member
  • *
  • Posts: 194
    • View Profile
    • Mayhem Maker's Forums!

  • Total Badges: 15
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: My background colors arent working
« Reply #2 on: July 18, 2008, 03:04:00 am »
I didn't post on it,because it was from agent mooses code site.I didn't register :S
I did what you said and added the # before each code..
Still doesn't work..
You can check yourself :s
www.extr3m3gaming.smfforfree4.com

Click the Banner above to go to the Best Forums in the world!

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: My background colors arent working
« Reply #3 on: July 18, 2008, 03:05:49 am »
Check this thread... specifically the post by Pancakes with the code in it.   That code does work.

http://www.smfsupport.com/support/smf_for_free_codes/code_group_post_background_color-t6068.0.html;msg48913#msg48913

Offline Mayhem Maker

  • SMF For Free Full Member
  • *
  • Posts: 194
    • View Profile
    • Mayhem Maker's Forums!

  • Total Badges: 15
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: My background colors arent working
« Reply #4 on: July 18, 2008, 03:18:53 am »
Check this thread... specifically the post by Pancakes with the code in it.   That code does work.

http://www.smfsupport.com/support/smf_for_free_codes/code_group_post_background_color-t6068.0.html;msg48913#msg48913
Gah,I tried that.
Didn't Work.

Click the Banner above to go to the Best Forums in the world!

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: My background colors arent working
« Reply #5 on: July 18, 2008, 03:26:24 am »
try this:

Code: [Select]
<script>
if (location.href.match("topic,")){
var postColor = new Array()
postColor[postColor.length] = ["Administrator","#FFFF33"]
postColor[postColor.length] = ["Global Moderator","#33FF33"]
for(f=0;f<postColor.length;f++){
$("tbody:contains(" + postColor[f][0] + ")").each(function(){
$(this).addClass(postColor[f][0]+"Class");
});
document.write("<st"+"yle>." + postColor[f][0] + "Class{background-color: " + postColor[f][1] +";}</st"+"yle>")
};};
</script>

Offline Mayhem Maker

  • SMF For Free Full Member
  • *
  • Posts: 194
    • View Profile
    • Mayhem Maker's Forums!

  • Total Badges: 15
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: My background colors arent working
« Reply #6 on: July 18, 2008, 03:32:32 am »
Wow tyvm
it worked

Click the Banner above to go to the Best Forums in the world!

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: My background colors arent working
« Reply #7 on: July 18, 2008, 09:58:58 pm »
Thanks for that simple :)  I forgot to update that code :P
Check out Revolution X's Brand new Code Index!

Offline Mayhem Maker

  • SMF For Free Full Member
  • *
  • Posts: 194
    • View Profile
    • Mayhem Maker's Forums!

  • Total Badges: 15
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: My background colors arent working
« Reply #8 on: July 21, 2008, 12:12:37 am »
Yeah,you might wanna update it :p
It was a very nice code Moose,all your codes are amazing :)
Come out with some new and amazing codes soon

Click the Banner above to go to the Best Forums in the world!

 

Related Topics

  Subject / Started by Replies Last post
3 Replies
1295 Views
Last post June 21, 2007, 09:34:16 pm
by Kimmie
6 Replies
1075 Views
Last post February 05, 2008, 02:41:45 pm
by mumzplace
2 Replies
910 Views
Last post May 30, 2008, 07:59:36 pm
by melisamarie
4 Replies
1245 Views
Last post August 29, 2008, 07:55:26 am
by brad9993
5 Replies
2020 Views
Last post November 25, 2008, 12:52:58 pm
by simply sibyl