Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
6.7k views
in Plugins by
Hi developers

Came across http://pokemondb.net/pokebase/ and I really liked how the site has been modified to be user friendly. I especially liked the "post an answer" button after all answers on the question page.

Anyone has an idea how to program such a button?

Thank you
Q2A version: 1.5.4

1 Answer

+1 vote
by
selected by
 
Best answer
  1. Display HTML of reference site.
  2. Look for HTML code of your favorite parts.
  3. Open qa-include/qa-theme-base.php
  4. In this case, Find "<!-- END qa-a-list -->"
  5. In this case, Add below function in qa-theme.php file of your theme folder.
function a_list($a_list)
{
  qa_html_theme_base::a_list($a_list);  // parent class process of Q2A core
  $this->output('Past HTML-code here !!');
}
by
Hi,

With your help, the HTML code I needed is:

<p align="center"><input name="q_doanswer" onclick="return qa_toggle_element('anew')" value="Post an answer" title="Answer this question" type="submit" class="qa-form-tall-hover qa-form-tall-hover-answer"></p>

I pasted this HTML code in qa-theme.php of theme folder inside the function you provided above. However, am getting this error

Parse error: syntax error, unexpected T_STRING in /home/xyz/public_html/qa-theme/Snow/qa-theme.php on line 94

And Line 94 is: <p align="center"><input name="q_doanswer" onclick="return qa_toggle_element('anew')" value="Post an answer" title="Answer this question" type="submit" class="qa-form-tall-hover qa-form-tall-hover-answer"></p>
by
Oh! I found the mistake and corrected the HTML code to

<p align="center"><input name="q_doanswer" onclick="return qa_toggle_element(\'anew\')" value="Post an answer" title="Answer this question" type="submit" class="qa-form-tall-hover qa-form-tall-hover-answer"></p>

The button is now showing up after all the answers, THANKS  :)
by
Welcome to wonderful Q2A world !! ^_^
by
Hi,, owner of the site here. All I did was copy the button code for the regular "answer" button that's below the question, then change the classes :)
by
Hi Scott :)
I have successfully implemented an answer button using the method provided by sama55. Your site is really well designed and popular in your niche, your success keeps many of us going. Hope one day to be where you are!
...