[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!
Ideas Centre
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)
User avatar
WelshPaul
Registered User
Posts: 303
Joined: Tue Aug 19, 2014 2:09 pm

Re: [3.2][BETA] Best Answer

Post by WelshPaul » Sat Feb 03, 2018 10:08 pm

It's good! Tested when setting Enable best answer to both yes and no and everything is working OK now. Just that search issue left to fix, got something in the works but it's not a simple fix, will update my findings and possible fix in due course.

User avatar
WelshPaul
Registered User
Posts: 303
Joined: Tue Aug 19, 2014 2:09 pm

Re: [3.2][BETA] Best Answer

Post by WelshPaul » Thu Feb 08, 2018 8:31 pm

Soooooooo I discovered another issue....

If a topic has been answered, a tick is placed in the topic title and the first post includes a quote and link to the answer and the answer post is highlighted but, if your on page 25 of 50 or page 50 of 50 there is no way to jump straight to the answer? That's annoying! :|

I have made the tick in the topic title a clickable link to the answer:
Image

So if you're on page 25 of 50 and you want to view the answer, click on the tick in the topic title of whatever page your on and it will take you straight to the answer, wherever it is. No more scroll to pagination and select page 1, scroll down to the first post and click go to answer!

Code changes, open the main_listener.php file and under the public function viewtopic_assign_template_vars_before($event) find:

Code: Select all

'S_ANSWERED'	=> $topic_data['answer_post_id'] ? true : false,
After add:

Code: Select all

'U_ANSWER'		=> append_sid("{$this->root_path}viewtopic.{$this->php_ext}", 'p=' . (int) $topic_data['answer_post_id'] . '#p' . (int) $topic_data['answer_post_id']),
Open the viewtopic_topic_title_prepend.html file and find:

Code: Select all

<!-- IF S_ANSWERED --><span class="topic_answered"><i class="icon fa-check fa-fw" aria-hidden="true"></i></span> <!-- ENDIF -->
Replace with:

Code: Select all

<!-- IF S_ANSWERED --><a href="{U_ANSWER}"><span class="topic_answered"><i class="icon fa-check fa-fw" aria-hidden="true"></i></span></a> <!-- ENDIF -->

User avatar
kinerity
Community Team Member
Community Team Member
Posts: 2309
Joined: Mon Sep 01, 2014 1:00 am
Location: sudo rm -rf /
Name: Kailey Truscott
Contact:

Re: [3.2][BETA] Best Answer

Post by kinerity » Thu Feb 08, 2018 10:48 pm

WelshPaul wrote:
Thu Feb 08, 2018 8:31 pm
I discovered another issue
That was a design decision. For the life of me, I can't remember why now.
Kailey Truscott - Community Team

Tarantino
Registered User
Posts: 748
Joined: Sat Feb 18, 2012 1:51 pm
Contact:

Re: [3.2][BETA] Best Answer

Post by Tarantino » Sun Feb 11, 2018 12:11 am

A possible solution would be to use the extension that ads the 1st post to 1st post of all pages. Just an idea. But I liked your solution too ;)

User avatar
DesignerMix
Registered User
Posts: 40
Joined: Thu Jul 17, 2014 11:03 am
Location: Russia, Belgorod
Contact:

Re: [3.2][BETA] Best Answer

Post by DesignerMix » Mon Mar 12, 2018 1:39 pm

Hi, i have installed version of BestAnswer 0.0.5, now found that you made version 1.0.0 and try to update (my phpBB is 3.2.2):
  1. Disable 0.0.5;
  2. Rename folder ../ext/kinerity/bestanswer to bestanswer_old
  3. Load new version in ../ext/kinerity/bestanswer
  4. In ACP activate 1.0.0 (it was sucessfully)
After all i go to index forum and see error:

Code: Select all

SQL ERROR [ mysqli ]

Unknown column 'kba_t.answer_post_id' in 'field list' [1054]

SQL

SELECT f.*, ft.mark_time, kba_t.answer_post_id FROM (phpbb_forums f) LEFT JOIN phpbb_forums_track ft ON (ft.user_id = 2 AND ft.forum_id = f.forum_id) LEFT JOIN phpbb_posts kba_p ON (f.forum_last_post_id = kba_p.post_id) LEFT JOIN phpbb_topics kba_t ON (kba_t.topic_id = kba_p.topic_id) ORDER BY f.left_id

BACKTRACE

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

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

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

FILE: [ROOT]/phpbb/db/driver/factory.php
LINE: 329
CALL: phpbb\db\driver\mysqli->sql_query()

FILE: [ROOT]/includes/functions_display.php
LINE: 150
CALL: phpbb\db\driver\factory->sql_query()

FILE: [ROOT]/index.php
LINE: 76
CALL: display_forums()
I think that if i clear data all will be good, but i don't want lost all the best answers. Is the any way to keep all and update? Maybe exist some version between 0.0.5 and 1.0.0 (but i didn't find). Thanks!

PS: I temporarily bring back version 0.0.5 (all work fine)

moose5
Registered User
Posts: 31
Joined: Fri Dec 11, 2015 12:05 pm

Re: [3.2][BETA] Best Answer

Post by moose5 » Mon Mar 12, 2018 10:22 pm

Hello,
I have a forum that has a strange behaviour. The extension works, but only in a few subforums, not in all.
It doesn't show the checkmark in the posts in those subforums. If I go to the database and manually add the right numbers to the answer_post and answer_user. It shows everything correct even in those subforums.

