On 3/31/06, Michael Krefft mk@michaelkrefft.com wrote:
Hi!
I would like to create a Mediawiki tag that allows me to run PHP code within an article. I've seen an extension that allows execution of arbitrary code, but that seems too dangerous to me. It should be from a specific file only, e.g. "/somefolder/somestuff.php" which gets called via {{somestuff|foo}} , being "foo" a value which is used by a function in somestuff.php
I'm sure this would allow many interesting modifications, customizations and enhancements for MediaWiki.
Can this be done with an extension? How?
If you are trying to do this when the article is saved then yes. For example the spamblacklist extension runs php code when an attempt is made to save an article. That might be a good place to look for an example.
-- Rick DeNatale
Visit the Project Mercury Wiki Site http://www.mercuryspacecraft.com/