Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Unanswered button gives error
okhawaja
New
I followed instructions for implementing only the Ask Question big button. Everything is working fine except the Unanswered button. I am using Vanilla 2.2 Getting the below error. I am using latest version of the plugin Q&A. Another issue is that on Mobile the Ask Question button is appearing above the footer, while I want it to appear under the Search bar on Bootstrap theme...
0
Comments
what version number of Q & A are you using?
and what did you change?
in the newquestion module
change the echo to return
Pragmatism is all I have to offer. Avoiding the sidelines and providing centerline pro-tips.
Version
1.2.4
Did this:
add this to class.qna.plugin.php
public function DiscussionsController_Render_Before($Sender) {
if (C('Plugins.QnA.UseBigButtons')) {
$QuestionModule = new NewQuestionModule($Sender, 'plugins/QnA');
$Sender->AddModule($QuestionModule);
}
if ($Sender->Data('Discussion.Type') == 'Question') {
$Sender->SetData('_CommentsHeader', T('Answers'));
}
}
add these lines to your config.php
$Configuration['Plugins']['QnA']['UseBigButtons'] = TRUE;
$Configuration['Modules']['Vanilla']['Panel'] = array('MeModule', 'UserBoxModule', 'GuestModule', 'NewDiscussionModule', 'NewQuestionModule','DiscussionFilterModule', 'SignedInModule', 'Ads');
you also need to change QnA/modules/class.newquestionmodule.php
from
echo Anchor(T('Ask a Question'), '/post/discussion?Type=Question', 'Button BigButton NewQuestion');
to
echo Anchor(T('Ask a Question'), '/post/question', 'Button BigButton NewQuestion');
ok - all you need to do is reread this comment.
https://vanillaforums.org/discussion/comment/242922/#Comment_242922
return Anchor(T('Ask a Question'), '/post/question', 'Button BigButton NewQuestion');
Pragmatism is all I have to offer. Avoiding the sidelines and providing centerline pro-tips.
You need to upgrade to vanilla 2.2.1
and sort the modules. https://vanillaforums.org/discussion/comment/232501/#Comment_232501 to position askmodule question you want in the sort. Reading the other tutorials in the tutorial category again might help you.
you can also delete the adding of module in the render unanswered it you want.
same answer as in the other discussion.
Pragmatism is all I have to offer. Avoiding the sidelines and providing centerline pro-tips.
The latest version of the plugin Q&A has the module "NewQuestionModule" and I have that as the first module in the sort order, so it's fine for the desktop theme. The problem I am having is that for mobile the NewQuestionModule goes to the bottom along with ALL the other modules. All the modules go above the footer for mobile. That is why I have no idea how I can get it to rank above.
I JUST Found out what was wrong....I copied my current theme and replicated it. Used the replicated theme as Mobile and changed the {asset name="Panel"} part and move it from footer to below the search bar, so now it works!
@River I just took a new copy of Q&A and changed echo to return, and tried out the plugin with those changes instead of the older changes. Here is what happened:
Ask a Question button only shows up in Unanswered, when you ask a question it posts it as a type Question, but visually it doesn't look anything different from a regular discussion. Also, commenting in a discussion that's supposed to be a question doesn't make the "Did this answer the question" thing appear, so you can't accept or reject any answers in the discussion. So overall, the suggested change probably needs more modifications than just the change of echo to return.