diff options
Diffstat (limited to 'mod')
29 files changed, 179 insertions, 271 deletions
diff --git a/mod/blog/languages/en.php b/mod/blog/languages/en.php index b626085d7..460c407d9 100644 --- a/mod/blog/languages/en.php +++ b/mod/blog/languages/en.php @@ -53,8 +53,9 @@ $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', // widget 'blog:widget:description' => 'Display your latest blog posts', 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 diff --git a/mod/bookmarks/languages/en.php b/mod/bookmarks/languages/en.php index 42865f8cf..1d32a0344 100644 --- a/mod/bookmarks/languages/en.php +++ b/mod/bookmarks/languages/en.php @@ -35,10 +35,10 @@ $english = array( 'bookmarks:visit' => "Visit resource", 'bookmarks:recent' => "Recent bookmarks", - 'bookmarks:river:created' => 'bookmarked %s', + 'river:create:object:bookmarks' => '%s bookmarked %s', + 'river:comment:object:bookmarks' => '%s commented on a bookmark %s', 'bookmarks:river:annotate' => 'a comment on this bookmark', 'bookmarks:river:item' => 'an item', - 'river:commented:object:bookmarks' => 'a bookmark', 'item:object:bookmarks' => 'Bookmarks', diff --git a/mod/bookmarks/views/default/river/object/bookmarks/create.php b/mod/bookmarks/views/default/river/object/bookmarks/create.php index 743efdb22..984d109be 100644 --- a/mod/bookmarks/views/default/river/object/bookmarks/create.php +++ b/mod/bookmarks/views/default/river/object/bookmarks/create.php @@ -8,29 +8,8 @@ $object = $vars['item']->getObjectEntity(); $excerpt = elgg_get_excerpt($object->description); -$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)); -} - -$link = elgg_echo('bookmarks:river:created', array($link)); - -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, + 'attachments' => elgg_view('output/url', array('href' => $object->address)), +)); diff --git a/mod/dashboard/start.php b/mod/dashboard/start.php index 4fa048b3d..9de1ee4af 100644 --- a/mod/dashboard/start.php +++ b/mod/dashboard/start.php @@ -8,6 +8,8 @@ elgg_register_event_handler('init', 'system', 'dashboard_init'); function dashboard_init() { elgg_register_page_handler('dashboard', 'dashboard_page_handler'); + elgg_extend_view('css/elgg', 'dashboard/css'); + elgg_register_menu_item('topbar', array( 'name' => 'dashboard', 'href' => 'dashboard', diff --git a/mod/dashboard/views/default/dashboard/blurb.php b/mod/dashboard/views/default/dashboard/blurb.php index 202be1dc5..9293e513a 100644 --- a/mod/dashboard/views/default/dashboard/blurb.php +++ b/mod/dashboard/views/default/dashboard/blurb.php @@ -9,7 +9,7 @@ <?php echo elgg_view('output/longtext', array( 'id' => 'dashboard-info', - 'class' => 'elgg-inner elgg-border-plain pam mhs mbl mtn', + 'class' => 'elgg-inner pam mhs mtn', 'value' => elgg_echo("dashboard:nowidgets"), )); diff --git a/mod/dashboard/views/default/dashboard/css.php b/mod/dashboard/views/default/dashboard/css.php new file mode 100644 index 000000000..f49293293 --- /dev/null +++ b/mod/dashboard/views/default/dashboard/css.php @@ -0,0 +1,10 @@ +<?php +/** + * User dashboard CSS + */ +?> + +#dashboard-info { + border: 2px solid #dedede; + margin-bottom: 15px; +} diff --git a/mod/file/actions/file/upload.php b/mod/file/actions/file/upload.php index 5d5c28bee..c5fe763cb 100644 --- a/mod/file/actions/file/upload.php +++ b/mod/file/actions/file/upload.php @@ -106,9 +106,10 @@ if (isset($_FILES['upload']['name']) && !empty($_FILES['upload']['name'])) { $file->originalfilename = $_FILES['upload']['name']; $file->simpletype = file_get_simple_type($_FILES['upload']['type']); + // Open the file to guarantee the directory exists $file->open("write"); - $file->write(get_uploaded_file('upload')); $file->close(); + move_uploaded_file($_FILES['upload']['tmp_name'], $file->getFilenameOnFilestore()); $guid = $file->save(); diff --git a/mod/file/download.php b/mod/file/download.php index a386d490f..8e0287a1e 100644 --- a/mod/file/download.php +++ b/mod/file/download.php @@ -33,8 +33,7 @@ if (strpos($mime, "image/") !== false) { header("Content-Disposition: attachment; filename=\"$filename\""); } -$contents = $file->grabFile(); -$splitString = str_split($contents, 8192); -foreach ($splitString as $chunk) { - echo $chunk; -} +ob_clean(); +flush(); +readfile($file->getFilenameOnFilestore()); +exit; diff --git a/mod/file/languages/en.php b/mod/file/languages/en.php index 7ced3f112..1db32afcb 100644 --- a/mod/file/languages/en.php +++ b/mod/file/languages/en.php @@ -73,8 +73,8 @@ $english = array( 'file:display:number' => "Number of files to display", - 'file:river:create' => 'uploaded the file', - 'river:commented:object:file' => 'the file', + 'river:create:object:file' => '%s uploaded the file %s', + 'river:comment:object:file' => '%s commented on the file %s', 'item:object:file' => 'Files', diff --git a/mod/file/views/default/river/object/file/create.php b/mod/file/views/default/river/object/file/create.php index 620d1d18c..dad629120 100644 --- a/mod/file/views/default/river/object/file/create.php +++ b/mod/file/views/default/river/object/file/create.php @@ -7,29 +7,7 @@ $object = $vars['item']->getObjectEntity(); $excerpt = strip_tags($object->description); $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('file: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 diff --git a/mod/groups/actions/groups/membership/remove.php b/mod/groups/actions/groups/membership/remove.php new file mode 100644 index 000000000..650d35286 --- /dev/null +++ b/mod/groups/actions/groups/membership/remove.php @@ -0,0 +1,31 @@ +<?php +/** + * Remove a user from a group + * + * @package ElggGroups + */ + +$user_guid = get_input('user_guid'); +$group_guid = get_input('group_guid'); + +$user = get_entity($user_guid); +$group = get_entity($group_guid); + +elgg_set_page_owner_guid($group->guid); + +if (($user instanceof ElggUser) && ($group instanceof ElggGroup) && $group->canEdit()) { + // Don't allow removing group owner + if ($group->getOwnerGUID() != $user->getGUID()) { + if ($group->leave($user)) { + system_message(elgg_echo("groups:removed", array($user->name))); + } else { + register_error(elgg_echo("groups:cantremove")); + } + } else { + register_error(elgg_echo("groups:cantremove")); + } +} else { + register_error(elgg_echo("groups:cantremove")); +} + +forward(REFERER); diff --git a/mod/groups/languages/en.php b/mod/groups/languages/en.php index 63a6df3a9..9f8bed9a4 100644 --- a/mod/groups/languages/en.php +++ b/mod/groups/languages/en.php @@ -166,6 +166,9 @@ $english = array( 'groups:notitle' => 'Groups must have a title', 'groups:cantjoin' => 'Can not join group', 'groups:cantleave' => 'Could not leave group', + 'groups:removeuser' => 'Remove from group', + 'groups:cantremove' => 'Cannot remove user from group', + 'groups:removed' => 'Successfully removed %s from group', 'groups:addedtogroup' => 'Successfully added the user to the group', 'groups:joinrequestnotmade' => 'Could not request to join group', 'groups:joinrequestmade' => 'Requested to join group', @@ -210,10 +213,10 @@ or click below to view the group's join requests: Forum river items */ - 'groups:river:create' => 'created the group', - 'groups:river:join' => 'joined the group', - 'forumtopic:river:create' => 'added a new discussion topic', - 'groups:river:reply' => 'replied on the discussion topic', + 'river:create:group:default' => '%s created the group %s', + 'river:join:group:default' => '%s joined the group %s', + 'river:create:object:groupforumtopic' => '%s added a new discussion topic %s', + 'river:reply:object:groupforumtopic' => '%s replied on the discussion topic %s', 'groups:nowidgets' => 'No widgets have been defined for this group.', diff --git a/mod/groups/start.php b/mod/groups/start.php index 73bdd08a9..066b309a5 100644 --- a/mod/groups/start.php +++ b/mod/groups/start.php @@ -44,6 +44,7 @@ function groups_init() { elgg_register_action("groups/invite", "$action_base/invite.php"); elgg_register_action("groups/join", "$action_base/join.php"); elgg_register_action("groups/leave", "$action_base/leave.php"); + elgg_register_action("groups/remove", "$action_base/remove.php"); elgg_register_action("groups/killrequest", "$action_base/delete_request.php"); elgg_register_action("groups/killinvitation", "$action_base/delete_invite.php"); elgg_register_action("groups/addtogroup", "$action_base/add.php"); @@ -60,6 +61,9 @@ function groups_init() { // group entity menu elgg_register_plugin_hook_handler('register', 'menu:entity', 'groups_entity_menu_setup'); + + // group user hover menu + elgg_register_plugin_hook_handler('register', 'menu:user_hover', 'groups_user_entity_menu_setup'); //extend some views elgg_extend_view('css/elgg', 'groups/css'); @@ -367,6 +371,44 @@ function groups_entity_menu_setup($hook, $type, $return, $params) { } /** + * Add a remove user link to user hover menu when the page owner is a group + */ +function groups_user_entity_menu_setup($hook, $type, $return, $params) { + if (elgg_is_logged_in()) { + $group = elgg_get_page_owner_entity(); + + // Check for valid group + if (!elgg_instanceof($group, 'group')) { + return $return; + } + + $entity = $params['entity']; + + // Make sure we have a user and that user is a member of the group + if (!elgg_instanceof($entity, 'user') || !$group->isMember($entity)) { + return $return; + } + + // Add remove link if we can edit the group, and if we're not trying to remove the group owner + if ($group->canEdit() && $group->getOwnerGUID() != $entity->guid) { + $remove = elgg_view('output/confirmlink', array( + 'href' => "action/groups/remove?user_guid={$entity->guid}&group_guid={$group->guid}", + 'text' => elgg_echo('groups:removeuser'), + )); + + $options = array( + 'name' => 'removeuser', + 'text' => $remove, + 'priority' => 999, + ); + $return[] = ElggMenuItem::factory($options); + } + } + + return $return; +} + +/** * Groups created so create an access list for it */ function groups_create_event_listener($event, $object_type, $object) { @@ -621,7 +663,8 @@ function discussion_init() { // commenting not allowed on discussion topics (use a different annotation) elgg_register_plugin_hook_handler('permissions_check:comment', 'object', 'discussion_comment_override'); - + elgg_extend_view('river/elements/responses', 'discussion/river'); + $action_base = elgg_get_plugins_path() . 'groups/actions/discussion'; elgg_register_action('discussion/save', "$action_base/save.php"); elgg_register_action('discussion/delete', "$action_base/delete.php"); diff --git a/mod/groups/views/default/river/annotation/group_topic_post/reply.php b/mod/groups/views/default/river/annotation/group_topic_post/reply.php index 1999c8dd9..cc94fbd43 100644 --- a/mod/groups/views/default/river/annotation/group_topic_post/reply.php +++ b/mod/groups/views/default/river/annotation/group_topic_post/reply.php @@ -4,24 +4,9 @@ */ $object = $vars['item']->getObjectEntity(); $reply = $vars['item']->getAnnotation(); +$excerpt = elgg_get_excerpt($reply->value); -$url = $object->getURL(); -$title = $object->title; -$params = array( - 'href' => $object->getURL(), - 'text' => $title, -); -$object_link = elgg_view('output/url', $params); - -$type = $object->getType(); -$subtype = $object->getSubtype(); - -echo elgg_echo('groups:river:reply') . ' '; -echo $object_link; - -if ($reply) { - $excerpt = elgg_get_excerpt($reply->value); - 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 diff --git a/mod/groups/views/default/river/group/create.php b/mod/groups/views/default/river/group/create.php index a70f8b51d..cacb5ad3f 100644 --- a/mod/groups/views/default/river/group/create.php +++ b/mod/groups/views/default/river/group/create.php @@ -7,19 +7,7 @@ $object = $vars['item']->getObjectEntity(); $excerpt = strip_tags($object->description); $excerpt = elgg_get_excerpt($excerpt); -$params = array( - 'href' => $object->getURL(), - 'text' => $object->name, -); -$link = elgg_view('output/url', $params); - - -echo elgg_echo('groups:river:create'); - -echo " $link"; - -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 diff --git a/mod/groups/views/default/river/object/groupforumtopic/create.php b/mod/groups/views/default/river/object/groupforumtopic/create.php index 466196921..80e7b09aa 100644 --- a/mod/groups/views/default/river/object/groupforumtopic/create.php +++ b/mod/groups/views/default/river/object/groupforumtopic/create.php @@ -7,36 +7,16 @@ $object = $vars['item']->getObjectEntity(); $excerpt = strip_tags($object->description); $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('forumtopic:river:create'); - -echo " $link $group_string"; - -if ($excerpt) { - echo '<div class="elgg-river-content">'; - echo $excerpt; - echo '</div>'; -} - -if (elgg_is_logged_in() && $container->canWriteToContainer()) { +$responses = ''; +if (elgg_is_logged_in() && $object->canAnnotate(0, 'group_topic_post')) { // inline comment form $form_vars = array('id' => "groups-reply-{$object->getGUID()}", 'class' => 'hidden'); $body_vars = array('entity' => $object, 'inline' => true); - echo elgg_view_form('discussion/reply/save', $form_vars, $body_vars); + $responses = elgg_view_form('discussion/reply/save', $form_vars, $body_vars); } + +echo elgg_view('river/item', array( + 'item' => $vars['item'], + 'message' => $excerpt, + 'responses' => $responses, +)); diff --git a/mod/groups/views/default/river/relationship/member/create.php b/mod/groups/views/default/river/relationship/member/create.php index 060826649..d1c4c3ed3 100644 --- a/mod/groups/views/default/river/relationship/member/create.php +++ b/mod/groups/views/default/river/relationship/member/create.php @@ -3,14 +3,6 @@ * Group join river view. */ -$object = $vars['item']->getObjectEntity(); - -$params = array( - 'href' => $object->getURL(), - 'text' => $object->name, -); -$link = elgg_view('output/url', $params); - -echo elgg_echo('groups:river:join'); - -echo " $link"; +echo elgg_view('river/item', array( + 'item' => $vars['item'], +)); diff --git a/mod/likes/views/default/river/annotation/likes/create.php b/mod/likes/views/default/river/annotation/likes/create.php index 463fe5049..0160bcc0b 100644 --- a/mod/likes/views/default/river/annotation/likes/create.php +++ b/mod/likes/views/default/river/annotation/likes/create.php @@ -5,22 +5,6 @@ * @todo not finished */ -$object = $vars['item']->getObjectEntity(); -$comment = $vars['item']->getAnnotation(); - -$url = $object->getURL(); -$title = $object->title; -if (!$title) { - $title = elgg_echo('untitled'); -} -$params = array( - 'href' => $object->getURL(), - 'text' => $title, -); -$object_link = elgg_view('output/url', $params); - -$type = $object->getType(); -$subtype = $object->getSubtype(); - -$type_string = elgg_echo("river:commented:$type:$subtype"); -echo elgg_echo('river:likes', array($type_string, $object_link)); +echo elgg_view('river/item', array( + 'item' => $vars['item'], +)); diff --git a/mod/members/pages/members/search.php b/mod/members/pages/members/search.php index 39b54990e..94127768a 100644 --- a/mod/members/pages/members/search.php +++ b/mod/members/pages/members/search.php @@ -19,16 +19,16 @@ if ($vars['search_type'] == 'tag') { $users = $results['entities']; $content = elgg_view_entity_list($users, $count, $offset, $limit, false, false, true); } else { - $name = get_input('name'); + $name = sanitize_string(get_input('name')); $title = elgg_echo('members:title:searchname', array($name)); - global $CONFIG; + $db_prefix = elgg_get_config('dbprefix'); $params = array( 'type' => 'user', 'full_view' => false, - 'joins' => array("join {$CONFIG->dbprefix}users_entity u on e.guid=u.guid"), - 'wheres' => array("(u.name like \"%{$name}%\" or u.username like \"%{$name}%\")"), + 'joins' => array("JOIN {$db_prefix}users_entity u ON e.guid=u.guid"), + 'wheres' => array("(u.name LIKE \"%{$name}%\" OR u.username LIKE \"%{$name}%\")"), ); $content .= elgg_list_entities($params); } diff --git a/mod/messageboard/languages/en.php b/mod/messageboard/languages/en.php index d8ccbdeee..9027eb650 100644 --- a/mod/messageboard/languages/en.php +++ b/mod/messageboard/languages/en.php @@ -26,10 +26,7 @@ $english = array( /** * Message board widget river */ - 'messageboard:river:added' => "posted on", - 'messageboard:river:user' => "%s's", - 'messageboard:river:messageboard' => "message board", - + 'river:messageboard:user:default' => "%s posted on %s's message board", /** * Status messages diff --git a/mod/messageboard/views/default/river/object/messageboard/create.php b/mod/messageboard/views/default/river/object/messageboard/create.php index 0268930bf..975598805 100644 --- a/mod/messageboard/views/default/river/object/messageboard/create.php +++ b/mod/messageboard/views/default/river/object/messageboard/create.php @@ -3,22 +3,9 @@ * Messageboard river view */ -$performed_by = $vars['item']->getSubjectEntity(); -$performed_on = $vars['item']->getObjectEntity(); +$messageboard = $vars['item']->getAnnotation(); -$comment = $vars['item']->getAnnotation(); - -$link = elgg_view('output/url', array( - 'href' => $performed_on->getURL(), - 'text' => elgg_echo('messageboard:river:user', array($performed_on->name)), +echo elgg_view('river/item', array( + 'item' => $vars['item'], + 'message' => $messageboard->value, )); - -echo elgg_echo("messageboard:river:added"); -echo " $link "; -echo elgg_echo("messageboard:river:messageboard"); - -if ($comment) { - echo '<div class="elgg-river-content">'; - echo elgg_get_excerpt($comment->value); - echo '</div>'; -} diff --git a/mod/pages/languages/en.php b/mod/pages/languages/en.php index f590afb9c..1c6d0318c 100644 --- a/mod/pages/languages/en.php +++ b/mod/pages/languages/en.php @@ -38,13 +38,12 @@ $english = array( * River **/ - 'pages:river:create' => 'created the page', - 'pages:river:created' => "%s wrote", - 'pages:river:updated' => "%s updated", - 'pages:river:posted' => "%s posted", - 'pages:river:update' => "a page titled", - 'river:commented:object:page' => 'the page', - 'river:commented:object:page_top' => 'the page', + 'river:create:object:page' => '%s created a page %s', + 'river:create:object:page_top' => '%s created a page %s', + 'river:update:object:page' => '%s updated a page %s', + 'river:update:object:page_top' => '%s updated a page %s', + 'river:comment:object:page' => '%s commented on a page titled %s', + 'river:comment:object:page_top' => '%s commented on a page titled %s', /** * Form fields diff --git a/mod/pages/views/default/river/object/page/create.php b/mod/pages/views/default/river/object/page/create.php index 032046063..ca15ddea7 100644 --- a/mod/pages/views/default/river/object/page/create.php +++ b/mod/pages/views/default/river/object/page/create.php @@ -7,29 +7,7 @@ $object = $vars['item']->getObjectEntity(); $excerpt = strip_tags($object->description); $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('pages: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 diff --git a/mod/thewire/languages/en.php b/mod/thewire/languages/en.php index 1b9d71c56..e2dd5fdac 100644 --- a/mod/thewire/languages/en.php +++ b/mod/thewire/languages/en.php @@ -13,7 +13,7 @@ $english = array( 'thewire:user' => "%s's wire posts", 'thewire:friends' => "Friends' wire posts", 'thewire:reply' => "Reply", - 'thewire:replying' => "Replying to %s who wrote", + 'thewire:replying' => "Replying to %s (@%s) who wrote", 'thewire:thread' => "Thread", 'thewire:charleft' => "characters remaining", 'thewire:tags' => "Wire posts tagged with '%s'", @@ -29,7 +29,7 @@ $english = array( /** * The wire river */ - 'thewire:river:create' => "posted to the wire", + 'river:create:object:thewire' => "%s posted to the wire", /** * Wire widget diff --git a/mod/thewire/views/default/js/thewire.php b/mod/thewire/views/default/js/thewire.php index 1eda90bee..d9bf6d10e 100644 --- a/mod/thewire/views/default/js/thewire.php +++ b/mod/thewire/views/default/js/thewire.php @@ -30,7 +30,7 @@ elgg.thewire.init = function() { */ elgg.thewire.textCounter = function(textarea, status, limit) { - var remaining_chars = limit - textarea.value.length; + var remaining_chars = limit - $(textarea).val().length; status.html(remaining_chars); if (remaining_chars < 0) { @@ -83,4 +83,4 @@ elgg.thewire.viewPrevious = function(event) { event.preventDefault(); } -elgg.register_hook_handler('init', 'system', elgg.thewire.init);
\ No newline at end of file +elgg.register_hook_handler('init', 'system', elgg.thewire.init); diff --git a/mod/thewire/views/default/river/object/thewire/create.php b/mod/thewire/views/default/river/object/thewire/create.php index d4dac38ee..2e9cfd83b 100644 --- a/mod/thewire/views/default/river/object/thewire/create.php +++ b/mod/thewire/views/default/river/object/thewire/create.php @@ -7,18 +7,8 @@ $object = $vars['item']->getObjectEntity(); $excerpt = strip_tags($object->description); $excerpt = thewire_filter($excerpt); -$params = array( - 'href' => $object->getURL(), - 'text' => $object->title, -); -$link = elgg_view('output/url', $params); - -echo elgg_echo('thewire:river:create'); - -echo " $link"; - -if ($excerpt) { - echo '<div class="elgg-river-content">'; - echo $excerpt; - echo '</div>'; -} +echo elgg_view('river/item', array( + 'item' => $vars['item'], + 'message' => $excerpt, + 'summary' => false, +));
\ No newline at end of file diff --git a/mod/thewire/views/default/thewire/reply.php b/mod/thewire/views/default/thewire/reply.php index 3794e1454..341b691b1 100644 --- a/mod/thewire/views/default/thewire/reply.php +++ b/mod/thewire/views/default/thewire/reply.php @@ -5,7 +5,10 @@ $post = $vars['post']; $poster = $post->getOwnerEntity(); - +$poster_details = array( + htmlspecialchars($poster->name, ENT_QUOTES, 'UTF-8'), + htmlspecialchars($poster->username, ENT_QUOTES, 'UTF-8'), +); ?> -<b><?php echo elgg_echo('thewire:replying', array($poster->name)); ?>: </b> +<b><?php echo elgg_echo('thewire:replying', $poster_details); ?>: </b> <?php echo $post->description;
\ No newline at end of file diff --git a/mod/twitter/views/default/twitter/css.php b/mod/twitter/views/default/twitter/css.php index cb58e8fb1..eb0cda98a 100644 --- a/mod/twitter/views/default/twitter/css.php +++ b/mod/twitter/views/default/twitter/css.php @@ -54,7 +54,7 @@ p.twitter_username .input-text { padding:2px; margin:0 0 5px 0; } -#twitter_widget li a { +#twitter_widget li > a { display:block; margin:0 0 0 4px; } |