Question Answer Plugin

(Pad Pors) #13

is it possible to use the QA button for another purpose: to filter and show topics which are QA listed below the button, as well as to use it as a composer in QA?

the same rule for wiki, rating, and discuss button.

(Pad Pors) #14

how can one set up the funky compose like this sandbow?

and why the composer doesn’t let you decide about the category?

how can one have the category list space?

p.s.: I’m confused if it’d better to write this as a new topic or here. sorry if I put it in the wrong place.

(Angus McLeod) #15

The composer on my dev site is a work in progress. It will change quite significantly soon.[quote=“Pad_Pors, post:14, topic:56032”]
how can one set up the funky compose like this sandbow?

It’s a combination of this plugin with this plugin, but I wouldn’t recommend using it yet.

The discovery composer is context dependent. It assumes you’re using category navigation in a sidebar. The context (i.e. category when you’re in a discovery route) is set in a plugin like the map navigation widget.

This is a category list widget that I built for the map navigation widget to allow the user to select the category. You can also navigate by clicking on items on the map.

(Pad Pors) #16

Thanks for the description,

does this mean like this: if I choose Brazil as the category in the sidebar (using the map), any topic that I post will be in the Brazil category.

just like what happens currently in simple discourse, when we are in a category, and we open create topic, then the default category of the new topic is the category we’re in. correct?

(Angus McLeod) #17

Correct. Posting in the discovery composer I have built is entirely context dependent. Why restrict it like this? Because the use case I’ve built it for ties categories to physical locations, giving them a somewhat different character to normal categories in a normal non-location-specific forum. If you’re specifically tying content to a location, you don’t really want your users to be so easily able to post new content in different locations. Someone can only be in one place at once.

*edit. If you’d like to discuss this further, let’s do so in the custom layouts plugin topic. It’s a little off topic here.

(Hugo Lpz) #18

I think your plugin indeed is a key plugin for a QA-SO feels.
I would recommend you to rename your plugin tho. -QA is too general. What your plugin does is more specific : posts voting and sorting. Be clear : this is great and it’s complementary to other plugins you rightly cite, which together provide multiple bricks to pick as needed to get closer to a QA feels.

See also :
[1] : Plugin which turns discourse into stackoverflow

(Angus McLeod) #19

What would you suggest I call it? “Post Voting and Sorting Plugin” doesn’t exactly roll off the tongue :slight_smile:

(Hugo Lpz) #20

What would you suggest I call it? “Post Voting and Sorting Plugin” doesn’t exactly roll off the tongue :slight_smile:

@angus, my name proposal : “Discourse Answers Voting”. Sounds net.
The sorting function should be default but optional (can be disabled), as some users may cherish the chronological sorting. Limit your plugin to just that and its associated effects on the right-side elevator would fit well with other plugins, existing or likely to come.

(Pad Pors) #21

Hi Angus,

a suggestion regarding the composer plugin, that may be helpful:

Quora has a simple feature that is inspiring: “post to” in the same time that one is creating a topic:

hi Angus @angus , any update with the composer plugin?

(Pad Pors) #22

Hi Angus,

we used QA in our forum, but then the topics with more votes came down in the discussion! that’s if a topic has more vote its position is more near the bottom of the topic list.

does it have anything to do with the Persian language?

e.g. you can see in this image that a topic with one upvote is after a topic with zero votes!

(Pad Pors) #24

some minor issues with the QA plugin-test:

  • answers are not sorted based on their votes in our Persian forum. in fact they become randomly sorted after activation of QA tag. and won’t go back to the previous time-based sorting if I deactivate the tag from the topic :frowning:

  • people can vote to their own reply.

(Angus McLeod) #25

Hey dude, sorry for being unresponsive here. Will take a look soon.

(Tomek) #26

@angus did you manage to solve this?

On my forum this is also an issue, posts are not sorted based on their votes, this is an example:

(Angus McLeod) #27

Ok, previously I was trying to be clever and use the existing sort_order property on posts, however it seems that that breaks down when the topic gets longer than a handful of posts. I’ve just directly overridden the sort order of topics which are in a QA enabled category. So it’ll work for topics of any length.

cc @Pad_Pors @TomekB

(Alex Reguyal) #28

I tried to move a Q&A topic from the QA category to a different category, and all the votes and voting functionality disappeared. So I added a “question” tag to the topic, and all the votes came back on again. So the tag actually works.

The bug that I encountered is that, you can “like” any and all replies as long as you haven’t voted yet. However, if you vote first, then you can’t like anymore, you will get this error – “You are not permitted to view the requested resource”. So you should first undo your vote, then like some of the replies, then cast your precious one vote again.

(Lincoln President) #29

Thanks for sharing :slight_smile:

(Tomek) #30

@angus After installing your plugin I cannot read any private messages.

I get an error and this log message:

NoMethodError (undefined method custom_fields for nil:NilClass)
/var/www/discourse/plugins/discourse-qa/plugin.rb:66:in qa_enabled

( #31

I have the same issue. Strangely it persists when entering discourse’s safe mode.

( #32

Found the reason: “Safe mode currently only disable the JavaScript portions of plugins”

(Angus McLeod) #33

Yup, looks like my last update didn’t handle the case of uncategorized topics. Please give it another shot.