diff options
author | Brett Profitt <brett.profitt@gmail.com> | 2011-08-25 10:00:38 -0700 |
---|---|---|
committer | Brett Profitt <brett.profitt@gmail.com> | 2011-08-25 10:00:38 -0700 |
commit | dccc333c765bb28da55b4a55d9c916acdb88413a (patch) | |
tree | bdd26a0b4cd85241a19b7fcb2c0770f0ac3eb9f0 /mod/blog | |
parent | ec7b94a64aef23b85866ecdac8e8acc712d29bb6 (diff) | |
parent | 003cb81c7888f4d2fd763e5814027c6f8d71186f (diff) | |
download | elgg-dccc333c765bb28da55b4a55d9c916acdb88413a.tar.gz elgg-dccc333c765bb28da55b4a55d9c916acdb88413a.tar.bz2 |
Merge branch 'master' of github.com:brettp/Elgg
Diffstat (limited to 'mod/blog')
-rw-r--r-- | mod/blog/languages/en.php | 13 | ||||
-rw-r--r-- | mod/blog/lib/blog.php | 11 | ||||
-rw-r--r-- | mod/blog/views/default/blog/group_module.php | 22 | ||||
-rw-r--r-- | mod/blog/views/default/forms/blog/save.php | 7 | ||||
-rw-r--r-- | mod/blog/views/default/object/blog.php | 2 | ||||
-rw-r--r-- | mod/blog/views/default/river/object/blog/create.php | 30 |
6 files changed, 36 insertions, 49 deletions
diff --git a/mod/blog/languages/en.php b/mod/blog/languages/en.php index b626085d7..8a21c1f8d 100644 --- a/mod/blog/languages/en.php +++ b/mod/blog/languages/en.php @@ -12,9 +12,9 @@ $english = array( 'blog:blog' => 'Blog', 'item:object:blog' => 'Blogs', - 'blog:title:user_blogs' => '%s\'s Blogs', - 'blog:title:all_blogs' => 'All Site Blogs', - 'blog:title:friends' => 'Friends\' Blogs', + 'blog:title:user_blogs' => '%s\'s blogs', + 'blog:title:all_blogs' => 'All site blogs', + 'blog:title:friends' => 'Friends\' blogs', 'blog:group' => 'Group blog', 'blog:enableblog' => 'Enable group blog', @@ -53,8 +53,11 @@ $english = array( 'blog:error:revision_not_found' => 'Cannot find this revision.', // river - 'blog:river:create' => 'published a blog post', - 'river:commented:object:blog' => 'the blog', + 'river:create:object:blog' => '%s published a blog post %s', + 'river:comment:object:blog' => '%s commented on the blog %s', + + // notifications + 'blog:newpost' => 'A new blog post', // widget 'blog:widget:description' => 'Display your latest blog posts', diff --git a/mod/blog/lib/blog.php b/mod/blog/lib/blog.php index 8964d5b53..b7b1a2baa 100644 --- a/mod/blog/lib/blog.php +++ b/mod/blog/lib/blog.php @@ -38,7 +38,7 @@ function blog_get_page_content_read($guid = NULL) { } elgg_push_breadcrumb($blog->title); - $return['content'] = elgg_view_entity($blog, TRUE); + $return['content'] = elgg_view_entity($blog, array('full_view' => true)); //check to see if comment are on if ($blog->comments_on != 'Off') { $return['content'] .= elgg_view_comments($blog); @@ -88,8 +88,12 @@ function blog_get_page_content_list($container_guid = NULL) { } else { $return['filter_context'] = 'all'; $return['title'] = elgg_echo('blog:title:all_blogs'); + elgg_pop_breadcrumb(); + elgg_push_breadcrumb(elgg_echo('blog:blogs')); } + elgg_register_title_button(); + // show all posts for admin or users looking at their own blogs // show only published posts for other users. if (!(elgg_is_admin_logged_in() || (elgg_is_logged_in() && $container_guid == $loggedin_userid))) { @@ -127,6 +131,8 @@ function blog_get_page_content_friends($user_guid) { elgg_push_breadcrumb($crumbs_title, "blog/owner/{$user->username}"); elgg_push_breadcrumb(elgg_echo('friends')); + elgg_register_title_button(); + if (!$friends = get_user_friends($user_guid, ELGG_ENTITIES_ANY_VALUE, 0)) { $return['content'] .= elgg_echo('friends:none:you'); return $return; @@ -233,7 +239,6 @@ function blog_get_page_content_archive($owner_guid, $lower = 0, $upper = 0) { return array( 'content' => $content, 'title' => $title, - 'buttons' => '', 'filter' => '', ); } @@ -251,13 +256,13 @@ function blog_get_page_content_edit($page, $guid = 0, $revision = NULL) { elgg_load_js('elgg.blog'); $return = array( - 'buttons' => '', 'filter' => '', ); $vars = array(); $vars['id'] = 'blog-post-edit'; $vars['name'] = 'blog_post'; + $vars['class'] = 'elgg-form-alt'; if ($page == 'edit') { $blog = get_entity((int)$guid); diff --git a/mod/blog/views/default/blog/group_module.php b/mod/blog/views/default/blog/group_module.php index 6cfe6c98e..d769fbd59 100644 --- a/mod/blog/views/default/blog/group_module.php +++ b/mod/blog/views/default/blog/group_module.php @@ -14,10 +14,6 @@ $all_link = elgg_view('output/url', array( 'text' => elgg_echo('link:view:all'), )); -$header = "<span class=\"groups-widget-viewall\">$all_link</span>"; -$header .= '<h3>' . elgg_echo('blog:group') . '</h3>'; - - elgg_push_context('widgets'); $options = array( 'type' => 'object', @@ -34,12 +30,14 @@ if (!$content) { $content = '<p>' . elgg_echo('blog:none') . '</p>'; } -if ($group->canWriteToContainer()) { - $new_link = elgg_view('output/url', array( - 'href' => "blog/add/$group->guid", - 'text' => elgg_echo('blog:write'), - )); - $content .= "<span class='elgg-widget-more'>$new_link</span>"; -} +$new_link = elgg_view('output/url', array( + 'href' => "blog/add/$group->guid", + 'text' => elgg_echo('blog:write'), +)); -echo elgg_view_module('info', '', $content, array('header' => $header)); +echo elgg_view('groups/profile/module', array( + 'title' => elgg_echo('blog:group'), + 'content' => $content, + 'all_link' => $all_link, + 'add_link' => $new_link, +)); diff --git a/mod/blog/views/default/forms/blog/save.php b/mod/blog/views/default/forms/blog/save.php index d99f45f01..8246fdec3 100644 --- a/mod/blog/views/default/forms/blog/save.php +++ b/mod/blog/views/default/forms/blog/save.php @@ -6,6 +6,7 @@ */ $blog = get_entity($vars['guid']); +$vars['entity'] = $blog; $draft_warning = $vars['draft_warning']; if ($draft_warning) { @@ -133,6 +134,8 @@ $body_input $tags_input </div> +$categories_input + <div> <label for="blog_comments_on">$comments_label</label> $comments_input @@ -148,9 +151,7 @@ $body_input $status_input </div> -$categories_input - -<div class="elgg-form-footer-alt"> +<div class="elgg-foot"> <div class="elgg-subtext mbm"> $save_status <span class="blog-save-status-time">$saved</span> </div> diff --git a/mod/blog/views/default/object/blog.php b/mod/blog/views/default/object/blog.php index 8456829fe..ba08180b1 100644 --- a/mod/blog/views/default/object/blog.php +++ b/mod/blog/views/default/object/blog.php @@ -74,6 +74,7 @@ if ($full) { 'subtitle' => $subtitle, 'tags' => $tags, ); + $params = $params + $vars; $list_body = elgg_view('object/elements/summary', $params); $blog_info = elgg_view_image_block($owner_icon, $list_body); @@ -94,6 +95,7 @@ HTML; 'tags' => $tags, 'content' => $excerpt, ); + $params = $params + $vars; $list_body = elgg_view('object/elements/summary', $params); echo elgg_view_image_block($owner_icon, $list_body); diff --git a/mod/blog/views/default/river/object/blog/create.php b/mod/blog/views/default/river/object/blog/create.php index bd2405d42..613cbb165 100644 --- a/mod/blog/views/default/river/object/blog/create.php +++ b/mod/blog/views/default/river/object/blog/create.php @@ -7,29 +7,7 @@ $object = $vars['item']->getObjectEntity(); $excerpt = strip_tags($object->excerpt); $excerpt = elgg_get_excerpt($excerpt); -$params = array( - 'href' => $object->getURL(), - 'text' => $object->title, -); -$link = elgg_view('output/url', $params); - -$group_string = ''; -$container = $object->getContainerEntity(); -if ($container instanceof ElggGroup) { - $params = array( - 'href' => $container->getURL(), - 'text' => $container->name, - ); - $group_link = elgg_view('output/url', $params); - $group_string = elgg_echo('river:ingroup', array($group_link)); -} - -echo elgg_echo('blog:river:create'); - -echo " $link $group_string"; - -if ($excerpt) { - echo '<div class="elgg-river-content">'; - echo $excerpt; - echo '</div>'; -} +echo elgg_view('river/item', array( + 'item' => $vars['item'], + 'message' => $excerpt, +));
\ No newline at end of file |