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.