October 22, 2018, 01:35:26 pm
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to Revolution X, where Coding meets Graphics.
 
  Home Help Search Arcade Affiliates Staff List Calendar Members Login Register  

Automatic Color for Stickied Topics v2

Pages: [1]   Go Down
  Print  
Author Topic: Automatic Color for Stickied Topics v2  (Read 767 times)
Agent Moose
Administrator
Adminitrator
Offline Offline

Gender: Male
Posts: 1,470



View Profile WWW
Badges: (View All)
« on: March 21, 2009, 09:36:10 am »

Footers:
Code:
<script>
var BegText = "TEXT";
var Color = "COLOR";

//Created by Agent Moose (revolutionx.smfforfree3.com)
$("td.windowbg3 img[id*='stickyicon']").next().find("a").css("color",Color).end().before(BegText);
</script>

Original Request: http://revolutionx.smfforfree3.com/index.php/topic,449.0.html

TEXT = The text that will show up in front of the sticky topic.
COLOR = The Color of the topic link.

Enjoy Smiley
« Last Edit: March 21, 2009, 09:37:58 am by Agent Moose » Report Spam   Logged


Social Buttons

Lyle
MeTube
Member
Member
Offline Offline

Gender: Male
Posts: 69



View Profile
Badges: (View All)
« Reply #1 on: June 07, 2009, 04:04:03 pm »

this never really worked out for me, since the stickied topics are a darker color and at the top
Report Spam   Logged
Mojobojo82
MVP
MVP
Offline Offline

Gender: Male
Posts: 838


View Profile
Badges: (View All)
« Reply #2 on: June 13, 2009, 09:58:31 am »

I'm not 100% sure... So what does this code do?
Report Spam   Logged






Andrew
Exclusive
Exclusive
Offline Offline

Gender: Male
Posts: 539



View Profile WWW
Badges: (View All)
« Reply #3 on: June 13, 2009, 11:55:05 am »

It will color all the stickied topics in a board, works for all boards.

Heres an example:
Code:
<script>
var BegText = "Sticky: ";
var Color = "green";

//Created by Agent Moose (revolutionx.smfforfree3.com)
$("td.windowbg3 img[id*='stickyicon']").next().find("a").css("color",Color).end().before(BegText);
</script>

It would color all the stickied topics to green, and add the text Sticky: to the left of it. Smiley
Report Spam   Logged

Mojobojo82
MVP
MVP
Offline Offline

Gender: Male
Posts: 838


View Profile
Badges: (View All)
« Reply #4 on: June 14, 2009, 02:02:49 am »

Ooh... Awesome I'm going to add it now  Wink
Report Spam   Logged






Nick
Member
Member
Offline Offline

Gender: Male
Posts: 48


View Profile
Badges: (View All)
« Reply #5 on: June 16, 2009, 11:53:02 am »

Just curious as to whether or not it's possible to change the "Sticky" text color.

eg. "Sticky: Forum Rules"

Is there anyway to make it say "Sticky: Forum Rules"  ?

I'm just sort of hesitant to use the <font> tag.

This is a great code, btw. Thanks
« Last Edit: June 16, 2009, 12:43:05 pm by Nick » Report Spam   Logged
Exilis
Optimistic & Creative
Global Moderator
Global Moderator
Offline Offline

Posts: 929


View Profile
Badges: (View All)
« Reply #6 on: June 16, 2009, 03:09:45 pm »

@Nick:
Yup, you can use the font tag. I just tested it. Just remember to use single quotes instead of double quotes, like this:
Code:
<script>
var BegText = "<font color='green'>Sticky: </font>";
var Color = "green";

//Created by Agent Moose (revolutionx.smfforfree3.com)
$("td.windowbg3 img[id*='stickyicon']").next().find("a").css("color",Color).end().before(BegText);
</script>
Report Spam   Logged

Global Mod, (sort of) at your service.

http://twitter.com/timothyaveni

Mojobojo82
MVP
MVP
Offline Offline

Gender: Male
Posts: 838


View Profile
Badges: (View All)
« Reply #7 on: June 17, 2009, 01:57:12 am »

Thanks SyntaxBlitz, I was wondering the same question just forgot to post  Roll Eyes
Report Spam   Logged






Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum | Buy traffic for your forum/website

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