From 9d5818636008f99e425465c42a808a36489f4052 Mon Sep 17 00:00:00 2001 From: Michael Save Date: Mon, 19 Mar 2012 02:41:06 +1100 Subject: [PATCH] New feature: "events". Will eventually replace/extend "themes". --- inc/config.php | 17 +++++++++++++++++ inc/events.php | 40 ++++++++++++++++++++++++++++++++++++++++ inc/functions.php | 8 ++++++++ post.php | 6 +++++- 4 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 inc/events.php diff --git a/inc/config.php b/inc/config.php index ae0a36c5..afc4ceaa 100644 --- a/inc/config.php +++ b/inc/config.php @@ -954,6 +954,23 @@ // Edit the current configuration (via web interface) $config['mod']['edit_config'] = ADMIN; +/* + * ==================== + * Events (PHP 5.3.0+) + * ==================== + */ + + // event_handler('post', function($post) { + // // do something + // }); + + // event_handler('post', function($post) { + // // do something else + // + // // return an error (reject post) + // return 'Sorry, you cannot post that!'; + // }); + /* * ==================== * Other/uncategorized diff --git a/inc/events.php b/inc/events.php new file mode 100644 index 00000000..a5b9129d --- /dev/null +++ b/inc/events.php @@ -0,0 +1,40 @@ +