mediawiki run php code
you can run php code in mediawiki using the runphp extension.
you can get it here
i used it to display some database content. but it did only update after re-saving the article.
you need to disable caching in mediawiki:
$wgMainCacheType = CACHE_NONE; $wgMessageCacheType = CACHE_NONE; $wgParserCacheType = CACHE_NONE; $wgCachePages = false;
(taken from: here)
when accessing a database:
- do not use $handle
- do not use select_db() just use absolute database and table names, like “select * from databasename.tablename”
other problems:
- include the runphp file AT THE END OF localsettings.php, not at the beginning……..
- runphp only executes php from protected (sysop only) pages!
October 31st, 2007 at 10:20 pm
See also:
http://www.mediawiki.org/wiki/Extensions_FAQ#How_do_I_disable_caching_for_pages_using_my_extension.3F
November 23rd, 2007 at 10:43 pm
Hi, that link http://bluecortex.com/index.php?title=Bluecortex:Runphp_page in not valid anymore :(