The following allows anonymous users to edit talk pages. You can use this
as a basis for whatever you need done.
$wgExtensionFunctions[] = 'MediaWiki_AnonymousEditsExtension';
$wgHooks['userCan'][] = 'MediaWiki_AnonymousEditsUserCan';
function MediaWiki_AnonymousEditsUserCan(&$title, &$user, $action, &$result)
{
if ($action == 'edit') {
if ($title->isTalkPage() && $title->isSemiProtected('edit') ===
false) {
$result = true;
if (!in_array('edit', $user->getRights())) {
$user->mRights[] = 'edit';
}
}
}
return true;
}
Instead of $title->isTalkPage(), you could have something like:
$anonymousAllowedEdit = array('Main Page', 'Page 1', 'Page 2');
if (in_array($title->getFullText(), $anonymousAllowedEdit) &&
$title->isSemiProtected('edit') === false) {
$result = true;
...
}
On 2/18/07, Giovanni Gherdovich <gherdovich(a)students.math.unifi.it> wrote:
Hello,
I admin a (media)wiki where only logged user can edit pages,
and anauthorized creation of accounts is forbidden.
I would like to lightly change this policy, setting up some pages
where everybody can edit.
so: everybody can see everything, but anonimous users can
edit just few pages.
How can I do?
regards,
Giovanni Gherdovich
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l(a)lists.wikimedia.org
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l