diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-12-25 17:07:41 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-12-25 17:07:41 +0000 |
commit | 58bd19d7cf35e6159124716d0da48d91354d3a2f (patch) | |
tree | baf3133c13b2f5a38e7e16e182a208258069e4ef /mod/blog/views/default/widgets/blog | |
parent | f6045914d7488c43cd7761ddaded55b3791ae950 (diff) | |
download | elgg-58bd19d7cf35e6159124716d0da48d91354d3a2f.tar.gz elgg-58bd19d7cf35e6159124716d0da48d91354d3a2f.tar.bz2 |
amtrak does not have wifi so here is one big commit with group blogs, blog widget, and improved blog sidebar
git-svn-id: http://code.elgg.org/elgg/trunk@7720 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/blog/views/default/widgets/blog')
-rw-r--r-- | mod/blog/views/default/widgets/blog/content.php | 29 | ||||
-rw-r--r-- | mod/blog/views/default/widgets/blog/edit.php | 22 |
2 files changed, 51 insertions, 0 deletions
diff --git a/mod/blog/views/default/widgets/blog/content.php b/mod/blog/views/default/widgets/blog/content.php new file mode 100644 index 000000000..83d1c0c41 --- /dev/null +++ b/mod/blog/views/default/widgets/blog/content.php @@ -0,0 +1,29 @@ +<?php +/** + * User blog widget display view + */ + +$num = $vars['entity']->num_display; + +$options = array( + 'type' => 'object', + 'subtype' => 'blog', + 'container_guid' => $vars['entity']->owner_guid, + 'limit' => $num, + 'full_view' => FALSE, + 'pagination' => FALSE, +); +$content = elgg_list_entities($options); + +echo $content; + +if ($content) { + $blog_url = "pg/blog/owner/" . elgg_get_page_owner()->username; + $more_link = elgg_view('output/url', array( + 'href' => $blog_url, + 'text' => elgg_echo('blog:moreblogs'), + )); + echo "<span class=\"elgg-widget-more\">$more_link</span>"; +} else { + echo elgg_echo('blog:noblogs'); +} diff --git a/mod/blog/views/default/widgets/blog/edit.php b/mod/blog/views/default/widgets/blog/edit.php new file mode 100644 index 000000000..aaa9d1a10 --- /dev/null +++ b/mod/blog/views/default/widgets/blog/edit.php @@ -0,0 +1,22 @@ +<?php +/** + * User blog widget edit view + */ + +// set default value +if (!isset($vars['entity']->num_display)) { + $vars['entity']->num_display = 4; +} + +$params = array( + 'internalname' => 'params[num_display]', + 'value' => $vars['entity']->num_display = 4, + 'options' => array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), +); +$dropdown = elgg_view('input/pulldown', $params); + +?> +<p> + <?php echo elgg_echo('blog:numbertodisplay'); ?>: + <?php echo $dropdown; ?> +</p> |