concrete5/concrete5 — pull request #598 by JohntheFish (2012-07-24 02:59:15+00:00)
Title: Add an 'on_block_load' event.

Re-worked pull request 589 that I made on the master branch into
the 553 devel branch.
https://github.com/concrete5/concrete5/pull/589

To avoid performance impact where it is not needed, firing the event is
controlled by ENABLE_ON_BLOCK_LOAD_EVENT definition. If
ENABLE_ON_BLOCK_LOAD_EVENT is set, 'on_block_load' will be fired. Event
handlers have the opportunity to return a modified block record.

This will facilitate adjusting loaded block data. For example, it is now
possible to develop an attribute or package to modify the file set
loaded by a gallery depending on the page or user. We can make stacks
and global areas responsive to where they are shown, who is logged in,
or who owns the page.