Does anyone know how to exclude pages from the Recent Changes page in mediawiki? I have a testing page where users can play wit开发者_JAVA百科h syntax and formatting etc. but don't want every little change to show up on the recent changes page.
thanks
You can use the SpecialRecentChangesQuery
hook to exclude the specific page by title, like this:
$wgHooks['SpecialRecentChangesQuery'][] = 'rcExcludeSandbox';
function rcExcludeSandbox( $conds ) {
$dbr = wfGetDB( DB_SLAVE );
$conds[] = 'rc_title != ' . $dbr->addQuotes( 'Sandbox' );
return true;
}
This will prevent all changes on the page "Sandbox" from appearing in Special:RecentChanges.
If you don't mind writing some PHP, consider using the http://www.mediawiki.org/wiki/Manual:Hooks/OldChangesListRecentChangesLine hook. If you set $s to an empty string for a given page, then those edits shouldn't appear in Special:RecentChanges.
Easiest would be to put your page in a different namespace, and not search it by default. Unfortunately that functionality isn't in the current version of Mediawiki.
I think you have to use Namespace Manager, It doesn't look like it is finished, but you could give it a shot. It seems like the plan is to add it to a future version.
You could just make a page named Sandbox, and then allow users to edit that page. If you use Enhanced Recent Changes all those edits will appear together, so it won't bother you too much.
My solution is a separate wiki instance. It is not that hard to set up and then you can also test functional changes in isolation as well.
精彩评论