Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 08-03-2012, 10:46 AM
BrettJC BrettJC is offline
 
Join Date: Oct 2007
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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>
Reply With Quote
  #2  
Old 08-03-2012, 10:49 AM
Disco_Dave's Avatar
Disco_Dave Disco_Dave is offline
 
Join Date: May 2011
Location: Belfast
Posts: 586
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try this: https://vborg.vbsupport.ru/showthread.php?t=276131
Reply With Quote
  #3  
Old 08-03-2012, 10:59 AM
BrettJC BrettJC is offline
 
Join Date: Oct 2007
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #4  
Old 08-03-2012, 04:19 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #5  
Old 08-03-2012, 10:13 PM
BrettJC BrettJC is offline
 
Join Date: Oct 2007
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #6  
Old 08-03-2012, 11:31 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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;}
Reply With Quote
  #7  
Old 08-04-2012, 01:50 AM
BrettJC BrettJC is offline
 
Join Date: Oct 2007
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #8  
Old 08-04-2012, 01:57 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #9  
Old 08-04-2012, 02:09 AM
BrettJC BrettJC is offline
 
Join Date: Oct 2007
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #10  
Old 08-04-2012, 02:44 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:30 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04332 seconds
  • Memory Usage 2,246KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete