Home > Know-how >
MediaWiki - CMS >
Reference Tips & Tricks > MediaWiki Recipes (Tips)
|
|
|
4.6 MediaWiki Recipes (Tips)
|
15.06.2007
|
MediaWiki Recipes
-
Log editing activities of specific Wiki pages
[ includes/EditPage.php → function editForm ]
if ( 'save' == $formtype ) {
if (preg_match("/\/Main_Page$/", $this->mTitle->getFullURL())) {
error_log("Main Page was edited by " . $wgUser->getName());
}
...
-
Main Page should only be editable by WikiSysop, protected or not
[ includes/EditPage.php → function editForm ]
if ( 'save' == $formtype ) {
if ((preg_match("/\/Main_Page$/", $this->mTitle->getFullURL()) &&
$wgUser->getName() != "WikiSysop")) {
error_log("Main Page can only be edited by WikiSysop!");
$this->userNotLoggedInPage();
return;
}
...
You would usually click to the [protect] tab to protect a page.
Only users with 'sysop' privileges can edit these pages.
-
Prevent publishing of anonymous users
→ See Block anonymous users
-
A username 'Foo' should be authorized with any password
Includes authplugin
Remove rights from users
For example, a common user should not move pages anymore.
→ See Authorization
Setup a read-only Wiki
→ See Authorization
Password Change Event
See Includes specialpreferences
How to suppress the ‹title› on a Wiki page?
Add this code at the top of the Wiki page:
<html>
<script language="JavaScript">
document.write('<style type="text/css">h1.firstHeading { display: none; }</style>');
</script>
</html>
See also:
Authorization
← 4.5 How do I add a table of contents?
A - Z Index
Top
Disclaimer
4.7 Error Messages (Hints) →
$Id: recipes.html,v 1.97 2007/06/15 11:49:14 webcms Exp $
copyright © 2005-2007 by reto