topicsolved icon indicating copy to clipboard operation
topicsolved copied to clipboard

Mark accepted answer

Open BlackSkorpio opened this issue 8 years ago • 1 comments

Would like to share a small "hack" that I just implemented in my forum since I was looking for a way to "highlight" the whole correct answer (as can be done in desk.com)

I'n my case I use a "somewhat" customized version of Simplicity (https://www.artodia.com/phpbb-styles/simplicity/) and added a the templates for it inside the ext style dir

I added this to my forum_fn.js,:

$('div:has(span.imageset.icon_solved_post)').addClass('solving_answer');

This snippet will look for the post with the class solving post, and give all it's parent divs the class solving_answer

After that I added this to my buttons.css

/* Highligt the correct post */
.postprofile + .postbody.solving_answer > div {
    background-color: rgba(217, 252, 217, 0.61);
    border: 1px dashed #ff6e00;
    padding:.1em .1em .1em .9em;
    border-radius: 3px;
}

This will then highlight the correct answer! :smiley:

Next thing "on my list" is to clone the correct answer and move a copy of that below the question/issue, and by that replicate the "proffesional look" from commercial alternatives as desk.com forums :+1:

If you want to see this live you can do that here: https://kokensupport.com/viewtopic.php?f=8&t=28

BlackSkorpio avatar Aug 25 '16 13:08 BlackSkorpio

Hi ! I would like to customize the css of the best answer in my post list, your solution seems to be the one I'm looking for. Could you please be more specific where I have to insert your snippet in forum_fn.js ? I'm not familiar with php or Javascript but I think it won't work if I paste your code right at the end of the file ... Thanks !

simpey84 avatar Feb 01 '19 09:02 simpey84