How to determine and deduce that the fields in the form are being edited (as an example, editing the article) at the moment and by whom. those. one manages the article in the admin panel, and the second comes to edit the same article and sees that something is currently being edited and by whom. Maybe there are some ready-made scripts or .... or ... But I do not understand where to dig. Thank.


I think can manipulate hidden fields.

  • types like GoogleDocs - Web Lips

2 answers 2

I would solve this problem like this: 1. I would hang an observer on the field. 2. And with each change the data was sent to the server.

Respectively already on the server would follow who edited what field. Compare and return it to customers. But here comes a lot of pitfalls.

I do not know about the finished plug-ins.

  • Thank. I will choose this option. - Web Lips

Create edited flag which is 0 or 1. If edith button is pressed, set edited=1 . Put a check before edited, if edited!=1 only then open edith. Save button set edited=0 .
This way you create a check if someone is already editing the article.

  • You can kill two birds with one stone and in the field instead of 1 put the user id, who opened the current file for editing. As a result, if 0, then there is the possibility of editing, if not, then it is shown which user is currently working with the document - Sergey Strelchenko