From b3e6ac6960e56001d80243f694fe2109211a5fce Mon Sep 17 00:00:00 2001 From: brettp Date: Tue, 23 Mar 2010 19:25:14 +0000 Subject: Added an ElggBlog class to override the time_created field. Added extra language files. git-svn-id: http://code.elgg.org/elgg/trunk@5486 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/blog/start.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'mod/blog/start.php') diff --git a/mod/blog/start.php b/mod/blog/start.php index 0015efcf1..d0c4c5157 100644 --- a/mod/blog/start.php +++ b/mod/blog/start.php @@ -29,7 +29,10 @@ function blog_init() { global $CONFIG; require_once dirname(__FILE__) . '/blog_lib.php'; - add_menu(elgg_echo('blog'), "{$CONFIG->wwwroot}pg/blog/", array()); + add_menu(elgg_echo('blog:blogs'), "{$CONFIG->wwwroot}pg/blog/", array()); + + // run the setup upon activations or to upgrade old installations. + run_function_once('blog_runonce', '1269370108'); elgg_extend_view('css', 'blog/css'); @@ -59,6 +62,15 @@ function blog_init() { register_action('blog/delete', FALSE, "$action_path/delete.php"); } +/** + * Register entity class for object:blog -> ElggBlog + */ +function blog_runonce() { + if (!update_subtype('object', 'blog', 'ElggBlog')) { + add_subtype('object', 'blog', 'ElggBlog'); + } +} + /** * Dispatches blog pages. * To maintain URL backward compatibility, expects old-style URLs like: @@ -176,7 +188,7 @@ function blog_page_setup() { if ($page_owner instanceof ElggGroup && get_context() == 'groups') { if($page_owner->blog_enable != "no") { $url = "{$CONFIG->wwwroot}pg/blog/{$page_owner->username}/items"; - add_submenu_item(elgg_echo("blog:groups:group_blogs"), $url); + add_submenu_item(elgg_echo('blog:groups:group_blogs'), $url); } } } -- cgit v1.2.3