Page 6 of 10

Re: [RC] Best Answer

Posted: Mon Sep 05, 2016 1:13 pm
by Stoker 4.0
Maybe me problem is related to the fact that I run phpBB3.2.RC1
But the best answer button i missing:
http://imagizer.imageshack.com/img922/8958/T5ioXc.jpg

Re: [RC] Best Answer

Posted: Mon Sep 05, 2016 4:41 pm
by kinerity
I have not tested it on phpBB 3.2 yet. ;)

Re: [RC] Best Answer

Posted: Mon Sep 05, 2016 6:19 pm
by Stoker 4.0
kinerity wrote:I have not tested it on phpBB 3.2 yet. ;)
I have done some testing.
viewtopic_body_post_buttons_before.html

Code: Select all

<!-- IF not postrow.S_FIRST_POST and postrow.S_AUTH -->
<!-- IF postrow.POST_ID == postrow.BESTANSWER_ID -->
<li><a href="{postrow.U_UNMARK_ANSWER}" title="{L_UNMARK_ANSWER}" class="button button-icon-only"><i class="icon fa-undo fa-fw" aria-hidden="true"></i><span class="sr-only">{L_BUTTON_UNMARK_ANSWER}</span></a></li>
<!-- ELSE -->
<li><a href="{postrow.U_MARK_ANSWER}" title="{L_MARK_ANSWER}" class="button button-icon-only"><i class="icon fa-check fa-fw" aria-hidden="true"></i><span class="sr-only">{L_BUTTON_MARK_ANSWER}</span></a></li>
<!-- ENDIF -->
<!-- ENDIF -->
Works fine. However I would prefer that best answer buttons on all other posts are removed when a post is marked as best answer. Then you would have to unmark before you can mark another as best answer.

Re: [RC] Best Answer

Posted: Mon Sep 05, 2016 6:25 pm
by Stoker 4.0
Stoker 4.0 wrote:However I would prefer that best answer buttons on all other posts are removed when a post is marked as best answer. Then you would have to unmark before you can mark another as best answer.
That would be:

Code: Select all

<!-- IF not postrow.S_FIRST_POST and postrow.S_AUTH -->
<!-- IF postrow.POST_ID == postrow.BESTANSWER_ID -->
<li><a href="{postrow.U_UNMARK_ANSWER}" title="{L_UNMARK_ANSWER}" class="button button-icon-only"><i class="icon fa-undo fa-fw" aria-hidden="true"></i><span class="sr-only">{L_BUTTON_UNMARK_ANSWER}</span></a></li>
<!-- ELSEIF not S_ANSWERED -->
<li><a href="{postrow.U_MARK_ANSWER}" title="{L_MARK_ANSWER}" class="button button-icon-only"><i class="icon fa-check fa-fw" aria-hidden="true"></i><span class="sr-only">{L_BUTTON_MARK_ANSWER}</span></a></li>
<!-- ENDIF -->
<!-- ENDIF -->

Re: [RC] Best Answer

Posted: Wed Sep 07, 2016 2:49 am
by kinerity
This was a design decision. The concept was to easily be able to change the answer without having to first unmark the original one (less clicks, etc).

I did add a feature a few commits back where locked topics only a moderator can change the answer (if they have the permission of course). This should eliminate some concerns others have had.

Re: [RC] Best Answer

Posted: Thu Sep 08, 2016 7:32 pm
by kinerity
Stoker 4.0 wrote:Maybe me problem is related to the fact that I run phpBB3.2.RC1
But the best answer button i missing:
http://imagizer.imageshack.com/img922/8958/T5ioXc.jpg
For 3.2, try this code for your viewtopic_body_post_buttons_before.html file:

Code: Select all

<!-- IF not postrow.S_FIRST_POST and postrow.S_AUTH -->
<li>
	<!-- IF postrow.POST_ID == postrow.BESTANSWER_ID -->
	<a href="{postrow.U_UNMARK_ANSWER}" title="{L_UNMARK_ANSWER}" class="button button-icon-only"><i class="icon fa-times fa-fw" style="color: #D9534F;" aria-hidden="true"></i>{L_BUTTON_UNMARK_ANSWER}<span class="sr-only">{L_BUTTON_UNMARK_ANSWER}</span></a>
	<!-- ELSE -->
	<a href="{postrow.U_MARK_ANSWER}" title="{L_MARK_ANSWER}" class="button button-icon-only"><i class="icon fa-check fa-fw" style="color: #1D9D74;" aria-hidden="true"></i>{L_BUTTON_MARK_ANSWER}<span class="sr-only">{L_BUTTON_MARK_ANSWER}</span></a>
	<!-- ENDIF -->
</li>
<!-- ENDIF -->
I still make no guarantees that this extension will work completely with 3.2. Once this version is validated, then work will begin on a 3.2 compatible version.

Re: [RC] Best Answer

