PDA

View Full Version : Change b/g of post for OP's replies


Morrus
04-12-2015, 10:54 PM
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:

<div class="postbody">

And change it to read:

<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
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/attachment.php?attachmentid=152238&stc=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:

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

.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};
}