Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
PHP lines in discussions and comments
Hi,
Is it possible to "give" PHP lines in the body of discussions / comments ,
Example :
<?php
require("./livre.php");
?>
0
This discussion has been closed.
Comments
One way that you can parse PHP "on the fly", so to speak, is using PHPs eval() function: http://uk.php.net/eval
You could probably do something clever with preg_replace, PHP deliminators (<?php ?>) and eval(). It actually sounds like this could make an interesting extension, say, where certain roles (of your choosing) can have PHP evaluated within comments.
Adam.
Getting Started
there are loads of add-ons out there that process the content of comments. pick a simple one like Markdown and study its code. i think you'll get an idea of how to do what you want.