It's an interesting idea, but for now I suggest you do this using an advanced theme, which allows you to run any PHP code at any point on the page.
Or you can modify qa-page.php wherever it calls output_raw(...) in the theme object. You can make use of PHP's eval(...) function to run the PHP which was stored in the appropriate option setting.
The way I got around it was by loading the php into a div inside the custom html with jquery's .load() ... for example...
<head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script> </head>
<script> $(document).ready(function() { $("#test_container").load("location/to/yourphppage.php"); }); </script>
<div id="test_container"></div>
...it worked fine for me
This is an update of the answer provided by gidgreen, for q2a 1.7.4.
using an advanced theme, you can override output_raw() this way :
public function output_raw($html) { if (strlen($html)) { $html = eval('?>'.$html.'<?php '); echo str_repeat("\t", max(0, $this->indent)).$html."\n"; } }
Welcome to the Q&A site for Question2Answer.
If you have a question about Q2A, please ask here, in English.
To report a bug, please create a new issue on Github or ask a question here with the bug tag.
If you just want to try Q2A, please use the demo site.