The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Alt. colour based on style
I'm hoping this isn't a programming question, but I'll start here.
I have two styles; black and white. Default text colours work correctly, as they should (light on the black, dark on the white). However, I also need to be able to post snippets in news items in a different colour to the rest of the (default) text. I can't select a colour from the colour chooser, as one colour won't be suitable for both styles. So I need a way to select a 'alt default' colour which changes depending on the style in the same way that the default colour does. So... how would I do that? Thanks! |
#2
|
||||
|
||||
"post snippets in news items" ??? Where is this? Are you talking about making regular posts or what? I would say to use a class and then define that class in that style, but that may not work depending on where you are talking about these "post snippets".
|
#3
|
|||
|
|||
By "posts snippets in news items" I mean "part of the text in a post, usually using the CMS, but sometimes a regular forum post too".
Like this: This is a new item. It contains a snippet like this: "This is the snippet. It's a different colour. This colour depends on what style I'm using." Continuing the news item in regular forum default colour. |
#4
|
||||
|
||||
Sounds like you need a BB code that makes anything under it the second alternate color of the style?
|
#5
|
|||
|
|||
Is there a second alternate colour setting somewhere? Or are we talking programming templates and conditionals and stuff here?
|
#6
|
||||
|
||||
Quote:
At least that's where to find it in vB3.8.7 - not sure if that's true of v4. Scroll down until you find "Second Alternating Color." You don't necessarily want to change that, you want to be able to call to it in script. In script, that call looks like <td class="alt2" or "alt1" |
#7
|
|||
|
|||
I don't have 3.x; but from what I recall what you're referring to there is table row background colours, not font colours?
|
#8
|
||||
|
||||
You are right for some reason I was thinking of bg, like a quote box.
However if you create a custom BB code that allows you to pick any HEX color (such as #001D3E as a example) or even a pre-set one, it would apply to the type inside the BB tags, correct? Only question now is, how to construct that custom BB code. |
#9
|
||||
|
||||
You could add a special bbcode for it. Something that adds a class:
<span class="alt2">YOUR TEXT HERE</span> and then you just define .alt2 in your additional.css template for each style. |
#10
|
||||
|
||||
^^ DING DING DING!
Or you could even call up a already existing "additional css template" from the style if it's appropriate. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|