aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-04-14 22:23:33 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-04-14 22:23:33 +0000
commit9b1f2384134da90edc116790babaa37ce7991151 (patch)
treef7a6af5ae6016f143a9b3a602ca1a389ae7ef51d /mod
parent605858b194425aaac889e57b76ed0a346a70815a (diff)
downloadelgg-9b1f2384134da90edc116790babaa37ce7991151.tar.gz
elgg-9b1f2384134da90edc116790babaa37ce7991151.tar.bz2
Added ECML support in blogs.
git-svn-id: http://code.elgg.org/elgg/trunk@5734 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod')
-rw-r--r--mod/blog/start.php20
1 files changed, 19 insertions, 1 deletions
diff --git a/mod/blog/start.php b/mod/blog/start.php
index f36c542a2..b5efa96d8 100644
--- a/mod/blog/start.php
+++ b/mod/blog/start.php
@@ -58,6 +58,9 @@ function blog_init() {
register_action('blog/save', FALSE, "$action_path/save.php");
register_action('blog/auto_save_revision', FALSE, "$action_path/auto_save_revision.php");
register_action('blog/delete', FALSE, "$action_path/delete.php");
+
+ // ecml
+ register_plugin_hook('get_views', 'ecml', 'blog_ecml_views_hook');
}
/**
@@ -95,7 +98,7 @@ function blog_page_handler($page) {
// see if we're showing all or just a user's
if (isset($page[0]) && !empty($page[0])) {
$username = $page[0];
-
+
// push breadcrumb
elgg_push_breadcrumb(elgg_echo('blog:blogs'), "{$CONFIG->site->url}pg/blog");
@@ -192,4 +195,19 @@ function blog_page_setup() {
}
}
+/**
+ * Register blogs with ECML.
+ *
+ * @param unknown_type $hook
+ * @param unknown_type $entity_type
+ * @param unknown_type $return_value
+ * @param unknown_type $params
+ */
+function blog_ecml_views_hook($hook, $entity_type, $return_value, $params) {
+ $return_value['object/blog'] = elgg_echo('blog:blogs');
+
+ return $return_value;
+}
+
+
register_elgg_event_handler('init', 'system', 'blog_init');