Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
444 views
in Q2A Core by
I've figured out how to include HTML code into an Advanced theme, but how do you include a q2a function, eg unanswered questions, tags, ask form etc, in the qa-theme.php file?

Also, if you wanted to include a forum script (eg phpBB) into the page template. what code should I use? Help would be very much appreciated.
by

1 Answer

0 votes
by

Not able to access my local install at the moment, but....In trying to output the questions beneath my custom content in my Advanced theme, might I be somewhere close in thinking the code would be...

<?php

    class qa_html_theme extends qa_html_theme_base
    {
        function q_list_item($question)
       
    
        {
            if  ($this->template=='name_of_my_page')
                $this->output('<DIV CLASS="name-of-div-created-beneath-my-custom-content"></DIV>');
            else
                qa_html_theme_base::page_link_content($page_link);
        }
    }


?>

 

or this below??enlightened

 

<?php

    class qa_html_theme extends qa_html_theme_base
    {
        function q_list_item($question)
       
    
        {
            if  ($this->template=='name_of_my_page')
        {
            $this->output('<DIV

CLASS="name-of-div-created-beneath-my-custom-content'.@$question['classes'].'" '.@$question['tags'].'>');

$this->q_item_stats($question);
            $this->q_item_main($question);
            $this->q_item_clear();

            $this->output('</DIV> ', '');




else
                qa_html_theme_base::page_link_content($page_link);
        }
    }


?>

 

Apologies if this question is a bit simple, but as you can probably tell I'm no expert at php, but desperate to make my design ideas work.

Thanks


 

...