Posted: Fri Sep 09, 2016 8:20 am
by martin123456
3.2 icons look like this Image works perfect on mine after a few changes ;) once marked all other posts lose there icon too.

Re: [RC] Best Answer

Posted: Sat Aug 26, 2017 10:08 pm
by EvangelionI
kinerity wrote:
Mon Sep 05, 2016 4:41 pm
I have not tested it on phpBB 3.2 yet. ;)
When deleting themes and messages, an error occurs:

Code: Select all

SQL ERROR [ mysqli ]

[0]

SQL

No values specified for SQL IN comparison

BACKTRACE

FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()

FILE: [ROOT]/phpbb/db/driver/driver.php
LINE: 999
CALL: trigger_error()

FILE: [ROOT]/phpbb/db/driver/driver.php
LINE: 545
CALL: phpbb\db\driver\driver->sql_error()

FILE: [ROOT]/phpbb/db/driver/factory.php
LINE: 441
CALL: phpbb\db\driver\driver->sql_in_set()

FILE: [ROOT]/ext/kinerity/bestanswer/event/listener.php
LINE: 165
CALL: phpbb\db\driver\factory->sql_in_set()

FILE: (not given by php)
LINE: (not given by php)
CALL: kinerity\bestanswer\event\listener->delete_posts_in_transaction_before()

FILE: [ROOT]/vendor/symfony/event-dispatcher/EventDispatcher.php
LINE: 184
CALL: call_user_func()

FILE: [ROOT]/vendor/symfony/event-dispatcher/EventDispatcher.php
LINE: 46
CALL: Symfony\Component\EventDispatcher\EventDispatcher->doDispatch()

FILE: [ROOT]/phpbb/event/dispatcher.php
LINE: 60
CALL: Symfony\Component\EventDispatcher\EventDispatcher->dispatch()

FILE: [ROOT]/phpbb/event/dispatcher.php
LINE: 46
CALL: phpbb\event\dispatcher->dispatch()

FILE: [ROOT]/includes/functions_admin.php
LINE: 1010
CALL: phpbb\event\dispatcher->trigger_event()

FILE: [ROOT]/includes/mcp/mcp_main.php
LINE: 1112
CALL: delete_posts()

FILE: [ROOT]/includes/mcp/mcp_queue.php
LINE: 84
CALL: mcp_delete_post()

FILE: [ROOT]/includes/functions_module.php
LINE: 676
CALL: mcp_queue->main()

FILE: [ROOT]/mcp.php
LINE: 312
CALL: p_master->load_active()

Re: [RC] Best Answer

Posted: Sun Aug 27, 2017 2:33 pm
by kinerity
Extension does not work with 3.2. A version for 3.2 is in the works though.

Re: [3.2][BETA] Best Answer

Posted: Sun Sep 24, 2017 3:38 am
by kinerity
kinerity wrote:
Sun Aug 27, 2017 2:33 pm
A version for 3.2 is in the works though.
This has been published along with a demo URL. See the first post.

Note that 3.1 development was dropped. Also to language authors - please wait until RC to submit pull requests. Any pull requests submitted before RC will be denied.

Re: [3.2][BETA] Best Answer

Posted: Mon Oct 09, 2017 10:23 pm
by feruchio
It does not work, too bad :(
http://awesomecs.syntrwave.com/

Re: [3.2][BETA] Best Answer

Posted: Tue Oct 10, 2017 1:49 pm
by kinerity
You need to be more specific. Giving me a URL tells me nothing. Also note that this is in BETA status and things are expected to be missing or somewhat broken. The BETA's limited functionality works fine - see https://dev.project-w.org/viewtopic.php?f=2&t=4.

Re: [3.2][BETA] Best Answer

Posted: Tue Oct 10, 2017 2:59 pm
by feruchio
How can I help you so we can fix that? Usually is because of my theme of phpbb, but I even tried with prosilver theme and did not work either. :(

Re: [3.2][BETA] Best Answer

Posted: Tue Oct 10, 2017 3:23 pm
by kinerity
feruchio wrote:
Tue Oct 10, 2017 2:59 pm
How can I help you so we can fix that?
You still haven't told me what the problem is. Does the extension enable successfully? Did you set the option under each forum's settings for the ones you want it enabled on? Did you set permissions for each group? Do the buttons show in viewtopic? Do you see the checkmarks in viewforum/index/mcp/search? More info please!
feruchio wrote:
Tue Oct 10, 2017 2:59 pm
Usually is because of my theme of phpbb, but I even tried with prosilver theme and did not work either. :(
Any prosilver derived style should work as advertised.

Re: [3.2][BETA] Best Answer

Posted: Tue Oct 10, 2017 6:01 pm
by feruchio
Okay, I found what is the problem, so it turns out (after I enabled it on the forum I wanted) that it does not work only with my theme of phpbb. Is it possible to be fixed, just the button does not appear here: https://prnt.sc/gvqi1k
Also, the post does appear as best answer on the first post, but only on my theme.