![]() |
Css thread color style
I would like to do this:
If a thread title contains [Accepted] I would like that the threads title color to change to green, if it contains [Rejected] to change the color to red and if contains the tag [Pending] to change to yellow. I was thinking to do it like this in additional.css: a switch: case 1 [Accepted] a.title {color:green;} | case 2 [Rejected] a.title {color:red;} | case 3 [Pending] a.title {color:yellow;} I know it's php/css and that c/c++ doesn't quite fit here, but I'm open to suggestions. Thank you :) |
Is [Accepted], [Rejected], [Pending] Thread Prefixes, that you assign to threads based on some criteria, or is it some text you add to them?
|
Those tags are prefixes to whom only administrators have access.
|
Ok I think I may be able to do something, I'll get back to you when I have a chance to play around.
|
Actually it's easier than you think. Go into the ACP>Thread Prefixes>Thread Prefix Manager now either make a new prefix or edit an old one.
Once you reach the screen where you set the ID, title, etc, you should see a link below the two title's. Note, you'll need to save the prefix first and to this screen if you're creating a new one. Click on the link beneath Title (Rich Text). It'll popup a tab/page called Phrase Manager. Here you can use Html code to stylize your prefix. For instance, if you wanted a green colored [Accepted] prefix, you would use the html code: HTML Code:
<span style="color: green;">[Accepted]</span> Also note you'll have to add the prefix title manually like I did in the code. It replaces the generic title with the colored version. If you know html and the style property you can make some pretty amazing prefixes. I used backgrounds on the ones I made. Theoretically, I haven't tried it myself, you could even use images as a prefix. Hope this helped ^^ |
He wants the thread title to change color also, if I understand correctly.
|
Waiting :) -- I have a feeling @Ozzy47 is already working on this. If he is not (and I would be surprised) I will jump in.
|
I am just dabbling at the moment, if you want to play, feel free. :)
--------------- Added 30 Sep 2013 at 18:27 --------------- It does not appear to be as easy as I assumed, unless my brain is fried and I can't think right. :( |
Yes you understood corectly.
I want the entire thread title to change color depending the prefix it has. I might provide a work-around, but I think it's not safe: <font color="red">[Rejected] etc. And leave the html tags unclosed. From my perspective unclosed html tags can be a vulnerability add to a software. |
I doubt that would work, and probably would break the display, coloring things it should not.
|
All times are GMT. The time now is 10:07 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|