Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
Does CouchCMS have any way currently to log all edits to pages and who did the edits at all?

Having looked through the code, I can see that there are some internal event handlers going on when pages are edited (e.g. https://github.com/CouchCMS/CouchCMS/bl ... s.php#L212). Would it be possible to get the appropriate data out if I wrote a plugin which tied into those hooks and recorded who changed what and when?

Is there any documentation on how to write plugins and add event listeners / list of available events, or will that be a "learn from existing code" experiment?
Hi Wol :)

Out of the box, I'm afraid, Couch does not log the changes being made.

You can certainly hook into the events being thrown by it at all key-points, though, to get it done yourself.

As for the 'developer' docs, there are none at the moment, I'm really sorry.
The 'extended' addon makes use of the hooks pretty extensively - if you wish you can get implementation pointers from the code there.
KK wrote: You can certainly hook into the events being thrown by it at all key-points, though, to get it done yourself.


The fact that there are the hooks available makes it a lot easier!

KK wrote: As for the 'developer' docs, there are none at the moment, I'm really sorry.
The 'extended' addon makes use of the hooks pretty extensively - if you wish you can get implementation pointers from the code there.


Cool. I'll have a look through that.

Cheers.
3 posts Page 1 of 1