update to new events system

Hello,

this is an update to substitute add_to_log calls with the new events trigger.
It updates the view page, nut not the index page.

Kind regards,
Daniel