topicsolved icon indicating copy to clipboard operation
topicsolved copied to clipboard

Best answer

Open ceyhansuyu opened this issue 9 years ago • 7 comments

How can I do best answer and topic solved?

topicsolved

ceyhansuyu avatar Aug 27 '15 07:08 ceyhansuyu

For it's initial release, it's not very flexible in regards to customization yet. I would recommend building your own extension that adds custom CSS in order to modify the style of the indicators. I haven't done this for my own indicators, but I have created an extension for my own board to manage custom CSS styles that you can use as an example: https://github.com/tierra/wxforum-styles

tierra avatar Aug 27 '15 13:08 tierra

Thank you.

ceyhansuyu avatar Aug 27 '15 14:08 ceyhansuyu

I'm not sure, but my interpretation of ceyhansuyu's request isn't about custom styling/formatting but to add a feature to mark a post within a thread as "Best answer". A bit like a lot of other forums work, e.g. Apple's support forums, where you can mark posts as "This helped me" etc.

alekks avatar Oct 09 '15 22:10 alekks

Well, if it's not about the style, it's about the text, and the text can already be customized (from the ACP) to say exactly what's in the screenshots. Maybe you're thinking of some third thing altogether though: something like upvotes?

tierra avatar Oct 09 '15 23:10 tierra

Yes that which is particular that’s the text in the subject of the post is: “Best answer” while the text in the subject of the topic stays: “Solved”.

They want two texts, one for the topic title and one for the title of the best answer.

Galixte avatar Oct 09 '15 23:10 Galixte

Oh, right, I do remember thinking that originally, and I think that's why I chose to recommend custom CSS.

tierra avatar Oct 09 '15 23:10 tierra

For me this was very easy to do by modifying the code .. IMO it should be as easy as just adding another setting for "Selected Answer Phrase" and then in the function viewtopic_modify_post_row_subject in event/main_listener.php just use that instead of the default solved text.

For anybody else looking to do this, just go to this line in this file: https://github.com/tierra/topicsolved/blob/master/event/main_listener.php#L294

And add:

$topic_data['forum_solve_text'] = 'Selected Answer';

or whatever you want it to say.

I'm a full time WordPress PHP dev but first time using PHPBB so i'm not sure if the fact that me using a custom theme makes a difference or not, or if doing this will change it anywhere else (from my tests it only did on the view topic page), but this should get you pointed in the right direction at least.

ALSO: I don't think this will work if you're using images, so keep that in mind

tripflex avatar Aug 08 '16 15:08 tripflex