diff options
-rw-r--r-- | _graphics/elgg_sprites.png | bin | 12268 -> 12618 bytes | |||
-rw-r--r-- | engine/lib/upgrades/2010121601.php | 9 | ||||
-rw-r--r-- | languages/en.php | 2 | ||||
-rw-r--r-- | mod/riverdashboard/views/default/river/relationship/friend/create.php | 36 | ||||
-rw-r--r-- | version.php | 2 | ||||
-rw-r--r-- | views/default/core/river/controls.php | 3 | ||||
-rw-r--r-- | views/default/css/elements/skin.php | 5 | ||||
-rw-r--r-- | views/default/css/screen.php | 3 | ||||
-rw-r--r-- | views/default/friends/river/create.php | 20 | ||||
-rw-r--r-- | views/default/river/item/list.php | 52 | ||||
-rw-r--r-- | views/default/river/item/wrapper.php | 61 | ||||
-rw-r--r-- | views/default/river/relationship/friend/create.php | 18 |
12 files changed, 39 insertions, 172 deletions
diff --git a/_graphics/elgg_sprites.png b/_graphics/elgg_sprites.png Binary files differindex 31606034b..7479cd669 100644 --- a/_graphics/elgg_sprites.png +++ b/_graphics/elgg_sprites.png diff --git a/engine/lib/upgrades/2010121601.php b/engine/lib/upgrades/2010121601.php new file mode 100644 index 000000000..ad7d26adb --- /dev/null +++ b/engine/lib/upgrades/2010121601.php @@ -0,0 +1,9 @@ +<?php +/** + * Create friends river view has been changed + */ + +$query = "UPDATE {$CONFIG->dbprefix}river + SET view='river/relationship/friend/create', action_type='create' + WHERE view='friends/river/create' AND action_type='friend'"; +update_data($query); diff --git a/languages/en.php b/languages/en.php index 34c141a5b..f30f8ffd7 100644 --- a/languages/en.php +++ b/languages/en.php @@ -360,7 +360,7 @@ $english = array( 'friends:collections:members' => "Collection members", 'friends:collections:edit' => "Edit collection", - 'friends:river:add' => "%s is now a friend with", + 'friends:river:add' => "is now a friend with %s", 'friendspicker:chararray' => 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', diff --git a/mod/riverdashboard/views/default/river/relationship/friend/create.php b/mod/riverdashboard/views/default/river/relationship/friend/create.php deleted file mode 100644 index 916efd407..000000000 --- a/mod/riverdashboard/views/default/river/relationship/friend/create.php +++ /dev/null @@ -1,36 +0,0 @@ -<?php -/** - * Elgg relationship create event. - * Display something in the river when a relationship is created. - */ - -$statement = $vars['statement']; - -$performed_by = $statement->getSubject(); -$event = $statement->getEvent(); -$object = $statement->getObject(); - -if (is_array($object)) { - switch ($object['relationship']) { - // Friending - case 'friend' : - case 'friends' : // 'friends' shouldn't be used, but just incase :) - - // Get second object - $userb = $object['object']; - - // Only users can be friends - if (($performed_by instanceof ElggUser) && ($userb instanceof ElggUser)) { - // User A - echo "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a> "; - - // Verb - echo elgg_echo('river:relationship:friend'); - - // user B - echo " <a href=\"{$userb->getURL()}\">{$userb->name}</a>"; - } - - break; - } -}
\ No newline at end of file diff --git a/version.php b/version.php index d2c27318c..5b6a77f0a 100644 --- a/version.php +++ b/version.php @@ -11,7 +11,7 @@ // YYYYMMDD = Elgg Date // XX = Interim incrementer -$version = 2010121401; +$version = 2010121601; // Human-friendly version name $release = '1.8-svn'; diff --git a/views/default/core/river/controls.php b/views/default/core/river/controls.php index 4ab087458..e239a2adb 100644 --- a/views/default/core/river/controls.php +++ b/views/default/core/river/controls.php @@ -9,7 +9,8 @@ $object = $vars['item']->getObjectEntity(); if (isloggedin()) { - if ($vars['item']->annotation_id == 0) { + // comments and non-objects cannot be commented on + if ($object->getType() == 'object' && $vars['item']->annotation_id == 0) { $params = array( 'href' => '#', 'text' => elgg_echo('generic_comments:text'), diff --git a/views/default/css/elements/skin.php b/views/default/css/elements/skin.php index 9e5fbe9ff..693e6e56e 100644 --- a/views/default/css/elements/skin.php +++ b/views/default/css/elements/skin.php @@ -201,6 +201,11 @@ a.selected { .elgg-icon-arrow-s:hover { background-position: -146px -76px; } +.elgg-icon-following { + background-position: -35px -100px; + width: 22px; + height: 20px; +} .ajax-loader { background-color: white; diff --git a/views/default/css/screen.php b/views/default/css/screen.php index f74823373..6b576f7d3 100644 --- a/views/default/css/screen.php +++ b/views/default/css/screen.php @@ -253,6 +253,9 @@ a.widget-edit-button:hover, a.widget-delete-button:hover { margin: 8px 0 5px 0; padding-left: 5px; } +.elgg-river-excerpt .usericon { + float: left; +} .elgg-river-layout .input-pulldown { float: right; margin: 10px 0; diff --git a/views/default/friends/river/create.php b/views/default/friends/river/create.php deleted file mode 100644 index d7a751945..000000000 --- a/views/default/friends/river/create.php +++ /dev/null @@ -1,20 +0,0 @@ -<?php -/** - * Elgg create new friend river item - * - * @package Elgg - * - * @uses $vars['entity'] - */ -$performed_by = get_entity($vars['item']->subject_guid); -$performed_on = get_entity($vars['item']->object_guid); - -$url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>"; -$string = elgg_echo("friends:river:add", array($url)) . " "; -$string .= "<a href=\"{$performed_on->getURL()}\">{$performed_on->name}</a>"; -$string .= "<div class=\"river_content_display\">"; -$string .= "<table><tr><td>" . elgg_view("profile/icon",array('entity' => $performed_by, 'size' => 'tiny')) . "</td>"; -$string .= "<td><div class=\"following_icon\"></div></td><td>" . elgg_view("profile/icon",array('entity' => $performed_on, 'size' => 'tiny')) . "</td></tr></table>"; -$string .= "</div>"; - -echo $string; diff --git a/views/default/river/item/list.php b/views/default/river/item/list.php deleted file mode 100644 index d791c74e8..000000000 --- a/views/default/river/item/list.php +++ /dev/null @@ -1,52 +0,0 @@ -<?php -/** - * - * @package Elgg - * @subpackage Core - * - */ -?> -<div class="river_item_list"> -<?php - if (isset($vars['items']) && is_array($vars['items'])) { - - $i = 0; - if (!empty($vars['items'])) { - foreach($vars['items'] as $item) { - echo elgg_view_river_item($item); - $i++; - if ($i >= $vars['limit']) { - break; - } - } - } - } - - if ($vars['pagination'] !== false) { - $baseurl = $_SERVER['REQUEST_URI']; - - $nav = ''; - - if (sizeof($vars['items']) > $vars['limit']) { - $newoffset = $vars['offset'] + $vars['limit']; - $nexturl = elgg_http_add_url_query_elements($baseurl, array('offset' => $newoffset)); - - $nav .= '<a class="back" href="'.$nexturl.'">« ' . elgg_echo('previous') . '</a> '; - } - - if ($vars['offset'] > 0) { - $newoffset = $vars['offset'] - $vars['limit']; - if ($newoffset < 0) { - $newoffset = 0; - } - $prevurl = elgg_http_add_url_query_elements($baseurl, array('offset' => $newoffset)); - - $nav .= '<a class="forward" href="'.$prevurl.'">' . elgg_echo('next') . ' »</a> '; - } - - if (!empty($nav)) { - echo '<div class="river_pagination"><p>'.$nav.'</p></div>'; - } - } -?> -</div>
\ No newline at end of file diff --git a/views/default/river/item/wrapper.php b/views/default/river/item/wrapper.php deleted file mode 100644 index 0bdf2f4aa..000000000 --- a/views/default/river/item/wrapper.php +++ /dev/null @@ -1,61 +0,0 @@ -<?php -/** - * Elgg river item wrapper. - * Wraps all river items. - * - * @package Elgg - */ - -//get the site admins choice avatars or action icons -$avatar_icon = get_plugin_setting("avatar_icon","riverdashboard"); -if(!$avatar_icon) { - $avatar_icon = "icon"; -} - -if($avatar_icon == "icon"){ - - ?> - <div class="river_item"> - <div class="river_<?php echo $vars['item']->type; ?>"> - <div class="river_<?php echo $vars['item']->subtype; ?>"> - <div class="river_<?php echo $vars['item']->action_type; ?>"> - <div class="river_<?php echo $vars['item']->type; ?>_<?php if($vars['item']->subtype) echo $vars['item']->subtype . "_"; ?><?php echo $vars['item']->action_type; ?>"> - <p> - <?php - echo $vars['body']; - ?> - <span class="entity-subtext"> - (<?php - echo elgg_view_friendly_time($vars['item']->posted); - ?>) - </span> - </p> - </div> - </div> - </div> - </div> - </div> - - <?php -} else { - ?> - <div class="river_item"> - <span class="river_item_useravatar"> - <?php - echo elgg_view("profile/icon",array('entity' => get_entity($vars['item']->subject_guid), 'size' => 'tiny')); - ?> - </span> - <p class="river_item_body"> - <?php - echo $vars['body']; - ?> - <span class="entity-subtext"> - (<?php - echo elgg_view_friendly_time($vars['item']->posted); - ?>) - </span> - </p> - </div> - <?php -} -?>
\ No newline at end of file diff --git a/views/default/river/relationship/friend/create.php b/views/default/river/relationship/friend/create.php new file mode 100644 index 000000000..80c567795 --- /dev/null +++ b/views/default/river/relationship/friend/create.php @@ -0,0 +1,18 @@ +<?php +/** + * Create friend river view + */ +$subject = $vars['item']->getSubjectEntity(); +$object = $vars['item']->getObjectEntity(); + +$object_link = "<a href=\"{$object->getURL()}\">$object->name</a>"; +$subject_icon = elgg_view("profile/icon", array('entity' => $subject, 'size' => 'tiny')); +$object_icon = elgg_view("profile/icon", array('entity' => $object, 'size' => 'tiny')); + +echo elgg_echo("friends:river:add", array($object_link)); + +echo '<div class="elgg-river-excerpt">'; +echo $subject_icon; +echo '<span class="elgg-icon elgg-icon-following"></span>'; +echo $object_icon; +echo '</div>'; |