tierra / topicsolved

phpBB Topic Solved extension: Allows posting questions, and accepting answers as solved.
https://www.phpbb.com/customise/db/extension/topic_solved/
GNU General Public License v2.0
23 stars 19 forks source link

Best answer #33

Open ceyhansuyu opened 9 years ago

ceyhansuyu commented 9 years ago

How can I do best answer and topic solved?

topicsolved

tierra commented 9 years ago

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

ceyhansuyu commented 9 years ago

Thank you.

alekks commented 8 years ago

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.

tierra commented 8 years ago

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?

Galixte commented 8 years ago

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.

tierra commented 8 years ago

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

tripflex commented 8 years ago

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