开发者

MediaWiki: page editing allowed by creator only or with approval

I'm trying to restraint editing on the Wiki (using MediaWiki) that I'm creating as an internal project for my company.

We would like to be able to let the page creators specify none or one of the two following options开发者_如何学运维:

  • Nobody besides the creator of this page can edit the content of this page
  • Anybody can edit the content of this page, but there must be an approval by the page creator before the changes are visible (whether it'd be by mail, on the wiki directly or something else - does not matter).

If the creator does not specify any of the 2 options, anybody can edit the page, and the changes are immediatly visible (default behaviour).

I've been browsing the net but I did not find an out-of-the-box solution for this. We managed to make some great custom stuff thanks to the edition of the LocalSettings file but not this.

Is there a solution for that functionality?


I don't know of an extension that would make this easy.

What I think you could do would be to take an extension like Flagged Revs or Approved Revs and make it so that instead of using groups as the determiner of approval status, it uses username. This might not be too difficult. Does this make sense?


I had the same problem as you and now i fixed it, here is the solution:

I am using http://www.mediawiki.org/wiki/Extension%3aApproved_Revs for article protection but it didn't fulfil my need it allowed the user to change the currently approved revision of the article and so the change was immediately reflected on the main page so I hacked it a bit, basically you need only one change

go to ApprovedRevs/ApprovedRevs.hooks.php

and find the following code:

static public function setLatestAsApproved( &$article , &$user, $text,
        $summary, $flags, $unused1, $unused2, &$flags, $revision,
        &$status, $baseRevId ) {

this is a function declaration just after it add the following code:

return false;

and it will work the way you wanted it to be i.e (the change you did will not be reflected until you approve it)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