Welcome Guest, Not a member yet? Register   Sign In
prevent multiple simultaneous page editors
#3

[eluser]janogarcia[/eluser]
I'd implement a locks table as you suggest for managing file locking/unlocking (locks, page_locks, edit_locks, whatever name you prefer...). Keeping track of basic lock information: content_id, timestamp, user_id.

For example, DokuWiki locks the piece of content being edited so other users won't be able to edit the same content at the same time.

There's one interesting DokuWiki feature that you should take into consideration: To avoid accidental permanent locks, DokuWiki will lock the page for 15 minutes, after that a JavaScript popup will warn you that the page will be unlocked unless you press the Preview button (wich resets the lock timestamp). You could implement this functionality in a more elegant way: perhaps a modal window with a "Keep editing the page" button.

Some CMS use more advanced and less restrictive collaborative editing worklflows, as MediaWiki does with its handling of editing conflicts wich permits simultaneous/parallel editing:

Quote:Handle edit conflicts (page being saved by a user while still being edited by another one, then saved again). MediaWiki will merge changes automatically if possible and otherwise require the user to do a manual merge.
http://www.mediawiki.org/wiki/Manual:Med...ature_list

I'm not aware of any CI library that handles this task. I'm sure you will be better off with one custom tailored to your project. It shouldn't bee too difficult. It is just one new feature/pattern to learn.

Good luck.


Messages In This Thread
prevent multiple simultaneous page editors - by El Forum - 03-09-2009, 02:58 AM
prevent multiple simultaneous page editors - by El Forum - 03-09-2009, 05:14 AM
prevent multiple simultaneous page editors - by El Forum - 03-09-2009, 05:37 AM
prevent multiple simultaneous page editors - by El Forum - 03-09-2009, 05:46 AM
prevent multiple simultaneous page editors - by El Forum - 03-09-2009, 05:54 AM
prevent multiple simultaneous page editors - by El Forum - 03-09-2009, 06:25 AM



Theme © iAndrew 2016 - Forum software by © MyBB