From 9456cf380a51d4863dd0ee96499763bb32f54284 Mon Sep 17 00:00:00 2001 From: dave Date: Wed, 10 Mar 2010 16:32:05 +0000 Subject: the beginnings of a new activity river with ajax notification and conversation clustering. git-svn-id: http://code.elgg.org/elgg/trunk@5344 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/riverdashboard/endpoint/ping.php | 71 +++++ mod/riverdashboard/index.php | 140 ++++------ mod/riverdashboard/languages/en.php | 80 +++--- mod/riverdashboard/manifest.xml | 19 +- mod/riverdashboard/start.php | 100 +++---- .../views/default/river/dashboard.php | 19 ++ .../views/default/river/item/list.php | 59 ++++ .../views/default/river/item/wrapper.php | 119 ++++++++ .../default/river/relationship/friend/create.php | 36 +++ .../views/default/river/sitemessage/create.php | 18 -- .../views/default/riverdashboard/container.php | 57 +++- .../views/default/riverdashboard/css.php | 311 +++++++++++++++------ .../views/default/riverdashboard/menu.php | 28 ++ .../views/default/riverdashboard/nav.php | 107 ++++--- .../views/default/riverdashboard/welcome.php | 25 +- .../views/default/settings/riverdashboard/edit.php | 7 - .../views/default/widgets/river_widget/edit.php | 36 --- .../views/default/widgets/river_widget/view.php | 40 --- 18 files changed, 822 insertions(+), 450 deletions(-) create mode 100644 mod/riverdashboard/endpoint/ping.php create mode 100644 mod/riverdashboard/views/default/river/dashboard.php create mode 100644 mod/riverdashboard/views/default/river/item/list.php create mode 100644 mod/riverdashboard/views/default/river/item/wrapper.php create mode 100644 mod/riverdashboard/views/default/river/relationship/friend/create.php delete mode 100644 mod/riverdashboard/views/default/river/sitemessage/create.php create mode 100644 mod/riverdashboard/views/default/riverdashboard/menu.php delete mode 100644 mod/riverdashboard/views/default/widgets/river_widget/edit.php delete mode 100644 mod/riverdashboard/views/default/widgets/river_widget/view.php (limited to 'mod') diff --git a/mod/riverdashboard/endpoint/ping.php b/mod/riverdashboard/endpoint/ping.php new file mode 100644 index 000000000..2a87da746 --- /dev/null +++ b/mod/riverdashboard/endpoint/ping.php @@ -0,0 +1,71 @@ + TRUE, + 'created_time_lower' => $last_reload, + 'wheres' => array('e.type != \'user\'') +)); +if(!$entity_creation) + $entity_creation = 0; +//grab any entities updated +$entity_update = elgg_get_entities(array( + 'count' => TRUE, + 'modified_time_lower' => $last_reload, + 'wheres' => array('e.type != \'user\'') +)); +if(!$entity_update) + $entity_update = 0; +//get any relationships, such as friending - this is not working quite right yet +//$relationship_action = elgg_get_entities_from_relationship(array('count' => TRUE)); +//if(!$relationship_action) +// $relationship_action = 0; + +//sum all totals +$all_activity = $annotations + $entity_creation + $entity_update; + +if ($all_activity > 0) { + $s = ($all_activity == 1) ? '' : 's'; + echo "$all_activity update$s!"; + //echo ""; +?> + + + - * @copyright Curverider Ltd 2008-2010 - * @link http://elgg.org/ - */ - - require_once(dirname(dirname(dirname(__FILE__))) . '/engine/start.php'); - - gatekeeper(); - - $content = get_input('content',''); - $content = explode(',',$content); - $type = $content[0]; - if (isset($content[1])) { - $subtype = $content[1]; - } else { - $subtype = ''; - } - $orient = get_input('display'); - $callback = get_input('callback'); - - if ($type == 'all') { - $type = ''; - $subtype = ''; - } - - $body = ''; - if (empty($callback)) { - - //set a view for the wire to extend - $area1 = elgg_view("riverdashboard/sitemessage"); - - //set a view to display newest members - $area1 .= elgg_view("riverdashboard/newestmembers"); - - //set a view to display a welcome message - $body .= elgg_view("riverdashboard/welcome"); - - } - - switch($orient) { - case 'mine': - $subject_guid = $_SESSION['user']->guid; - $relationship_type = ''; - break; - case 'friends': $subject_guid = $_SESSION['user']->guid; - $relationship_type = 'friend'; - break; - default: $subject_guid = 0; - $relationship_type = ''; - break; - } - - $river = elgg_view_river_items($subject_guid, 0, $relationship_type, $type, $subtype, '') . ""; - - // Replacing callback calls in the nav with something meaningless - $river = str_replace('callback=true','replaced=88,334',$river); - - $nav = elgg_view('riverdashboard/nav',array( - 'type' => $type, - 'subtype' => $subtype, - 'orient' => $orient - )); - if (empty($callback)) { - $body .= elgg_view('riverdashboard/container', array('body' => $nav . $river . elgg_view('riverdashboard/js'))); - page_draw(elgg_echo('dashboard'),elgg_view_layout('sidebar_boxes',$area1,$body)); - } else { - header("Content-type: text/html; charset=UTF-8"); - echo $nav . $river . elgg_view('riverdashboard/js'); - } - -?> +guid; + $relationship_type = ''; + $title_wording = elgg_echo('river:mine'); + break; + case 'friends': $subject_guid = $_SESSION['user']->guid; + $relationship_type = 'friend'; + $title_wording = elgg_echo('river:friends'); + break; + default: $subject_guid = 0; + $relationship_type = ''; + $title_wording = elgg_echo('river:all'); + break; +} + + +$title = elgg_view_title($title_wording); + +$river = elgg_view_river_items($subject_guid, 0, $relationship_type, $type, $subtype, '', 20, 0, 0, true, false); +// Replacing callback calls in the nav with something meaningless +$river = str_replace('callback=true','replaced=88,334',$river); + +$nav = elgg_view('riverdashboard/nav',array('type' => $type,'subtype' => $subtype,'orient' => $orient)); +if(isloggedin()){ + $sidebar = elgg_view("riverdashboard/menu",array('type' => $type,'subtype' => $subtype,'orient' => $orient)); + $sidebar .= elgg_view("riverdashboard/sidebar_options", array("object_type" => 'riverdashboard')); +}else{ + $sidebar = ''; +} +set_context('riverdashboard'); +if (empty($callback)) { + $body .= elgg_view('riverdashboard/container', array('body' => $nav . $river . elgg_view('riverdashboard/js'))); + page_draw($title_wording,elgg_view_layout('one_column_with_sidebar',$title . $body, $sidebar)); +} else { + header("Content-type: text/html; charset=UTF-8"); + echo $nav . $river . elgg_view('riverdashboard/js'); +} \ No newline at end of file diff --git a/mod/riverdashboard/languages/en.php b/mod/riverdashboard/languages/en.php index 7875f863c..64aabf745 100644 --- a/mod/riverdashboard/languages/en.php +++ b/mod/riverdashboard/languages/en.php @@ -1,40 +1,40 @@ - 'Mine', - 'filter' => 'Filter', - 'riverdashboard:useasdashboard' => "Replace the default dashboard with this activity river?", - 'activity' => 'Activity', - 'riverdashboard:recentmembers' => 'Recent members', - - /** - * Site messages - **/ - - 'sitemessages:announcements' => "Site announcements", - 'sitemessages:posted' => "Posted", - 'sitemessages:river:created' => "Site admin, %s,", - 'sitemessages:river:create' => "posted a new site wide message", - 'sitemessages:add' => "Add a site-wide message to the river page", - 'sitemessage:deleted' => "Site message deleted", - 'sitemessage:error' => "Failed to save site message.", - - 'river:widget:noactivity' => 'We could not find any activity.', - 'river:widget:title' => "Activity", - 'river:widget:description' => "Show your latest activity.", - 'river:widget:title:friends' => "Friends' activity", - 'river:widget:description:friends' => "Show what your friends are up to.", - 'river:widgets:friends' => "Friends", - 'river:widgets:mine' => "Mine", - 'river:widget:label:displaynum' => "Number of entries to display:", - 'river:widget:type' => "Which river would you like to display? One that shows your activity or one that shows your friends activity?", - 'item:object:sitemessage' => "Site messages", - 'riverdashboard:avataricon' => "Would you like to use user avatars or icons on your site activity stream?", - 'option:icon' => 'Icons', - 'option:avatar' => 'Avatars', - ); - - add_translation("en",$english); - -?> \ No newline at end of file + 'Mine', + 'filter' => 'Filter', + 'riverdashboard:useasdashboard' => "Replace the default dashboard with this activity river?", + 'activity' => 'Activity', + 'riverdashboard:recentmembers' => 'Recent members', + + /** + * Site messages + **/ + + 'sitemessages:announcements' => "Site announcements", + 'sitemessages:posted' => "Posted", + 'sitemessages:river:created' => "Site admin, %s,", + 'sitemessages:river:create' => "posted a new site wide message", + 'sitemessages:add' => "Add a site-wide message to the river page", + 'sitemessage:deleted' => "Site message deleted", + + 'river:widget:noactivity' => 'We could not find any activity.', + 'river:widget:title' => "Activity", + 'river:all' => "All activity", + 'river:mine' => "My activity", + 'river:friends' => "Friends' activity", + 'river:widget:description' => "Show your latest activity.", + 'river:widget:title:friends' => "Friends' activity", + 'river:widget:description:friends' => "Show what your friends are up to.", + 'river:widgets:friends' => "Friends", + 'river:widgets:mine' => "Mine", + 'river:friends' => "My friends' activity", + 'river:mine' => "My activity", + 'river:widget:label:displaynum' => "Number of entries to display:", + 'river:widget:type' => "Which river would you like to display? One that shows your activity or one that shows your friends activity?", + 'item:object:sitemessage' => "Site messages", + 'riverdashboard:avataricon' => "Would you like to use user avatars or icons on your site activity stream?", + 'option:icon' => 'Icons', + 'option:avatar' => 'Avatars', +); + +add_translation("en",$english); \ No newline at end of file diff --git a/mod/riverdashboard/manifest.xml b/mod/riverdashboard/manifest.xml index 28e254288..a29af8a61 100644 --- a/mod/riverdashboard/manifest.xml +++ b/mod/riverdashboard/manifest.xml @@ -1,10 +1,9 @@ - - - - - - - - - - + + + + + + + + + \ No newline at end of file diff --git a/mod/riverdashboard/start.php b/mod/riverdashboard/start.php index 17bfdf8dd..39233fba6 100644 --- a/mod/riverdashboard/start.php +++ b/mod/riverdashboard/start.php @@ -1,64 +1,36 @@ - - * @copyright Curverider Ltd 2008-2010 - * @link http://elgg.org/ - */ - - function riverdashboard_init() { - - global $CONFIG; - - // Register and optionally replace the dashboard - if (get_plugin_setting('useasdashboard', 'riverdashboard') == 'yes') { - register_page_handler('dashboard','riverdashboard_page_handler'); - } else { - // Activity main menu - if (isloggedin()) - { - add_menu(elgg_echo('activity'), $CONFIG->wwwroot . "mod/riverdashboard/"); - } - } - - // Page handler - register_page_handler('riverdashboard','riverdashboard_page_handler'); - - elgg_extend_view('css','riverdashboard/css'); - - add_widget_type('river_widget',elgg_echo('river:widget:title'), elgg_echo('river:widget:description')); - - } - - /** - * Page handler for riverdash - * - * @param unknown_type $page - */ - function riverdashboard_page_handler($page) - { - global $CONFIG; - - include(dirname(__FILE__) . "/index.php"); - return true; - } - - function riverdashboard_dashboard() { - - include(dirname(__FILE__) . '/index.php'); - - } - - register_elgg_event_handler('init','system','riverdashboard_init'); - - // Register actions - global $CONFIG; - register_action("riverdashboard/add",false,$CONFIG->pluginspath . "riverdashboard/actions/add.php"); - register_action("riverdashboard/delete",false,$CONFIG->pluginspath . "riverdashboard/actions/delete.php"); - - -?> \ No newline at end of file +wwwroot . "mod/riverdashboard/"); + } + // Page handler + register_page_handler('riverdashboard','riverdashboard_page_handler'); + elgg_extend_view('css','riverdashboard/css'); +} + +/** + * Page handler for riverdash + * + * @param unknown_type $page + */ +function riverdashboard_page_handler($page){ + global $CONFIG; + include(dirname(__FILE__) . "/index.php"); + return true; +} + +function riverdashboard_dashboard() { + include(dirname(__FILE__) . '/index.php'); +} + +register_elgg_event_handler('init','system','riverdashboard_init'); \ No newline at end of file diff --git a/mod/riverdashboard/views/default/river/dashboard.php b/mod/riverdashboard/views/default/river/dashboard.php new file mode 100644 index 000000000..5fe7c35d3 --- /dev/null +++ b/mod/riverdashboard/views/default/river/dashboard.php @@ -0,0 +1,19 @@ + +
+0)) { + foreach ($river as $r) { + echo $r; + } +} else { + echo elgg_echo('river:widget:noactivity'); +} +?> +
\ No newline at end of file diff --git a/mod/riverdashboard/views/default/river/item/list.php b/mod/riverdashboard/views/default/river/item/list.php new file mode 100644 index 000000000..25774ff08 --- /dev/null +++ b/mod/riverdashboard/views/default/river/item/list.php @@ -0,0 +1,59 @@ + +
+= $vars['limit']) { + break; + } + } + } + } + + if ($vars['pagination'] !== false) { + $baseurl = $_SERVER['REQUEST_URI']; + $baseurl = $baseurl = preg_replace('/[\&\?]offset\=[0-9]*/',"",$baseurl); + + $nav = ''; + + if (sizeof($vars['items']) > $vars['limit']) { + $newoffset = $vars['offset'] + $vars['limit']; + $urladdition = 'offset='.$newoffset; + if (substr_count($baseurl,'?')) { + $nexturl = $baseurl . '&' . $urladdition; + } else { + $nexturl=$baseurl . '?' . $urladdition; + } + + $nav .= '« ' . elgg_echo('previous') . ' '; + } + + if ($vars['offset'] > 0) { + $newoffset = $vars['offset'] - $vars['limit']; + if ($newoffset < 0) { + $newoffset = 0; + } + $urladdition = 'offset='.$newoffset; + if (substr_count($baseurl,'?')) { + $prevurl=$baseurl . '&' . $urladdition; + } else { + $prevurl=$baseurl . '?' . $urladdition; + } + + $nav .= '' . elgg_echo('next') . ' » '; + } + + if (!empty($nav)) { + echo '

'.$nav.'

'; + } + } +?> +
\ No newline at end of file diff --git a/mod/riverdashboard/views/default/river/item/wrapper.php b/mod/riverdashboard/views/default/river/item/wrapper.php new file mode 100644 index 000000000..1aa508d99 --- /dev/null +++ b/mod/riverdashboard/views/default/river/item/wrapper.php @@ -0,0 +1,119 @@ +object_guid); +//get object url +$object_url = $object->getURL(); +//user +//if displaying on the profile get the object owner, else the subject_guid +if(get_context() == 'profile' && $object->getSubtype() == 'thewire') + $user = get_entity($object->owner_guid); +else + $user = get_entity($vars['item']->subject_guid); + +//get the right annotation type +//*todo - use the same for comments, everywhere e.g. comment +switch($vars['item']->subtype){ + case 'thewire': + $annotation_comment = 'wire_reply'; + break; + default: + $annotation_comment = 'generic_comment'; + break; +} + +//count comment annotations +$comment_count = count_annotations($vars['item']->object_guid, $vars['item']->type, $vars['item']->subtype, $annotation_comment); + +//count like annotations +$likes = count_annotations($vars['item']->object_guid, $vars['item']->type, $vars['item']->subtype, "likes"); + +//get last two comments display +$get_comments = get_annotations($vars['item']->object_guid, "", "", $annotation_comment, "", "", 3, 0, "desc"); + +if($get_comments){ + //reverse the array so we can display comments in the right order + $get_comments = array_reverse($get_comments); +} + +//minus two off the comment total as we display two by default +if($comment_count < 3) + $num_comments = 0; +else + $num_comments = $comment_count - 3; +?> +
+ + + $user, 'size' => 'small')); + ?> + + + +
+ +
+ "; + //set the correct context comment or comments + if($num_comments == 1) + echo "+{$num_comments} more comment"; + else + echo "+{$num_comments} more comments"; + + echo "
"; + } + //display latest 2 comments if there are any + if($get_comments){ + $counter = 0; + $background = ""; + echo "
"; + foreach($get_comments as $gc){ + //get the comment owner + $comment_owner = get_user($gc->owner_guid); + //get the comment owner's profile url + $comment_owner_url = $comment_owner->getURL(); + // color-code each of the 3 comments + if( ($counter == 2 && $comment_count >= 4) || ($counter == 1 && $comment_count == 2) || ($counter == 0 && $comment_count == 1) || ($counter == 2 && $comment_count == 3) ) + $alt = 'latest'; + else if( ($counter == 1 && $comment_count >= 4) || ($counter == 0 && $comment_count == 2) || ($counter == 1 && $comment_count == 3) ) + $alt = 'penultimate'; + + //display comment + echo "
"; + echo "
"; + echo elgg_view("profile/icon",array('entity' => $comment_owner, 'size' => 'tiny')); + echo "
"; + //truncate comment to 150 characters + if(strlen($gc->value) > 150) { + $gc->value = substr($gc->value, 0, strpos($gc->value, ' ', 150)) . "..."; + } + $contents = strip_tags($gc->value); + echo "
"; + echo "" . $comment_owner->name . " " . parse_urls($contents); + echo "
" . friendly_time($gc->time_created) . ""; + echo "
"; + echo "
"; + $counter++; + } + echo "
"; + } + //display the comment link + if($vars['item']->type != 'user'){ + //for now don't display the comment link on bookmarks and wire messages + if($vars['item']->subtype != 'thewire' && $vars['item']->subtype != 'bookmarks' && $vars['item']->subtype != '') + echo "Comment"; + } + ?> +
+
+ \ No newline at end of file diff --git a/mod/riverdashboard/views/default/river/relationship/friend/create.php b/mod/riverdashboard/views/default/river/relationship/friend/create.php new file mode 100644 index 000000000..916efd407 --- /dev/null +++ b/mod/riverdashboard/views/default/river/relationship/friend/create.php @@ -0,0 +1,36 @@ +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 "getURL()}\">{$performed_by->name} "; + + // Verb + echo elgg_echo('river:relationship:friend'); + + // user B + echo " getURL()}\">{$userb->name}"; + } + + break; + } +} \ No newline at end of file diff --git a/mod/riverdashboard/views/default/river/sitemessage/create.php b/mod/riverdashboard/views/default/river/sitemessage/create.php deleted file mode 100644 index eaceb1a2e..000000000 --- a/mod/riverdashboard/views/default/river/sitemessage/create.php +++ /dev/null @@ -1,18 +0,0 @@ -subject_guid); // $statement->getSubject(); - $object = get_entity($vars['item']->object_guid); - $url = $object->getURL(); - - $url = "getURL()}\">{$performed_by->name}"; - $string = sprintf(elgg_echo("sitemessages:river:created"),$url) . " "; - $string .= elgg_echo("sitemessages:river:create"); - $string .= "
"; - $string .= $object->description; - $string .= "
"; - -?> - - \ No newline at end of file diff --git a/mod/riverdashboard/views/default/riverdashboard/container.php b/mod/riverdashboard/views/default/riverdashboard/container.php index f4bfd7f83..a72de9fc4 100644 --- a/mod/riverdashboard/views/default/riverdashboard/container.php +++ b/mod/riverdashboard/views/default/riverdashboard/container.php @@ -1,5 +1,52 @@ - - -
\ No newline at end of file +
+ + diff --git a/mod/riverdashboard/views/default/riverdashboard/css.php b/mod/riverdashboard/views/default/riverdashboard/css.php index d9c36f048..d558b215a 100644 --- a/mod/riverdashboard/views/default/riverdashboard/css.php +++ b/mod/riverdashboard/views/default/riverdashboard/css.php @@ -3,77 +3,13 @@ /** * Elgg riverdashboard CSS * - * @package riverdashboard - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Curverider - * @copyright Curverider Ltd 2008-2010 - * @link http://elgg.org/ */ ?> -.sidebarBox #thewire_sidebarInputBox { - width:178px; -} -.sidebarBox .last_wirepost { - margin:20px 0 20px 0; -} -.sidebarBox .last_wirepost .thewire-singlepage { - margin:0; -} -.sidebarBox .last_wirepost .thewire-singlepage .thewire_options { - display:none; -} -.sidebarBox .last_wirepost .thewire-singlepage .note_date { - line-height: 1em; - padding:3px 0 0 0; - width:142px; -} -.sidebarBox .last_wirepost .thewire-singlepage .note_body { - color:#666666; - line-height: 1.2em; -} -.sidebarBox .last_wirepost .thewire-singlepage .thewire-post { - background-position: 130px bottom; -} -.sidebarBox .thewire_characters_remaining { - float:right; -} -.sidebarBox input.thewire_characters_remaining_field { - background: #dedede; -} -.sidebarBox input.thewire_characters_remaining_field:focus { - background: #dedede; - border:none; -} -.sidebarBox input#thewire_submit_button { - margin:2px 0 0 0; - padding:2px 2px 1px 2px; - height:auto; -} -.sidebarBox .membersWrapper { - background: white; - -webkit-border-radius: 8px; - -moz-border-radius: 8px; - padding:7px; -} -.sidebarBox .membersWrapper .recentMember { - margin:2px; - float:left; -} -.sidebarBox .membersWrapper .recentMember .usericon img { - width:25px; - height:25px; -} -/* br necessary for ie6 & 7 */ -.sidebarBox .membersWrapper br { - height:0; - line-height:0; -} -.welcomemessage { - background:white; -} + .riverdashboard_filtermenu { margin:10px 0 10px 0; + float:right; } .river_pagination .forward, @@ -107,26 +43,31 @@ *:first-child+html .river_pagination { margin-top:17px; } /* activity widget */ -.collapsable_box_content .river_item p { - color:#333333; -} - .collapsable_box_content .content_area_user_title h2 { - font-size:1.25em; - line-height:1.2em; - margin:0; - padding:0 0 2px 0; - color:#4690d6; + font-size:1.0em; } +.collapsable_box_content .ContentWrapper.ActivityWidget { + +} + .river_content img { margin:2px 0 2px 20px; } +.river_content_title { + margin-left:55px; + +} +.river_content_title a { + font-weight: bold; + /* color:#333333; */ +} + .river_content_display { - border-left:1px solid #ddd; - padding:2px 10px 0 10px; + border-left:1px solid #DDDDDD; font-size:90%; - margin:4px 0 2px 30px; + margin:8px 0 6px 55px; + padding-left:5px; } .river_content_display p { @@ -136,13 +77,219 @@ .following_icon { width:20px; - height:40px; + height:25px; margin:0 2px 0 2px; - background: url(mod/riverdashboard/graphics/follow_icon.png) no-repeat left top; + background: url(mod/riverdashboard/graphics/follow_icon.png) no-repeat left -7px; } .river_content_display div.usericon a.icon img { - width:40px; - height:40px; + width:25px; + height:25px; +} + + +/* *************************************** + ACTIVITY RIVER +*************************************** */ +.river_item_list { + border-top:1px solid #cccccc; +} +.river_item p { + margin:0; +} +.river_item { + border-bottom:1px solid #cccccc; + padding:7px 0 10px 0; +/* + margin-top:5px; + margin-bottom:5px; +*/ } +.river_item_annotation { + +} +span.more_comments { + +} +.river_more_comments { + display:block; + float:right; + padding:2px 4px 7px 30px; + text-align:right; + width:auto; +} +.river_comments { + margin:5px 0 0 55px; + width:auto; +} +.comment_wrapper { + margin-left:34px; +} +.comment_link { + margin-left:55px; +} + +.river_comment_owner_icon { + float:left; + margin:0 8px 4px 2px; +} + +.river_comment { + background-color: #f8f8f8; + padding:3px; + margin-bottom:3px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; +} +.river_comment.penultimate { + background-color: #eeeeee; +} +.river_comment.latest { + background-color: #dedede; + margin-bottom:0; +} + +.river_item_time { + font-size:90%; + color:#666666; +} +.river_item .river_item_useravatar { + float:left; + margin:3px 0 0 1px; +} +/* IE6 fix */ +* html .river_item p { + /* padding:3px 0 3px 20px; */ +} +/* IE7 */ +*:first-child+html .river_item p { + /* min-height:17px; */ +} + +/* .river_object_blog_update, */ + +.river_object_blog_create, +.river_object_page_create, +.river_object_page_update { + float:left; + width:26px; + height:32px; + border:none; + background-color: transparent; + margin-right:6px; + margin-top:2px; +} +.river_object_blog_create { + background-image: url(mod/riverdashboard/graphics/icon_activity_blogs.png); + background-position: left top; + background-repeat: no-repeat; +} +.river_object_page_create, +.river_object_page_update { + background-image: url(mod/riverdashboard/graphics/icon_activity_pages.png); + background-position: left top; + background-repeat: no-repeat; +} + + +.collapsable_box_content .river_user_update { + background: url(_graphics/river_icons/river_icon_profile.gif) no-repeat left -1px; +} +.collapsable_box_content .river_object_user_profileupdate { + background: url(_graphics/river_icons/river_icon_profile.gif) no-repeat left -1px; +} +.collapsable_box_content .river_object_user_profileiconupdate { + background: url(_graphics/river_icons/river_icon_profile.gif) no-repeat left -1px; +} +.collapsable_box_content .river_object_annotate { + background: url(_graphics/river_icons/river_icon_comment.gif) no-repeat left -1px; +} +.collapsable_box_content .river_object_bookmarks_create { + background: url(_graphics/river_icons/river_icon_bookmarks.gif) no-repeat left -1px; +} +.collapsable_box_content .river_object_bookmarks_comment { + background: url(_graphics/river_icons/river_icon_comment.gif) no-repeat left -1px; +} +.collapsable_box_content .river_object_status_create { + background: url(_graphics/river_icons/river_icon_status.gif) no-repeat left -1px; +} +.collapsable_box_content .river_object_file_create { + background: url(_graphics/river_icons/river_icon_files.gif) no-repeat left -1px; +} +.collapsable_box_content .river_object_file_update { + background: url(_graphics/river_icons/river_icon_files.gif) no-repeat left -1px; +} +.collapsable_box_content .river_object_file_comment { + background: url(_graphics/river_icons/river_icon_comment.gif) no-repeat left -1px; +} +.collapsable_box_content .river_object_widget_create { + background: url(_graphics/river_icons/river_icon_plugin.gif) no-repeat left -1px; +} +.collapsable_box_content .river_object_forums_create { + background: url(_graphics/river_icons/river_icon_forum.gif) no-repeat left -1px; +} +.collapsable_box_content .river_object_forums_update { + background: url(_graphics/river_icons/river_icon_forum.gif) no-repeat left -1px; +} +.collapsable_box_content .river_object_widget_update { + background: url(_graphics/river_icons/river_icon_plugin.gif) no-repeat left -1px; +} +.collapsable_box_content .river_object_blog_create { + background: url(_graphics/river_icons/river_icon_blog.gif) no-repeat left -1px; +} +.collapsable_box_content .river_object_blog_update { + background: url(_graphics/river_icons/river_icon_blog.gif) no-repeat left -1px; +} +.collapsable_box_content .river_object_blog_comment { + background: url(_graphics/river_icons/river_icon_comment.gif) no-repeat left -1px; +} +.collapsable_box_content .river_object_forumtopic_create { + background: url(_graphics/river_icons/river_icon_forum.gif) no-repeat left -1px; +} +.collapsable_box_content .river_user_friend { + background: url(_graphics/river_icons/river_icon_friends.gif) no-repeat left -1px; +} +.collapsable_box_content .river_object_relationship_friend_create { + background: url(_graphics/river_icons/river_icon_friends.gif) no-repeat left -1px; +} +.collapsable_box_content .river_object_relationship_member_create { + background: url(_graphics/river_icons/river_icon_forum.gif) no-repeat left -1px; +} +.collapsable_box_content .river_object_thewire_create { + background: url(_graphics/river_icons/river_icon_thewire.gif) no-repeat left -1px; +} +.collapsable_box_content .river_group_join { + background: url(_graphics/river_icons/river_icon_forum.gif) no-repeat left -1px; +} +.collapsable_box_content .river_object_groupforumtopic_annotate { + background: url(_graphics/river_icons/river_icon_comment.gif) no-repeat left -1px; +} +.collapsable_box_content .river_object_groupforumtopic_create { + background: url(_graphics/river_icons/river_icon_forum.gif) no-repeat left -1px; +} +.collapsable_box_content .river_object_sitemessage_create { + background: url(_graphics/river_icons/river_icon_blog.gif) no-repeat left -1px; +} +.collapsable_box_content .river_user_messageboard { + background: url(_graphics/river_icons/river_icon_comment.gif) no-repeat left -1px; +} +.collapsable_box_content .river_object_page_create { + background: url(_graphics/river_icons/river_icon_pages.gif) no-repeat left -1px; +} +.collapsable_box_content .river_object_page_update { + background: url(_graphics/river_icons/river_icon_pages.gif) no-repeat left -1px; +} +.collapsable_box_content .river_object_page_top_create { + background: url(_graphics/river_icons/river_icon_pages.gif) no-repeat left -1px; +} +.collapsable_box_content .river_object_page_top_update { + background: url(_graphics/river_icons/river_icon_pages.gif) no-repeat left -1px; +} +.collapsable_box_content .river_object_page_top_comment { + background: url(_graphics/river_icons/river_icon_comment.gif) no-repeat left -1px; +} +.collapsable_box_content .river_object_page_comment { + background: url(_graphics/river_icons/river_icon_comment.gif) no-repeat left -1px; +} + diff --git a/mod/riverdashboard/views/default/riverdashboard/menu.php b/mod/riverdashboard/views/default/riverdashboard/menu.php new file mode 100644 index 000000000..44084cec9 --- /dev/null +++ b/mod/riverdashboard/views/default/riverdashboard/menu.php @@ -0,0 +1,28 @@ + + \ No newline at end of file diff --git a/mod/riverdashboard/views/default/riverdashboard/nav.php b/mod/riverdashboard/views/default/riverdashboard/nav.php index 43d5723ca..db868db51 100644 --- a/mod/riverdashboard/views/default/riverdashboard/nav.php +++ b/mod/riverdashboard/views/default/riverdashboard/nav.php @@ -1,54 +1,53 @@ -registered_entities)) { - foreach ($vars['config']->registered_entities as $type => $ar) { - foreach ($vars['config']->registered_entities[$type] as $object) { - if (!empty($object )) { - $keyname = 'item:'.$type.':'.$object; - } else $keyname = 'item:'.$type; - $contents[$keyname] = "{$type},{$object}"; - } - } - } - - $allselect = ''; $friendsselect = ''; $mineselect = ''; - switch($vars['orient']) { - case '': $allselect = 'class="selected"'; - break; - case 'friends': $friendsselect = 'class="selected"'; - break; - case 'mine': $mineselect = 'class="selected"'; - break; - } - -?> - -
-
-
    -
  • >
  • -
  • >
  • -
  • >
  • -
