I hope folk will understand that I don't really want to have to do this, but following a slight problem I've been asked to look at providing a mechanism for approval of pages on a wiki that we are running to deliver social services policy & procedures to staff.
I had set it up so that only logins in the group 'editors' could change the article text but allowed all logins to edit the talk pages, however management want me to add a system so that changes to the 'article' page are approved before they are visible to everyone. This goes against the ethos of the wiki I know, but all our users find the wiki very easy to use to find things in and appreciate the ability to add to the talk pages.
Accepting that I'm going to have to do this, or move the whole lot into something else and loose the advantages of the wiki for users, I would appreciate comments on the following approach.
I would have two special groups of users, 'editors' and 'approvers'
Mediawiki already has multiple versions of pages in the revision table, I am proposing to add a new field to the pages table pages.page_auth and would populate this with the revision.rev_id of the last authorised revision of the page, similar to pages.page_latest having the revision.rev_id of the latest version.
If a person browsing the wiki is not in either the editors or approvers groups then the page would be rendered using the rev_id in the new pages.page_auth rather than the one in pages.page_latest. This would allow users to see the latest authorised version but allow editors to continue developing the pages.
I would also add two further fields to the pages table pages.ready_auth and pages.previous_auth, as well as a new field in revision revision.authed_by, this would allow me to:-
1. add a tab on the screen (like the watch / unwatch) visible to 'editors' that would allow them to set/unset the binary flag pages.ready_auth to show a page is ready to be authorised, generating a list of approvals waiting for the appovers
2. add a tab on the screen (like the watch / unwatch) visible to approvers that would allow them to approve the page, when they do this I would get the value currently in the pages.page_auth copied to pages.previous_auth so we can roll back to the previously authorised version if needed, copy the current pages.page_latest to pages.page_auth so that normal user would now see the newly approved revision. I can also record in the revision.authed_by who authorised the the page to go live.
3. If a page is has been authorised but needs to rolled back we now have the previous revision in pages.previous_auth so we can roll back.
I know this is not what we all want wiki's for but rather than loose what we have have I missed any really salient points in what I'm trying to do.
Ta
John
I had set it up so that only logins in the group 'editors' could change the article text but allowed all logins to edit the talk pages, however management want me to add a system so that changes to the 'article' page are approved before they are visible to everyone. This goes against the ethos of the wiki I know, but all our users find the wiki very easy to use to find things in and appreciate the ability to add to the talk pages.
Accepting that I'm going to have to do this, or move the whole lot into something else and loose the advantages of the wiki for users, I would appreciate comments on the following approach.
I would have two special groups of users, 'editors' and 'approvers'
Take a look at this: http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/StableVersion /
It doesn't do exactly what you want, but it gets pretty close. There are of course holes in this like every other protection scheme for MediaWiki. For instance, users could use page transclusion to see the newest version... However, what you proposed would allow that as well.
In the above extension, notice how things are done for anonymous users, and apply that to users with specific groups. If you can make it generic enough, I'm sure Magnus wouldn't mind getting a patch.
Btw, after MediaWiki adds versioning stuff in the future (1.10 is it?), I'm not sure how much development work will be done on this extension (as that was the original purpose of the extension).
V/r,
Ryan Lane
This StableVersion seems like something that could be useful in my company. Does it have any documentation about what it does, and how to use it?
This StableVersion seems like something that could be useful in my company. Does it have any documentation about what it does, and how to use it?
Not really. Magnus Manske wrote the extension, and I updated it some. I'm using it, but I'm not sure if anyone else is. No documentation has been written for it except for the slight amount of documentation written in the extension itself.
Once I heard MediaWiki will be adding support for something similar in the future, I stopped making updates to this extension because I wanted to see if the new MediaWiki code is something I can use in my organization. No point in maintaining an extension that will be made redundant in the future.
As for a quick usage guide... The extension is pretty easy to use. You add a table to your database (the sql to do so is in the extension comments). Then, you add stuff to LocalSettings.php like so:
// For stable version stuff // Don't forget to checkout the language directory and everything in it! include( "extensions/StableVersion.php" );
// Only give permission to change stable version info to people in the // docCustodian group. $wgGroupPermissions['*']['stableversion'] = false; $wgGroupPermissions['docCustodian']['stableversion'] = true;
// Set this to true if you want non-logged in users to be redirected // automatically to the stable version. If no stable version exists, // users will see the latest draft. #$wgStableVersionRedirectAnon = true
// Used in combination with the option above. If you // want anonymous users to only see the stable version, // set this to true. Like above, if no stable version exists // users will see the latest draft. #$wgStableVersionShowDefaultToAnon = true
After doing so, add users to the docCustodian group and they'll be able to set/unset things as stable.
V/r,
Ryan Lane
Ryan I think this will probably answer what I need, at least to start with and probably could add the other bits needed, do you know what versions of media wiki it has been tested with, we are currently on V1.5.8 and as we don't have php5 are trying to stay at this level, I'll try it anyway but was just wondering.
Thanks
John
Lane, Ryan wrote:
This StableVersion seems like something that could be useful in my company. Does it have any documentation about what it does, and how to use it?
Not really. Magnus Manske wrote the extension, and I updated it some. I'm using it, but I'm not sure if anyone else is. No documentation has been written for it except for the slight amount of documentation written in the extension itself.
Once I heard MediaWiki will be adding support for something similar in the future, I stopped making updates to this extension because I wanted to see if the new MediaWiki code is something I can use in my organization. No point in maintaining an extension that will be made redundant in the future.
As for a quick usage guide... The extension is pretty easy to use. You add a table to your database (the sql to do so is in the extension comments). Then, you add stuff to LocalSettings.php like so:
// For stable version stuff // Don't forget to checkout the language directory and everything in it! include( "extensions/StableVersion.php" );
// Only give permission to change stable version info to people in the // docCustodian group. $wgGroupPermissions['*']['stableversion'] = false; $wgGroupPermissions['docCustodian']['stableversion'] = true;
// Set this to true if you want non-logged in users to be redirected // automatically to the stable version. If no stable version exists, // users will see the latest draft. #$wgStableVersionRedirectAnon = true
// Used in combination with the option above. If you // want anonymous users to only see the stable version, // set this to true. Like above, if no stable version exists // users will see the latest draft. #$wgStableVersionShowDefaultToAnon = true
After doing so, add users to the docCustodian group and they'll be able to set/unset things as stable.
V/r,
Ryan Lane
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Ryan I think this will probably answer what I need, at least to start with and probably could add the other bits needed, do you know what versions of media wiki it has been tested with, we are currently on V1.5.8 and as we don't have php5 are trying to stay at this level, I'll try it anyway but was just wondering.
Thanks
John
I've tested it with 1.6 (I added a necessary hook). It should work with anything higher; all the hooks necessary exist. I'm not sure if it will work with 1.5 though. You can probably add all the needed hooks.
If you use 1.6, I think you only need to add one hook (ParserBeforeInternalParse). I'd check to be sure though.
V/r,
Ryan Lane
mediawiki-l@lists.wikimedia.org