Question Threads

Question Threads 2.1.2

No permission to download
Is there a permission to prevent users creating question-threads in specific forums?
Would love to have only a help/questions section that has the question feature enabled.
 
Is there a permission to prevent users creating question-threads in specific forums?
Would love to have only a help/questions section that has the question feature enabled.

1) This please! :)

2) Can it be made possible to add an extra user group permission (meant for admins etc.) to override the "only for questions" forum permission? Because I have a forum that I have checked for "only for questions". However, I would have liked to post a few stickies in the that section (as an admin, for example a FAQ thread), but everyone else can only open Question threads.
 
Last edited:
@CMTV

Hi...

  1. just found out a thread which is marked for best answer from a Question Forum always stays on top in the XF New threads widget. Meaning even if there are so many new posts in other threads the thread which is marked for best answer occupies the top spot..
  2. The best answer cannot be unmarked or changed... can you plz add that feature?
  3. Please add an option not to use the colors and icons for questions thread as we dont want any special highlights.
Thank you for this awesome addon
 
Last edited:
Great update!

I see there are now dedicated question mark node icons for "questions only" forums. As I have custom node images, I don't want this addon to change them. Is there an option to disable that?
 
Yes. Best answer mark is a link to the best answer post for question.
1521706360097.webp

You can also create your own button somewhere. The link should look like this:
HTML:
<a href="{{ link('threads/bestAnswer', $thread) }}..."
 
You can use it for any thread just make sure it is a question and it has the best answer. This can be done with this code:
HTML:
<xf:if is="{{ $thread.QT_question && $thread.QT_best_answer_id }}">
    <a href="{{ link('threads/bestAnswer', $thread) }}" class="my_button">Go to best answer!</a>
</xf:if>
The code above should work for all threads.
 
I am a bit confused.

Does it have "go to solution" button?
Yes it does. It is the main purpose of best answer mark in thread list and it is working already for all threads.
1521707871399.webp

If you want to create your own custom button that links to best answer then you need to put the code below somewhere in the template you want the button to appear (of course you will need a variable that contains thread - $thread in my example):
HTML:
<xf:if is="{{ $thread.QT_question && $thread.QT_best_answer_id }}">
    <a href="{{ link('threads/bestAnswer', $thread) }}" class="my_button">Go to best answer!</a>
</xf:if>
 
OK. Got it working on existing threads. But could you be specific on how to add the button.

e.g I want to add a button to either of the places, marked blue:

1521710095018.webp
 
In template post_macros find this code:
HTML:
<div class="message-attribution-opposite">

Past the code below after that line:
HTML:
<xf:if is="{{ $post.isFirstPost() && $thread.QT_question && $thread.QT_best_answer_id }}">
    <a href="#post-{$thread.QT_best_answer_id}">Go to best answer!</a>
</xf:if>
1521711283776.webp

For bottom one in the same template find this code:
HTML:
<xf:if is="$hasActionBarMenu">
    <a class="actionBar-action actionBar-action--menuTrigger"
       data-xf-click="menu"
       title="{{ phrase('more_options')|for_attr }}"
       role="button"
       tabindex="0"
       aria-expanded="false"
       aria-haspopup="true">&#8226;&#8226;&#8226;</a>

    <div class="menu" data-menu="menu" aria-hidden="true" data-menu-builder="actionBar">
        <div class="menu-content">
            <h4 class="menu-header">{{ phrase('more_options') }}</h4>
            <div class="js-menuBuilderTarget"></div>
        </div>
    </div>
</xf:if>

Past the code below after that block (after </xf:if>:
HTML:
<xf:if is="{{ $post.isFirstPost() && $thread.QT_question && $thread.QT_best_answer_id }}">
    <a href="#post-{$thread.QT_best_answer_id}" clas="actionBar-action">Go to best answer!</a>
</xf:if>
1521711603069.webp
 
what happens if you use this for some time and then deinstall the mod? Do the "question" threads disappear completely, or they just stay there as regular threads?
 
Top Bottom