Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

How to include a custom button.

0 votes
236 views
asked Sep 1, 2011 in Q2A Core by Eschelon
Hi all

I need to add another button to the 'edit hide answer' and 'comment' buttons that appear under each question.

I have a custom theme already, but I am confused as to how I should insert this button and add a nice css class to it.

I really appreciate any help with this, thank you.

2 Answers

+3 votes
answered Sep 1, 2011 by NoahY
This works (tested):

        function q_view_buttons($q_view)
        {
            $q_view['form']['buttons'][] = array(
                'label' => 'yourlabel',
                'tags' => 'NAME="yourname"',
            );
            qa_html_theme_base::q_view_buttons($q_view);

        }
commented Sep 1, 2011 by NoahY
But if you want custom css, I think you will have to dig further... this only copies the css of the other buttons.
commented May 3 by lipsmega
Hi Noahy, where I put this code?
+4 votes
answered Sep 1, 2011 by scorch
...