Any idea how I can troubleshoot that one?
Thanks!

User avatar
kinerity
Community Team Member
Community Team Member
Posts: 2309
Joined: Mon Sep 01, 2014 1:00 am
Location: sudo rm -rf /
Name: Kailey Truscott
Contact:

Re: [3.2][BETA] Best Answer

Post by kinerity » Tue Mar 13, 2018 12:03 pm

DesignerMix wrote:
Mon Mar 12, 2018 1:39 pm
  • Rename folder ../ext/kinerity/bestanswer to bestanswer_old
No, you should remove the extension. Please note that this extension should not be used on a live board as it is still in development and I can't guarantee compatibility with other versions.
moose5 wrote:
Mon Mar 12, 2018 10:22 pm
I have a forum that has a strange behaviour. The extension works, but only in a few subforums, not in all.
It doesn't show the checkmark in the posts in those subforums.
Can you link to an example?
Kailey Truscott - Community Team

moose5
Registered User
Posts: 31
Joined: Fri Dec 11, 2015 12:05 pm

Re: [3.2][BETA] Best Answer

Post by moose5 » Tue Mar 13, 2018 4:32 pm

Thanks Kinerity for pointing out I needed to set permissions for the subforum AND the group permissions (user and moderator) for those forums, too. :oops:
Great extension and thanks for your work on it!!

User avatar
DesignerMix
Registered User
Posts: 40
Joined: Thu Jul 17, 2014 11:03 am
Location: Russia, Belgorod
Contact:

Re: [3.2][BETA] Best Answer

Post by DesignerMix » Tue Mar 13, 2018 5:31 pm

kinerity wrote:
Tue Mar 13, 2018 12:03 pm
No, you should remove the extension. Please note that this extension should not be used on a live board as it is still in development and I can't guarantee compatibility with other versions.
Thanks for your answer, i try to convert data from 0.0.5 to 1.0.0 if something happen i write what and how i do.

Tarantino
Registered User
Posts: 748
Joined: Sat Feb 18, 2012 1:51 pm
Contact:

Re: [3.2][BETA] Best Answer

Post by Tarantino » Wed Mar 14, 2018 9:03 pm

Hi there, so I take a closer look at this ext and I saw that we can enable/disable on the forum tab section. And we can give forum permissions to groups. But I cant find on group permissions, permissions to give for best anwser. I could find on moderative permissions, and thats doesnt make any sense at all, because In forums permissions it appears too the same type of permission, and I could give permission to Global moderator group for each forum. No need to give moderative permissions I would say. But maybe you added so we can have an easier way to give permissions to all topics once for moderators.
Now the problem is, how/where can I give permissions to the topic starter only? If I give permissions to the registered user group, will just the topic start be able to mark as best anwser or any user?

User avatar
kinerity
Community Team Member
Community Team Member
Posts: 2309
Joined: Mon Sep 01, 2014 1:00 am
Location: sudo rm -rf /
Name: Kailey Truscott
Contact:

Re: [3.2][BETA] Best Answer

Post by kinerity » Wed Mar 14, 2018 11:20 pm

Tarantino wrote:
Wed Mar 14, 2018 9:03 pm
If I give permissions to the registered user group, will just the topic start be able to mark as best anwser or any user?
Just the topic starter will have permission if you give the Registered Users group the forum permission. That check is here. The Moderator permissions are there in case someone wants to grant them.
Kailey Truscott - Community Team

Bill MacKenty
Registered User
Posts: 1
Joined: Thu May 03, 2018 4:07 pm

using theme from Pixel Goose

Post by Bill MacKenty » Thu May 03, 2018 4:12 pm

Hi all,

I'm using a theme from pixel goose, and was struggling to understand why this extension wasn't working. The answer: it was working but the font icons were in white (rendering the icons virtually invisible). I added the following code to styles/metro_teal/theme/colours.css and the extension works flawlessly.

Code: Select all


.post-buttons .fa-check {
        color: #176709;
}

.post-buttons .fa-minus {
        color: #176709;

}
This took me about an hour to nail down, and I hope by posting it here, it might help someone else. The theme I was using was metro_teal.

camille44
Registered User
Posts: 1
Joined: Wed Jul 25, 2018 3:02 pm

Re: [3.2][BETA] Best Answer

Post by camille44 » Wed Jul 25, 2018 3:05 pm

Hello,
This extension seems to be really usefull. I was wondering if it is possible to set ranks in accordance with number of "best answers" ?
Regards,
Camille

User avatar
kinerity
Community Team Member
Community Team Member
Posts: 2309
Joined: Mon Sep 01, 2014 1:00 am
Location: sudo rm -rf /
Name: Kailey Truscott
Contact:

Re: [3.2][BETA] Best Answer

Post by kinerity » Wed Jul 25, 2018 3:30 pm

No, this extension will not include such a feature.
Kailey Truscott - Community Team

User avatar
kinerity
Community Team Member
Community Team Member
Posts: 2309
Joined: Mon Sep 01, 2014 1:00 am
Location: sudo rm -rf /
Name: Kailey Truscott
Contact:

Re: [3.2][BETA] Best Answer

Post by kinerity » Wed Jan 02, 2019 2:35 am

OK, I just pushed a new commit and tagged RC1. Please test it fully.
Kailey Truscott - Community Team

Locked

Return to “Extensions in Development”