Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Change Title Color of Specific Forums on Homepage Details »»
Change Title Color of Specific Forums on Homepage
Version: 1.00, by addamroy addamroy is offline
Developer Last Online: Jan 2018 Show Printable Version Email this Page

Category: Forum Home Enhancements - Version: 4.1.x Rating:
Released: 12-29-2012 Last Update: Never Installs: 9
Template Edits
Re-useable Code Translations  
No support by the author.

This modification will allow you to change the color of your forum titles for specific forums on your forumhome.

For example, if you want to draw more attention to your private sections to drive paid registrations, or just to make your forum unique and more customized, this can help.

This mod is done via one simple template edit.

STEP 1 - Find the forumhome_forumbit_level2_post template via edit templates > Forum Home Templates.

Find the code below
Code:
{vb:raw forum.title}
And replace it with
Code:
<vb:if condition="$forum[forumid] == XXX">
<font color="#XXXXXX">
</vb:if>
{vb:raw forum.title}
<vb:if condition="$forum[forumid] == XXX">
</font>
</vb:if>
Replace both instances of XXX with the forumid of the forum you want to change the title color of.

Replace XXXXXX with the hex code for the color you want the forum title to be. You can find hex codes here, http://www.html-color-codes.com

If you have multiple forums you want to change the title colors of for each, simply stack additional vb:if conditions above and below {vb:raw forum.title} for each forum you want to change.

Like below
Code:
<vb:if condition="$forum[forumid] == XXX">
<font color="#XXXXXX">
</vb:if>
<vb:if condition="$forum[forumid] == XXX">
<font color="#XXXXXX">
</vb:if>
<vb:if condition="$forum[forumid] == XXX">
<font color="#XXXXXX">
</vb:if>
{vb:raw forum.title}
<vb:if condition="$forum[forumid] == XXX">
</font>
</vb:if>
<vb:if condition="$forum[forumid] == XXX">
</font>
</vb:if>
<vb:if condition="$forum[forumid] == XXX">
</font>
</vb:if>
Check out my other Template Modifications for 4.x!

[Postbit-Legacy Hack] Attractive User Info Boxes for Posts

Link Private Forums to thread instead of error message

Sidebar Anywhere Enhancement - Custom Blocks Per Forum or Page

Change Thread Title Color for Specific Forums on Homepage

Change Background Color for Specific Forums on Homepage

Thread Starter Image in Postbit for OP

CUSTOM BUTTONS that look like your forum!

Custom User Rank Box in Posts

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
2 благодарности(ей) от:
elsa23, sodasusu

Comments
  #2  
Old 12-30-2012, 09:16 AM
Thangvip9x Thangvip9x is offline
 
Join Date: Apr 2012
Location: Yen Bai, Vietnam
Posts: 106
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you very much
Reply With Quote
  #3  
Old 12-30-2012, 09:47 PM
boss22 boss22 is offline
 
Join Date: Oct 2012
Posts: 112
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can you made something similar to change color threads title on forumhome in specifics forums?

regards

bosss
Reply With Quote
  #4  
Old 12-30-2012, 10:22 PM
addamroy addamroy is offline
 
Join Date: Sep 2010
Posts: 352
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Find the forumhome_lastpostby template via edit templates > Forum Home Templates.

Find the code below
Code:
<a href="{vb:link thread, {vb:raw threadinfo}, {vb:raw pageinfo_lastpost}}#post{vb:raw lastpostinfo.lastpostid}"><img src="{vb:stylevar imgdir_button}/lastpost-{vb:stylevar right}.png" alt="{vb:rawphrase go_to_last_post}" /></a>
Before it add
Code:
<vb:if condition="$forum[forumid] == XXX">
<font color="#XXXXXX">
</vb:if>
After it add
Code:
<vb:if condition="$forum[forumid] == XXX">
</font>
</vb:if>
Replace both instances of XXX with the forumid of the forum you want to change the thread title color of.

Replace XXXXXX with the hex code for the color you want the thread title colors to be.

I created an additional mod anyway, in case anyone else has the same question.

https://vborg.vbsupport.ru/showthread.php?t=293431
Reply With Quote
  #5  
Old 05-19-2013, 01:51 PM
masonox masonox is offline
 
Join Date: Feb 2008
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm hoping you still monitor this thread. Seeing as you seem to know a bit about which templates edit what, would you by chance know how to apply this to the What's New (search.php?do=getnew&contenttype=vBForum_Post) thread titles?

For those who access my site, I'd like to draw specific attention to threads found in the What's New area of the forum that fall under specific forums.

So to say... I post something important in forum id 2, and a member who can access that forum clicks What's New and it shows all the new posts since his last visit. Then they see that this particular thread, which is in forum id 2, is now red instead of the default link color.

Is this possible?

EDIT 2: I've tried editing "search_threadbit" by finding

{vb:raw thread.threadtitle}

and adding around it various attempts at changing the color. For the most part, all it does is cause the text to disappear from the search menu. I've not yet had success.

<vb:if condition="$forum[forumid] == XXX"><font color=red></vb:if> and other attempts...

If I leave a simple <font color=red>{vb:raw thread.threadtitle}</font> it has no problem changing to red. Almost seems as if the vb:if/forumid doesn't work in this area.
Reply With Quote
  #6  
Old 10-05-2015, 09:41 AM
friendlymela's Avatar
friendlymela friendlymela is offline
 
Join Date: Dec 2012
Location: Karachi, Pakistan
Posts: 272
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

any screenshot for this modification?
Reply With Quote
  #7  
Old 08-07-2018, 11:22 AM
jagtpf jagtpf is offline
 
Join Date: Mar 2015
Location: Scotland
Posts: 176
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I was able to follow, and get to work, the Mod to alter the background colour of a Forum - But following this, I was unable to get title font colour to change.
Has anybody had any recent success?

I have a 'problem' with Staff losing their way and forgetting which is the Staff Area and which is the main area - Mind - I too have to double-check at times
Reply With Quote
  #8  
Old 09-03-2018, 02:10 AM
gsk8's Avatar
gsk8 gsk8 is offline
 
Join Date: Jun 2003
Posts: 133
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Couldn't get it to work on 4.2.5 ;(
Reply With Quote
  #9  
Old 11-19-2019, 10:09 AM
Raptor Raptor is offline
 
Join Date: Nov 2001
Posts: 499
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not working in 4.2.3
Reply With Quote
Reply


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 02:34 PM.


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.04705 seconds
  • Memory Usage 2,305KB
  • Queries Executed 23 (?)
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
  • (6)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (2)post_thanks_box_bit
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (9)postbit_onlinestatus
  • (9)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_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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete