[CDB] Best Answer

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Scam Warning
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
Locked
User avatar
Stoker 4.0
Registered User
Posts: 1487
Joined: Sun Feb 13, 2011 1:33 pm
Location: Funen, Denmark
Name: Ulrik Christensen
Contact:

Re: [RC] Best Answer

Post 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
User avatar
Kailey
Community Team Leader
Community Team Leader
Posts: 3732
Joined: Mon Sep 01, 2014 1:00 am
Location: sudo rm -rf /
Name: Kailey Snay
Contact:

Re: [RC] Best Answer

Post by Kailey »

I have not tested it on phpBB 3.2 yet. ;)
Kailey Snay - Community Team Leader
Knowledge Base | Documentation | Community rules

If you have any questions about the rules/customs of this website, feel free to send me a PM.
User avatar
Stoker 4.0
Registered User
Posts: 1487
Joined: Sun Feb 13, 2011 1:33 pm
Location: Funen, Denmark
Name: Ulrik Christensen
Contact:

Re: [RC] Best Answer

Post 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.
User avatar
Stoker 4.0
Registered User
Posts: 1487
Joined: Sun Feb 13, 2011 1:33 pm
Location: Funen, Denmark
Name: Ulrik Christensen
Contact:

Re: [RC] Best Answer

Post 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 -->
User avatar
Kailey
Community Team Leader
Community Team Leader
Posts: 3732
Joined: Mon Sep 01, 2014 1:00 am
Location: sudo rm -rf /
Name: Kailey Snay
Contact:

Re: [RC] Best Answer

Post by Kailey »

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.
Kailey Snay - Community Team Leader
Knowledge Base | Documentation | Community rules

If you have any questions about the rules/customs of this website, feel free to send me a PM.
User avatar
Kailey
Community Team Leader
Community Team Leader
Posts: 3732
Joined: Mon Sep 01, 2014 1:00 am
Location: sudo rm -rf /
Name: Kailey Snay
Contact:

Re: [RC] Best Answer

Post by Kailey »

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.
Kailey Snay - Community Team Leader
Knowledge Base | Documentation | Community rules

If you have any questions about the rules/customs of this website, feel free to send me a PM.
User avatar
martin123456
I've Been Banned!
Posts: 726
Joined: Sat Mar 05, 2011 7:44 pm

Re: [RC] Best Answer

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

Code: Select all

<!-- IF S_CODE_UNTIDY and S_MESS_ON_INDEX Good If_Not_TIDY_Then_SUBMIT -->
User avatar
EvangelionI
Registered User
Posts: 14
Joined: Sat Apr 05, 2014 10:17 pm
Name: Roman
Contact:

Re: [RC] Best Answer

Post 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()
User avatar
Kailey
Community Team Leader
Community Team Leader
Posts: 3732
Joined: Mon Sep 01, 2014 1:00 am
Location: sudo rm -rf /
Name: Kailey Snay
Contact:

Re: [RC] Best Answer

Post by Kailey »

Extension does not work with 3.2. A version for 3.2 is in the works though.
Kailey Snay - Community Team Leader
Knowledge Base | Documentation | Community rules

If you have any questions about the rules/customs of this website, feel free to send me a PM.
User avatar
Kailey
Community Team Leader
Community Team Leader
Posts: 3732
Joined: Mon Sep 01, 2014 1:00 am
Location: sudo rm -rf /
Name: Kailey Snay
Contact:

Re: [3.2][BETA] Best Answer

Post by Kailey »

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.
Kailey Snay - Community Team Leader
Knowledge Base | Documentation | Community rules

If you have any questions about the rules/customs of this website, feel free to send me a PM.
User avatar
feruchio
Registered User
Posts: 51
Joined: Fri Sep 08, 2017 7:26 am

Re: [3.2][BETA] Best Answer

Post by feruchio »

It does not work, too bad :(
http://awesomecs.syntrwave.com/
User avatar
Kailey
Community Team Leader
Community Team Leader
Posts: 3732
Joined: Mon Sep 01, 2014 1:00 am
Location: sudo rm -rf /
Name: Kailey Snay
Contact:

Re: [3.2][BETA] Best Answer

Post by Kailey »

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.
Kailey Snay - Community Team Leader
Knowledge Base | Documentation | Community rules

If you have any questions about the rules/customs of this website, feel free to send me a PM.
User avatar
feruchio
Registered User
Posts: 51
Joined: Fri Sep 08, 2017 7:26 am

Re: [3.2][BETA] Best Answer

Post 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. :(
User avatar
Kailey
Community Team Leader
Community Team Leader
Posts: 3732
Joined: Mon Sep 01, 2014 1:00 am
Location: sudo rm -rf /
Name: Kailey Snay
Contact:

Re: [3.2][BETA] Best Answer

Post by Kailey »

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.
Kailey Snay - Community Team Leader
Knowledge Base | Documentation | Community rules

If you have any questions about the rules/customs of this website, feel free to send me a PM.
User avatar
feruchio
Registered User
Posts: 51
Joined: Fri Sep 08, 2017 7:26 am

Re: [3.2][BETA] Best Answer

Post 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.
Locked

Return to “Extensions in Development”