Fixes #6024: Adds support for ":before" and ":after" events

Conflicts:
engine/lib/elgglib.php