-
- -
- - - -
- +registered_entities)) { + foreach ($vars['config']->registered_entities as $type => $ar) { + foreach ($vars['config']->registered_entities[$type] as $object) { + if($object != 'helppage'){ + if (!empty($object )) { + $keyname = 'item:'.$type.':'.$object; + } else $keyname = 'item:'.$type; + $contents[$keyname] = "{$type},{$object}"; + } + } + } +} + +$allselect = ''; $friendsselect = ''; $mineselect = ''; $display_option = ''; +switch($vars['orient']) { + case '': $allselect = 'class="selected"'; + break; + case 'friends': $friendsselect = 'class="selected"'; + $display_option = '&display=friends'; + break; + case 'mine': $mineselect = 'class="selected"'; + $display_option = '&display=mine'; + break; +} +?> +
+
+ "; + $current = get_input('subtype'); + foreach($contents as $label => $content) { + $get_values = explode(",", $content); + //select the current filter + if($get_values[1] == $current) + $selected = "SELECTED"; + //set the drop down filter + if($content[0] && $content[1]) + $location_filter .= ""; + //reset selected + $selected = ''; + } + $location_filter .= ""; + echo $location_filter; + ?> + +
+ + +
diff --git a/mod/riverdashboard/views/default/riverdashboard/welcome.php b/mod/riverdashboard/views/default/riverdashboard/welcome.php index 23541c0ac..ac809c2a0 100644 --- a/mod/riverdashboard/views/default/riverdashboard/welcome.php +++ b/mod/riverdashboard/views/default/riverdashboard/welcome.php @@ -1,17 +1,10 @@ - - * @copyright Curverider Ltd 2008-2010 - * @link http://elgg.com/ - * - */ - -?> -
-

