vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Change b/g of post for OP's replies (https://vborg.vbsupport.ru/showthread.php?t=318223)

Morrus 04-12-2015 10:54 PM

Change b/g of post for OP's replies
 
I've started an Ask Me Anything subforum based on the Reddit concept.

To make it easier for folks to find the interviewee's responses, I figured it would be useful to change the background colour of their posts (but ONLY in that forum). Something like the b/g colour change that comes with selecting a post for mod action.

Is there an easy way to do this? I know there are some "highlight thread starter" mods, but they all jst add a label or graphic, whereas I want to actually highlight the entire post area to make it really easy to find.

MarkFL 04-13-2015 04:32 AM

Follow:

AdminCP -> Styles & Templates -> Style Manager

For each style you wish to affect the change, follow:

Edit Templates

Locate the group "Postbit Templates", double-click and then open the template "postbit_legacy."

Locate the opening tag:

HTML Code:

<div class="postbody">
And change it to read:

HTML Code:

<div class="postbody" style="<vb:if condition="($thread['postuserid'] == $post['userid']) AND in_array($thread['forumid'], array(XX, YY, ZZ))">background: #ffeb90</vb:if>">
Replace "XX, YY, ZZ" with the actual list of forumids of the forums you want this change to affect, and you can change the background to another color, I simply used the default shade of yellow we get when we select posts for inline moderation.

John Lester 04-13-2015 05:25 AM

Please post a screen shot of this in action, it's peaked my curiosity :D

MarkFL 04-13-2015 06:07 AM

1 Attachment(s)
Quote:

Originally Posted by John Lester (Post 2542967)
Please post a screen shot of this in action, it's peaked my curiosity :D

Using the color I chose above for demonstration, here's what it looks like on my local dev site:

https://vborg.vbsupport.ru/attachmen...1&d=1428912411

Morrus 04-13-2015 10:41 AM

Worked perfectly! Thanks so much, MarkFL!

John Lester 04-14-2015 04:27 AM

Hmmm I think I'm going to tweak it a bit and put actual userids and different colors for them (admin team of 3 peeps) to make each one stand out in a particular forum.

Right now we're having to manually use custom font and color ... kinda tedious :D

MarkFL 04-14-2015 05:11 AM

I just discovered that if you want the inline moderation highlight color to take precedence over the added color to the OP's posts, you need to open the template postbit.css, and finc the code:

Code:

.postbit.imod_highlight .userinfo_noavatar,
.postbit.imod_highlight .userinfo,
.postbit.imod_highlight .postbody,
.postbitlegacy.imod_highlight .postdetails,
.postbitlegacy.imod_highlight .userinfo,
.postbitlegacy.imod_highlight .postbody,
.postbitdeleted.imod_highlight,
.postbitignored.imod_highlight {
        background:{vb:stylevar imodhilite_backgroundColor};
        color: {vb:stylevar body_color};
}

and change it to read:

Code:

.postbit.imod_highlight .userinfo_noavatar,
.postbit.imod_highlight .userinfo,
.postbit.imod_highlight .postbody,
.postbitlegacy.imod_highlight .postdetails,
.postbitlegacy.imod_highlight .userinfo,
.postbitlegacy.imod_highlight .postbody,
.postbitdeleted.imod_highlight,
.postbitignored.imod_highlight {
        background:{vb:stylevar imodhilite_backgroundColor} !important;
        color: {vb:stylevar body_color};
}



All times are GMT. The time now is 08:16 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.01077 seconds
  • Memory Usage 1,727KB
  • 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
  • (2)bbcode_code_printable
  • (2)bbcode_html_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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