vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Forum Home Enhancements - Change Title Color of Specific Forums on Homepage (https://vborg.vbsupport.ru/showthread.php?t=293418)

addamroy 12-29-2012 11:00 PM

Change Title Color of Specific Forums on Homepage
 
1 Attachment(s)
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

Thangvip9x 12-30-2012 09:16 AM

Thank you very much

boss22 12-30-2012 09:47 PM

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

regards

bosss

addamroy 12-30-2012 10:22 PM

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

masonox 05-19-2013 01:51 PM

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.

friendlymela 10-05-2015 09:41 AM

any screenshot for this modification?

jagtpf 08-07-2018 11:22 AM

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 :D

gsk8 09-03-2018 02:10 AM

Couldn't get it to work on 4.2.5 ;(

Raptor 11-19-2019 10:09 AM

Not working in 4.2.3


All times are GMT. The time now is 06:27 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
  • Page Generation 0.01254 seconds
  • Memory Usage 1,734KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete