Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 02-10-2013, 06:21 PM
GamerPerfection's Avatar
GamerPerfection GamerPerfection is offline
 
Join Date: Feb 2006
Posts: 389
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Forum row to indicate new content

Right, we all know that most forums have a little icon down the left side that indicates whether there are any new posts or not. Which is great, but I want something different and i've had an idea which i don't know if it will be achievable.

Basically I have my forumrow to change colour when I move the mouse over it. But what I would like instead is for the forumrow to become a different (maybe darker) colour when there are new posts to be read.

I've got an example in my screenshot. Is this at all possible?

Reply With Quote
  #2  
Old 02-26-2013, 10:03 AM
GamerPerfection's Avatar
GamerPerfection GamerPerfection is offline
 
Join Date: Feb 2006
Posts: 389
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No ideas anyone?
Reply With Quote
  #3  
Old 02-26-2013, 01:00 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It is a heavily customized style so I'm not 100% sure that is "FORUMHOME" AKA forum.php but assuming it is you will want to edit the template

forumhome_forumbit_level2_post

If you look at that template you see that the status icon image (the image that changes depending on new posts or not) is built using the following code:

Code:
{vb:raw forum.imageprefix}forum_{vb:raw forum.statusicon}-48.png
Basically this means that {vb:raw forum.statusicon} is equal to "old" when there are no new posts and "new" when there are new posts (if you look at their file names you see they are forum_old-48.png and forum_new-48.png respecfully)

This means we can check the value of the variable in a template conditional and alter the code based on what the value is.

In a default template the code looks like this- it may be different on your custom style, but for me it is the 2nd line of the template

Code:
	<div class="forumrow table">
Now edit it to look like this:

Code:
	<div class="forumrow table" <vb:if condition="$forum['statusicon'] == 'new'">style="background-color:yellow;"</vb:if>>
That will make the background of any of the forums with new posts yellow (change the color as you wish as well)

Tested this against a default style.
Reply With Quote
Благодарность от:
GamerPerfection
  #4  
Old 02-26-2013, 01:25 PM
GamerPerfection's Avatar
GamerPerfection GamerPerfection is offline
 
Join Date: Feb 2006
Posts: 389
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

WOW awesome, it works! I love it! And the yellow is pretty cool!

Thank you so much!
Reply With Quote
Благодарность от:
BirdOPrey5
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 08:08 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.04524 seconds
  • Memory Usage 2,195KB
  • 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
  • (3)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (2)post_thanks_box_bit
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (4)post_thanks_postbit_info
  • (4)postbit
  • (4)postbit_onlinestatus
  • (4)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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete