[Pmwiki-users] Brainstorm (Page Locks)

Steven Leite steven_leite
Thu Apr 8 09:41:33 CDT 2004


Re:  Page Locks

The recent discussion on page locks during editing got me thinking .. Here's my two bits:

When a user click on Edit Page, the page get's locked (so nobody else can edit it).  PmWiki records the current time somewhere, and makes a note that this page can't be edited for x minutes (whatever amount of time the admin decides on).

Each time PmWiki is called, it checks to see if the page lock is still valid or not (have x minutes passed?).  If yes, the page lock is release.  If no, the page remains locked.

The author can extend their edit time simply by clicking on the Preview button.  So as long as the Preview button get's pressed every x minutes, the page lock get's renewed for that author.

The bonus here is, if the author abandons the edit, or simply closes their browser, no problem; the next time PmWiki get's executed (by another author), PmWiki makes a quick check to see how much time has passed since the last page-lock.  If a page lock is set to a reasonable 10 minutes, the longest time a person would have to wait is 10 minutes for the lock to be released.  You could go one step further, and instead of giving an error message during a page lock, you can say "Sorry, $Author is currently editing that page.  Try again after x minutes". 

I wanted to make this as visual as possible, so you could besides informing the author that he has x minutes to edit, you could also have a count-down timer at the top of the page to serve as a guide.  It would probably require a very simple javascript (compatible with nearly any browser?).  It's just an idea .. I know many folkds out there aren't fan's of javascript (including me), but if it's a really simple script, and it serves a useful function, I don't see the harm in it :)  That way the author has a visual cue as to when they should click the Preview page to renew the page-lock for another x minutes. 

Hope that's helpful.  I look forward to seeing this feature implemented soon!

-Steven Leite
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://contra.vosn.net/pipermail/pmwiki-users_pmichaud.com/attachments/20040408/e4743edf/attachment-0001.htm


More information about the pmwiki-users mailing list