Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+4 votes
606 views
in Q2A Core by
hiya,

i am trying to integrate q2a with my existing site, which runs on codeigniter framework. i have so far managed to get it working in terms of sso and having no errors.

at the moment i am basically just including qa-include/qa-index.php and q2a is echoing out all the html, however the resulting html is a full page of q2a content (including opening and closing html, head and body tags) followered by a full page of my own content (opening and closing html, head and body tags)

i have been looking through several files such as qa-theme-base.php but i cannot see how to make q2a return the value of the html to codeigniter, rather than just print it straight to browser.

does anybody have any ideas?

many thanks
Q2A version: 1.6.1!

1 Answer

0 votes
by
 
Best answer
Your best bet is to use a mixture of PHP output buffering to collect the output in a variable, and overriding some theme functions in a custom theme to prevent parts of the page you don't want from being output. But this will break some aspects of the page so you may need to output buffer the whole thing, then pull it apart to integrate into the appropriate parts (head/body) of the container HTML page.
...