Simple Machine Codes
April 19, 2024, 10:14:34 pm
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to SMC, the best place for your SMF For Free Codes
 
  Home Help Search Arcade Gallery Affiliates Code Index Staff List Calendar Members Login Register  

Automatic Color for Stickied Topics

Pages: [1] 2   Go Down
  Print  
Author Topic: Automatic Color for Stickied Topics  (Read 1918 times)
0 Members and 1 Guest are viewing this topic.
Agent Moose
Administrator

Offline Offline

Gender: Male
Posts: 2,672



View Profile WWW
« on: December 03, 2007, 02:38:20 pm »

Footers:
Code:
<script>
function sticky_topic_color() {
//Created by Agent Moose at smcodes.smfforfree3.com
var color = "COLOR HERE"
if(location.href.match(/board,(\d+)/i)){
b = document.getElementsByTagName("td")
for(a=0;a<b.length;a++){
if(b[a].className == "windowbg3"){
d = b[a].getElementsByTagName('a')[0]
d.innerHTML = "<font color='"+color+"'>" + d.innerHTML + "</font>"
};};};};
sticky_topic_color();
</script>

This will make it so that when ever you have a Stickied topic, the link will automaticly be a diffrent color from all the other topic links.

Just change COLOR HERE to the color you want it to be.
Report Spam   Logged

Share on Facebook Share on Twitter

Myth
Lightning Guardian
Members

Offline Offline

Gender: Male
Posts: 28


Ike for Brawl!


View Profile WWW
« Reply #1 on: December 03, 2007, 03:00:09 pm »

Are there all the basic colors? or do you have to put like the #FFFFF thing?
Report Spam   Logged

Sassy Pants
Members

Offline Offline

Gender: Female
Posts: 42



View Profile
« Reply #2 on: December 03, 2007, 03:11:32 pm »

ok, NOW I know FOR SURE there is something wrong with my forum, this code didnt work for me either  Cry
Report Spam   Logged
Agent Moose
Administrator

Offline Offline

Gender: Male
Posts: 2,672



View Profile WWW
« Reply #3 on: December 03, 2007, 03:14:41 pm »

You may use any color you wish.  that includes like Red, Green, or you using colors like #000000.
Report Spam   Logged

Myth
Lightning Guardian
Members

Offline Offline

Gender: Male
Posts: 28


Ike for Brawl!


View Profile WWW
« Reply #4 on: December 03, 2007, 03:23:36 pm »

Ok thanks Cheesy
Report Spam   Logged

Gordie
Starter

Offline Offline

Gender: Male
Posts: 15



View Profile
« Reply #5 on: December 03, 2007, 03:24:54 pm »

Sassy...what's your forum url?
Report Spam   Logged
Sassy Pants
Members

Offline Offline

Gender: Female
Posts: 42



View Profile
« Reply #6 on: December 03, 2007, 03:30:23 pm »

Check your PM  Wink
Report Spam   Logged
Agent Moose Jr.
Ultra Contagious
Global Moderator

Offline Offline

Gender: Male
Posts: 1,045



View Profile WWW
« Reply #7 on: December 23, 2007, 06:09:18 pm »

very cool code
Report Spam   Logged

Newest:

Coreeeey
Starter

Offline Offline

Posts: 8


View Profile
« Reply #8 on: December 26, 2007, 12:02:38 am »

If I use this code and "Automatic Color For Locked Topic" and I have a topic that is both stickied and locked, which will take precedence?
Report Spam   Logged
Celebrus
Artificially Conscious
Administrator

Offline Offline

Gender: Male
Posts: 1,337


aka Omikron


View Profile WWW
« Reply #9 on: December 26, 2007, 12:50:40 am »

Which ever code is below the other in your footer, I think.
Report Spam   Logged

Agent Moose
Administrator

Offline Offline

Gender: Male
Posts: 2,672



View Profile WWW
« Reply #10 on: December 26, 2007, 07:10:18 am »

I wouldn't know.  But what omikron says would make since.
Report Spam   Logged

Coreeeey
Starter

Offline Offline

Posts: 8


View Profile
« Reply #11 on: December 27, 2007, 12:48:24 am »

Well I tried it. I had 2 topics on a board, both were locked and stickied. Stickies were supposed to turn green, locked were supposed to turn red. One of the topics turned green, and the other turned red. I can remember in which order but they were different colors.
Report Spam   Logged
Agent Moose Jr.
Ultra Contagious
Global Moderator

Offline Offline

Gender: Male
Posts: 1,045



View Profile WWW
« Reply #12 on: December 29, 2007, 01:51:29 pm »

what about for moved topics
Report Spam   Logged

Newest:

Agent Moose Jr.
Ultra Contagious
Global Moderator

Offline Offline

Gender: Male
Posts: 1,045



View Profile WWW
« Reply #13 on: January 15, 2008, 04:27:08 pm »

there is a bug with this! i sticked two topics and one showed up green the other white(like all other posts)
Report Spam   Logged

Newest:

Blahs
100 Club Member

Offline Offline

Posts: 184


Rockstar!


View Profile WWW
« Reply #14 on: March 22, 2008, 11:20:34 pm »

 Hey thanks a lot...
Report Spam   Logged


Join my forums!!!!
Url: http://silabforums.smfforfree4.com/index.php
Pages: [1] 2   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum

Powered by SMF | SMF © 2016, Simple Machines
Privacy Policy