The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Thread Title color code by forum id
Hi All,
I would like to colour code Thread Titles according to what forum they are posted in. I have found this which is aimed at color coding threads from specific forumids in search results, will this work for forums in general and if so where do i need to put it? <vb:if condition="$show['forumlink'] AND in_array($thread['forumid'], array(x,y,z))">style="color: #123456"</vb:if> |
#2
|
||||
|
||||
|
#3
|
|||
|
|||
This only allows for thread types to be prefixed and color coded, I am wanting to color code thread titles different colors based on what forum they are in for example.
In the For Sale forum I would like all threat titles to be Blue In the Wanted forum I would like all thread titles to be Red etc etc |
#4
|
||||
|
||||
Just add a class to the title and use CSS.
class="title{vb:raw thread.forumid}" Then define title1 (title2, title3, etc.) in the additional.css template edit: Actually, adding the class may not be necessary as the forumid may be already there. A link to your site and the page you want to change the titles on would help. |
#5
|
|||
|
|||
Thanks Lynne,
Can you give me an example of how it should look Here is the page I want all thread title to appear blue: http://www.australianreptileforum.co...p?122-Reptiles and here is the page i want all thread titles to appear Red: http://www.australianreptileforum.co...php?124-Wanted |
#6
|
||||
|
||||
I guess the forumid isn't used as an id on the forumdisplay page. So, modify the FORUMDISPLAY template and add it as a class to the<body> tag - <body class="forum{vb:raw forumid}"> - and then in additional.css you can add something like:
.forum122 .threadbit a.title {color: blue;} .forum124 .threadbit a.title {color: red;} |
#7
|
|||
|
|||
Thanks Lynne this worked great
Is there a way to make it show the threat colours regardless of where the thread is displayed, e.g in Searches or in a Master Forum where all threads are displayed? |
#8
|
||||
|
||||
I would think so, using a similar method to what I outlined. Without a link to the page, and a description of exactly what you want, I can't be more specific.
|
#9
|
|||
|
|||
Hi Lynne,
This is the other site I am working on at the moment this is the Master forum using this mod: https://vborg.vbsupport.ru/showthread.php?t=245839 All forum threads are displayed here I want the For Sale threads to show blue here and the Wanted Threads to show Red etc http://reptilesdownunder.com/rdu/for...al-Classifieds |
#10
|
||||
|
||||
I don't know that mod, but I am guessing you can modify it to put the forumid in there also and then do the CSS like I posted already.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|