Quick question. Is there any modification to mediawiki that would allow PHP code to be used on pages? I've tried adding "?php" as a tag, but without success.
Hope you can help, thanks for the last answer about wantedpages.
On 03/06/05, Robert Jones bob@jones-cliffe.freeserve.co.uk wrote:
Quick question. Is there any modification to mediawiki that would allow PHP code to be used on pages? I've tried adding "?php" as a tag, but without success.
No, but you might want to look at the "extension" mechanism, that lets you execute pre-defined (parameterised) code to put things in the middle of pages (basically like how the <math>...</math> stuff works). And of course, if you're 100% sure no-one could exploit it (don't rely on MediaWiki's own restrictions for this, it's not built to be secure) you could make a function to eval() or whatever the content you put between <php>and</php> - although it's probably better to determine in advance what it is you want the extension to do and keep it specific.
See http://meta.wikimedia.org/wiki/Write_your_own_MediaWiki_extension
Depending what you want to do, you could also make your own "special page", which is a dynamic page with no existence in the database, that just runs PHP to generate its content - useful because it's not cached, unlike everything else.
wikitech-l@lists.wikimedia.org