SMF For Free Support Forum
Signup For Free Forum
August 28, 2008, 03:04:49 am *
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: My background colors arent working  (Read 351 times)
0 Members and 1 Guest are viewing this topic.
Mayhem Maker
SMF For Free Full Member
*
Offline Offline

Posts: 199



View Profile WWW
« 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:
<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:
<script src="/jquery.js"></script>
« Last Edit: July 18, 2008, 01:01:31 am by Mayhem Maker » Logged


Click the Banner above to go to the Best Forums in the world!
simply sibyl
Global Moderator
*
Offline Offline

Posts: 7896


I am not a dude!


View Profile WWW
« Reply #1 on: July 18, 2008, 02:23:27 am »

The color codes should be #FFFF33 and #33FF33   

(ya left off the #'s)  Wink

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 » Logged

Mayhem Maker
SMF For Free Full Member
*
Offline Offline

Posts: 199



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


Click the Banner above to go to the Best Forums in the world!
simply sibyl
Global Moderator
*
Offline Offline

Posts: 7896


I am not a dude!


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

Mayhem Maker
SMF For Free Full Member
*
Offline Offline

Posts: 199



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


Click the Banner above to go to the Best Forums in the world!
simply sibyl
Global Moderator
*
Offline Offline

Posts: 7896


I am not a dude!


View Profile WWW
« Reply #5 on: July 18, 2008, 03:26:24 am »

try this:

Code:
<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>
Logged

Mayhem Maker
SMF For Free Full Member
*
Offline Offline

Posts: 199



View Profile WWW
« Reply #6 on: July 18, 2008, 03:32:32 am »

Wow tyvm
it worked
Logged


Click the Banner above to go to the Best Forums in the world!
Agent Moose
Moderator
*****
Offline Offline

Posts: 620


Do not PM me for Code Support or Request


View Profile WWW
« Reply #7 on: July 18, 2008, 09:58:58 pm »

Thanks for that simple Smiley  I forgot to update that code Tongue
Logged

Eternal Flame Coming Soon

SMC Code Index - The best Code Index for all your Needs!  Includes a bunch of codes not on Support.
Mayhem Maker
SMF For Free Full Member
*
Offline Offline

Posts: 199



View Profile WWW
« 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 Smiley
Come out with some new and amazing codes soon
Logged


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


Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.5 | SMF © 2006-2008, Simple Machines LLC
ServerBeach Coupon
Page created in 0.557 seconds with 17 queries.