[Pmwiki-users] Brainstorm (Page Locks)

Greg Morgan Cybie
Thu Apr 8 19:36:21 CDT 2004


Steven Leite wrote:

> _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
>  

That's not a bad idea... since we're adding javascript to the edit 
page.  If memory serves there's an event that's fired when a window is 
closed (maybe this is IE only, if so nevermind), we could put code in 
that event to unlock the page.

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


More information about the pmwiki-users mailing list