All the advice I've heard for implementing hooks has been to write a custom Drupal module. But that's not very portable since it's tied to one CMS (and also one version of one CMS).
I'm wondering if there is a way to create a standalone CiviCRM extension that
- Works under Joomla, Drupal, and Wordpress
- Implements CiviCRM hooks (and doesn't interfere with other hook implementations - I understand that Joomla only allows 1 instance of each hook)
- Can add civicrm pages and admin menu items (akin to Drupal's hook_menu) i.e. /civicrm/mypage?reset=1
- Can store its own settings in the CiviCRM db (preferably in the same place civi settings are kept)