name); ?>

+ +
+

name); ?>

\ No newline at end of file diff --git a/mod/riverdashboard/views/default/settings/riverdashboard/edit.php b/mod/riverdashboard/views/default/settings/riverdashboard/edit.php index 2e0a434fb..1a581f96b 100644 --- a/mod/riverdashboard/views/default/settings/riverdashboard/edit.php +++ b/mod/riverdashboard/views/default/settings/riverdashboard/edit.php @@ -6,11 +6,4 @@ -

-

- -

\ No newline at end of file diff --git a/mod/riverdashboard/views/default/widgets/river_widget/edit.php b/mod/riverdashboard/views/default/widgets/river_widget/edit.php deleted file mode 100644 index 3f3c9d625..000000000 --- a/mod/riverdashboard/views/default/widgets/river_widget/edit.php +++ /dev/null @@ -1,36 +0,0 @@ -content_type) - $content_type = 'mine'; - else - $content_type = $vars['entity']->content_type; - - -?> -

- - - -

-

- - - -

\ No newline at end of file diff --git a/mod/riverdashboard/views/default/widgets/river_widget/view.php b/mod/riverdashboard/views/default/widgets/river_widget/view.php deleted file mode 100644 index 039962c27..000000000 --- a/mod/riverdashboard/views/default/widgets/river_widget/view.php +++ /dev/null @@ -1,40 +0,0 @@ -content_type; - if(!$type) - $type = "mine"; - - //based on type grab the correct content type - if($type == "mine") - $content_type = ''; - else - $content_type = 'friend'; - - //get the number of items to display - $limit = $vars['entity']->num_display; - if(!$limit) - $limit = 4; - - //grab the river - $river = elgg_view_river_items($owner->getGuid(), 0, $content_type, $content[0], $content[1], '', $limit,0,0,false); - - //display - echo "
"; - if($type != 'mine') - echo "

" . elgg_echo("friends") . "

"; - echo $river; - echo "
"; - -?> \ No newline at end of file -- cgit v1.2.3