From abf3fcae3f90b4c52e40d3ef8bb11f92c7a03d1c Mon Sep 17 00:00:00 2001 From: cash Date: Sun, 19 Dec 2010 01:44:33 +0000 Subject: rough widget profile plugin git-svn-id: http://code.elgg.org/elgg/trunk@7676 36083f99-b078-4883-b0ff-0f9b5a30f544 --- .../views/default/icon/user/default/large.php | 3 + .../views/default/icon/user/default/master.php | 3 + .../views/default/icon/user/default/medium.php | 3 + .../views/default/icon/user/default/small.php | 3 + .../views/default/icon/user/default/tiny.php | 3 + .../views/default/icon/user/default/topbar.php | 3 + .../views/default/profile/admin_menu.php | 42 ++ .../default/profile/commentwall/commentwall.php | 18 + .../profile/commentwall/commentwall_content.php | 32 ++ .../default/profile/commentwall/commentwalladd.php | 18 + .../views/default/profile/content_wrapper.php | 13 + mod/tabbed_profile/views/default/profile/css.php | 458 +++++++++++++++++++++ .../views/default/profile/hoverover.php | 16 + mod/tabbed_profile/views/default/profile/icon.php | 111 +++++ .../views/default/profile/javascript.php | 137 ++++++ .../views/default/profile/listing.php | 49 +++ .../views/default/profile/menu/adminlinks.php | 28 ++ .../views/default/profile/menu/friendlinks.php | 23 ++ .../views/default/profile/menu/links.php | 9 + .../views/default/profile/metatags.php | 14 + .../views/default/profile/ownerblock.php | 136 ++++++ .../views/default/profile/sidebar.php | 13 + .../views/default/profile/tab_navigation.php | 68 +++ .../views/default/profile/tabs/activity.php | 32 ++ .../views/default/profile/tabs/commentwall.php | 13 + .../views/default/profile/tabs/details.php | 41 ++ .../views/default/profile/tabs/friends.php | 12 + .../views/default/profile/tabs/groups.php | 11 + .../views/default/profile/tabs/twitter.php | 17 + 29 files changed, 1329 insertions(+) create mode 100644 mod/tabbed_profile/views/default/icon/user/default/large.php create mode 100644 mod/tabbed_profile/views/default/icon/user/default/master.php create mode 100644 mod/tabbed_profile/views/default/icon/user/default/medium.php create mode 100644 mod/tabbed_profile/views/default/icon/user/default/small.php create mode 100644 mod/tabbed_profile/views/default/icon/user/default/tiny.php create mode 100644 mod/tabbed_profile/views/default/icon/user/default/topbar.php create mode 100755 mod/tabbed_profile/views/default/profile/admin_menu.php create mode 100644 mod/tabbed_profile/views/default/profile/commentwall/commentwall.php create mode 100644 mod/tabbed_profile/views/default/profile/commentwall/commentwall_content.php create mode 100644 mod/tabbed_profile/views/default/profile/commentwall/commentwalladd.php create mode 100644 mod/tabbed_profile/views/default/profile/content_wrapper.php create mode 100644 mod/tabbed_profile/views/default/profile/css.php create mode 100644 mod/tabbed_profile/views/default/profile/hoverover.php create mode 100644 mod/tabbed_profile/views/default/profile/icon.php create mode 100644 mod/tabbed_profile/views/default/profile/javascript.php create mode 100644 mod/tabbed_profile/views/default/profile/listing.php create mode 100644 mod/tabbed_profile/views/default/profile/menu/adminlinks.php create mode 100644 mod/tabbed_profile/views/default/profile/menu/friendlinks.php create mode 100644 mod/tabbed_profile/views/default/profile/menu/links.php create mode 100644 mod/tabbed_profile/views/default/profile/metatags.php create mode 100755 mod/tabbed_profile/views/default/profile/ownerblock.php create mode 100644 mod/tabbed_profile/views/default/profile/sidebar.php create mode 100755 mod/tabbed_profile/views/default/profile/tab_navigation.php create mode 100755 mod/tabbed_profile/views/default/profile/tabs/activity.php create mode 100644 mod/tabbed_profile/views/default/profile/tabs/commentwall.php create mode 100755 mod/tabbed_profile/views/default/profile/tabs/details.php create mode 100755 mod/tabbed_profile/views/default/profile/tabs/friends.php create mode 100644 mod/tabbed_profile/views/default/profile/tabs/groups.php create mode 100755 mod/tabbed_profile/views/default/profile/tabs/twitter.php (limited to 'mod/tabbed_profile/views/default') diff --git a/mod/tabbed_profile/views/default/icon/user/default/large.php b/mod/tabbed_profile/views/default/icon/user/default/large.php new file mode 100644 index 000000000..ac28f8e9a --- /dev/null +++ b/mod/tabbed_profile/views/default/icon/user/default/large.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/mod/tabbed_profile/views/default/icon/user/default/master.php b/mod/tabbed_profile/views/default/icon/user/default/master.php new file mode 100644 index 000000000..129b0d375 --- /dev/null +++ b/mod/tabbed_profile/views/default/icon/user/default/master.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/mod/tabbed_profile/views/default/icon/user/default/medium.php b/mod/tabbed_profile/views/default/icon/user/default/medium.php new file mode 100644 index 000000000..8815a65bc --- /dev/null +++ b/mod/tabbed_profile/views/default/icon/user/default/medium.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/mod/tabbed_profile/views/default/icon/user/default/small.php b/mod/tabbed_profile/views/default/icon/user/default/small.php new file mode 100644 index 000000000..895aa15cc --- /dev/null +++ b/mod/tabbed_profile/views/default/icon/user/default/small.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/mod/tabbed_profile/views/default/icon/user/default/tiny.php b/mod/tabbed_profile/views/default/icon/user/default/tiny.php new file mode 100644 index 000000000..866c61533 --- /dev/null +++ b/mod/tabbed_profile/views/default/icon/user/default/tiny.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/mod/tabbed_profile/views/default/icon/user/default/topbar.php b/mod/tabbed_profile/views/default/icon/user/default/topbar.php new file mode 100644 index 000000000..0ff3dbaaa --- /dev/null +++ b/mod/tabbed_profile/views/default/icon/user/default/topbar.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/mod/tabbed_profile/views/default/profile/admin_menu.php b/mod/tabbed_profile/views/default/profile/admin_menu.php new file mode 100755 index 000000000..99ed3a4f5 --- /dev/null +++ b/mod/tabbed_profile/views/default/profile/admin_menu.php @@ -0,0 +1,42 @@ + + + diff --git a/mod/tabbed_profile/views/default/profile/commentwall/commentwall.php b/mod/tabbed_profile/views/default/profile/commentwall/commentwall.php new file mode 100644 index 000000000..56670dcf0 --- /dev/null +++ b/mod/tabbed_profile/views/default/profile/commentwall/commentwall.php @@ -0,0 +1,18 @@ +"; + +// If there is any content to view, view it +if (is_array($vars['annotation']) && sizeof($vars['annotation']) > 0) { + //loop through all annotations and display + foreach($vars['annotation'] as $content) { + echo elgg_view("profile/commentwall/commentwall_content", array('annotation' => $content)); + } +} else { + echo "

" . elgg_echo("profile:commentwall:none") . "

"; +} +//close the wrapper div +echo ""; \ No newline at end of file diff --git a/mod/tabbed_profile/views/default/profile/commentwall/commentwall_content.php b/mod/tabbed_profile/views/default/profile/commentwall/commentwall_content.php new file mode 100644 index 000000000..a0785b565 --- /dev/null +++ b/mod/tabbed_profile/views/default/profile/commentwall/commentwall_content.php @@ -0,0 +1,32 @@ + +
+ +
+ get_entity($vars['annotation']->owner_guid), 'size' => 'tiny')); + ?> +
+ +
+ canEdit()) { + echo ""; + } //end of can edit if statement + ?> + +

+ owner_guid)->name . " " . elgg_view_friendly_time($vars['annotation']->time_created); ?> +

+ + parse_urls($vars['annotation']->value))); ?> +
+
diff --git a/mod/tabbed_profile/views/default/profile/commentwall/commentwalladd.php b/mod/tabbed_profile/views/default/profile/commentwall/commentwalladd.php new file mode 100644 index 000000000..dcb520ea1 --- /dev/null +++ b/mod/tabbed_profile/views/default/profile/commentwall/commentwalladd.php @@ -0,0 +1,18 @@ + +
+
+ +
+ + + + + + + +
+
diff --git a/mod/tabbed_profile/views/default/profile/content_wrapper.php b/mod/tabbed_profile/views/default/profile/content_wrapper.php new file mode 100644 index 000000000..4fb43e7c9 --- /dev/null +++ b/mod/tabbed_profile/views/default/profile/content_wrapper.php @@ -0,0 +1,13 @@ + +
+ +
\ No newline at end of file diff --git a/mod/tabbed_profile/views/default/profile/css.php b/mod/tabbed_profile/views/default/profile/css.php new file mode 100644 index 000000000..812daf16d --- /dev/null +++ b/mod/tabbed_profile/views/default/profile/css.php @@ -0,0 +1,458 @@ + +/* *************************************** + main layout blocks +*************************************** */ +#profile_content { + float:right; + width:700px; + position: relative; +} +#profile_sidebar { + width:230px; + float:left; +} +.elgg-horizontal-tabbed-nav.profile { + margin-top:0px; + margin-bottom:25px; + position:relative; +} +.elgg-horizontal-tabbed-nav.profile .profile_name { + display:block; + width:265px; + position:absolute; +} +.elgg-horizontal-tabbed-nav.profile .profile_name h2 { + margin:0; + padding:0; + border:none; +} +.elgg-horizontal-tabbed-nav.profile ul { + margin-left:260px; +} + +/* *************************************** + default avatar icons +*************************************** */ +.usericon { + position:relative; +} +.usericon.tiny, +img.tiny { + width:25px; + height:25px; + /* remove the border-radius if you don't want rounded avatars in supported browsers */ + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + -moz-background-clip: border; + + -o-background-size: 25px; + -webkit-background-size: 25px; + -khtml-background-size: 25px; + -moz-background-size: 25px; +} +.usericon.small, +img.small { + width:40px; + height:40px; + /* remove the border-radius if you don't want rounded avatars in supported browsers */ + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + -moz-background-clip: border; + + -o-background-size: 40px; + -webkit-background-size: 40px; + -khtml-background-size: 40px; + -moz-background-size: 40px; +} +img.large { + width:200px; + height:200px; +} +img.medium { + width:100px; + height:100px; +} + +/* *************************************** + ownerblock in sidebar +*************************************** */ +#profile_sidebar #owner_block { + background-color: #eeeeee; + -webkit-border-radius: 8px; + -moz-border-radius: 8px; + padding:15px; + min-height:270px; +} +#elgg-sidebar #owner_block { + background-color: white; + -webkit-border-radius: 8px; + -moz-border-radius: 8px; + padding:5px; + margin-bottom:10px; +} +#owner_block .owner_block_icon { + float:left; + padding:0; + margin:0; +} +#owner_block .owner_block_icon.large { + width:200px; + height:200px; + overflow: hidden; + float:none; +} +#owner_block .owner_block_contents { + margin-left: 50px; +} +#elgg-sidebar #owner_block .owner_block_contents { + margin-left: 34px; +} +#owner_block .owner_block_contents h3 { + margin-top:-4px; + border-bottom:none; + margin-bottom:0; + padding-bottom:0; +} +#owner_block .owner_block_contents p.profile_info { + margin:0; + padding:0; + color: #666666; +} +#owner_block .owner_block_contents p.profile_info.briefdescription { + font-size: 90%; + line-height:1.2em; + font-style: italic; +} +#owner_block .owner_block_contents p.profile_info.location { + font-size: 90%; +} +#owner_block .profile_actions { + margin-top:10px; +} +#owner_block .profile_actions a.action-button { + margin-bottom:4px; + display: table; +} +/* ownerblock links to owners tools */ +#owner_block .owners_content_links { + border-top:1px dotted #cccccc; + margin-top:4px; + padding-top:2px; +} +#owner_block .owners_content_links ul { + margin:0; + padding:0; +} +#owner_block .owners_content_links ul li { + display:block; + float:left; + width:95px; + font-size: 90%; +} +/* profile pages - ownerblock links to owners tools */ +.owner_block_links { + margin-top:5px; +} +.owner_block_links ul { + margin:0; + padding:0; + list-style: none; +} +.owner_block_links ul li.selected a { + background: #4690D6; + color:white; +} +.owner_block_links ul li a { + display:block; + -webkit-border-radius: 8px; + -moz-border-radius: 8px; + background-color:white; + margin:3px 0 5px 0; + padding:2px 4px 2px 8px; +} +.owner_block_links ul li a:hover { + background:#0054A7; + color:white; + text-decoration:none; +} + + +/* *************************************** + admin menu in sidebar +*************************************** */ +.owner_block_links .admin_menu_options { + display: none; +} +.owner_block_links ul.admin_menu { + background-color:white; + -webkit-border-radius: 8px; + -moz-border-radius: 8px; + cursor:pointer; +} +.owner_block_links ul.admin_menu li a { + background-color: white; + color:red; + margin-bottom:0; +} +.owner_block_links ul.admin_menu li a:hover { + color:black; +} +.owner_block_links ul.admin_menu li ul.admin_menu_options li a { + color:red; + background-color:white; + display:block; + margin:0px; + padding:2px 4px 2px 13px; +} +.owner_block_links ul.admin_menu li ul.admin_menu_options li a:hover { + color:black; + background:none; + text-decoration: underline; +} + + +/* *************************************** + full profile info panel +*************************************** */ +#profile_content .odd { + background-color:#f4f4f4; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + margin:0 0 7px 0; + padding:2px 4px 2px 4px; +} +#profile_content .even { + background-color:#f4f4f4; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + margin:0 0 7px 0; + padding:2px 4px 2px 4px; +} +#profile_content .aboutme_title { + background-color:#f4f4f4; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + margin:0 0 0px 0; + padding:2px 4px 2px 4px; +} +#profile_content .aboutme_contents { + padding:2px 0 0 3px; +} + + +/* *************************************** + friends panel within profile +*************************************** */ +#profile_content .entity-listing .entity-listing-info { + width:664px; +} + + +/* *************************************** + commentwall within profile +*************************************** */ +#comment_wall_add textarea { + width:685px; +} +#comment_wall_add #postit { + float:right; +} + + +/* *************************************** + twitter panel within profile +*************************************** */ +ul#twitter_update_list { + padding-left:0; +} +ul#twitter_update_list li { + background-image: url(mod/profile/graphics/speech_bubble_tail.gif); + background-position:right bottom; + background-repeat: no-repeat; + list-style-image:none; + list-style-position:outside; + list-style-type:none; + margin:0 0 5px 0; + padding:0; + overflow-x: hidden; +} +ul#twitter_update_list li span { + color:#666666; + background:#ececec; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + padding:3px 5px 4px 5px; + display:block; +} +ul#twitter_update_list li a { + display:block; + margin:-2px 0 0 4px; +} +ul#twitter_update_list li span a { + display:inline !important; +} +p.visit_twitter a { + background:url(mod/profile/graphics/twitter16px.png) left no-repeat; + padding:0 0 0 20px; + margin:0; +} +.visit_twitter { + padding:5px 0; + margin:0 0 0 0; + border-top:1px solid #dedede; +} + +/* *************************************** + banned user +*************************************** */ +/* banned user full profile panel */ +#profile_content .banned_user { + border:2px solid red; + padding:4px 8px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; +} +/* banned user in friends lists */ +.entity-listing-info p.entity-title.user.banned { + text-decoration: line-through; +} +.entity-listing-info p.entity-title.user.banned a { + color:red; +} + + +/* *************************************** + admin area - custom profile fields +*************************************** */ +.default_profile_reset { + border-top: 1px solid #dedede; + margin-top:30px; +} +.default_profile_reset .action-button { + float:right; +} +/* field re-order */ +#sortable_profile_fields { + list-style: none; + padding:0; + margin:0; + border-top:1px solid #cccccc; +} +#sortable_profile_fields li { + padding:5px 0 5px 0; + border-bottom:1px solid #cccccc; +} +#sortable_profile_fields li img.handle { + margin-right: 7px; + cursor: move; +} +#sortable_profile_fields .ui-sortable-helper { + background: #eeeeee; + color:#333333; + padding: 5px 0 5px 0; + margin: 0; + width:100%; +} + + +/* *************************************** + avatar drop-down menu +*************************************** */ +.avatar_menu_button { + width:15px; + height:15px; + position:absolute; + cursor:pointer; + display:none; + right:0; + bottom:0; +} +.avatar_menu_arrow { + background: url(_graphics/elgg_sprites.png) no-repeat -150px top; + width:15px; + height:15px; +} +.avatar_menu_arrow_on { + background: url(_graphics/elgg_sprites.png) no-repeat -150px -16px; + width:15px; + height:15px; +} +.avatar_menu_arrow_hover { + background: url(_graphics/elgg_sprites.png) no-repeat -150px -32px; + width:15px; + height:15px; +} +/* user avatar submenu options */ +.usericon .sub_menu { + display:none; + position:absolute; + padding:0; + margin:0; + border-top:solid 1px #E5E5E5; + border-left:solid 1px #E5E5E5; + border-right:solid 1px #999999; + border-bottom:solid 1px #999999; + width:164px; + background:#FFFFFF; + text-align:left; + -webkit-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.50); + -moz-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.50); + font-size:14px; +} +div.usericon a.icon img { + z-index:10; +} +.usericon .sub_menu a:link, +.usericon .sub_menu a:visited, +.usericon .sub_menu a:hover { + display:block; + font-weight: normal; +} +.usericon .sub_menu a:hover { + background:#cccccc; + text-decoration:none; +} +.usericon .sub_menu .displayname { + padding:0 !important; + margin:0 !important; + border-bottom:solid 1px #dddddd !important; + font-size:14px !important; +} +.usericon .sub_menu .displayname a { + padding:3px 3px 3px 8px; + font-size:14px; + font-weight: bold; +} +.usericon .sub_menu .displayname a .username { + display:block; + font-weight: normal; + font-size:12px; + text-align: left; + margin:0; +} +.sub_menu ul.sub_menu_list { + list-style: none; + margin-bottom:0; + padding-left:0; +} +.usericon .sub_menu a { + padding:2px 3px 2px 8px; + font-size:12px; +} +/* admin menu options in avatar submenu */ +.user_menu_admin { + border-top:solid 1px #dddddd; +} +.usericon .sub_menu li.user_menu_admin a { + color:red; +} +.usericon .sub_menu li.user_menu_admin a:hover { + color:white; + background:red; +} diff --git a/mod/tabbed_profile/views/default/profile/hoverover.php b/mod/tabbed_profile/views/default/profile/hoverover.php new file mode 100644 index 000000000..172ef5d3d --- /dev/null +++ b/mod/tabbed_profile/views/default/profile/hoverover.php @@ -0,0 +1,16 @@ + +
  • + name; ?> +
  • + \ No newline at end of file diff --git a/mod/tabbed_profile/views/default/profile/icon.php b/mod/tabbed_profile/views/default/profile/icon.php new file mode 100644 index 000000000..71b25fe6c --- /dev/null +++ b/mod/tabbed_profile/views/default/profile/icon.php @@ -0,0 +1,111 @@ +name, ENT_QUOTES, 'UTF-8'); + $username = $vars['entity']->username; + + if ($icontime = $vars['entity']->icontime) { + $icontime = "{$icontime}"; + } else { + $icontime = "default"; + } + + // Get size + if (!in_array($vars['size'],array('small','medium','large','tiny','master','topbar'))) { + $vars['size'] = 'medium'; + } + + // Get any align and js + if (!empty($vars['align'])) { + $align = " align=\"{$vars['align']}\" "; + } else { + $align = ''; + } + + // Override + if (isset($vars['override']) && $vars['override'] == true) { + $override = true; + } else { + $override = false; + } + // profile avatar drop-down menu + if (!$override) { + ?> +
    +
    + + isBanned())) { + ?> + alt="name, ENT_QUOTES, 'UTF-8'); ?>" title="name, ENT_QUOTES, 'UTF-8'); ?>" style="background: url(getIcon($vars['size']); ?>) no-repeat;" class="" /> + getIcon($vars['size'])); ?>" border="0" alt="name, ENT_QUOTES, 'UTF-8'); ?>" title="name, ENT_QUOTES, 'UTF-8'); ?>" /> + */ + + if (!$override) { + ?> +
    + + +var submenuLayer = 1000; + +function setup_avatar_menu(parent) { + if (!parent) { + parent = document; + } + + // avatar image menu link + $(parent).find("div.usericon img").mouseover(function() { + // find nested avatar_menu_button and show + $(this.parentNode.parentNode).children(".avatar_menu_button").show(); + $(this.parentNode.parentNode).children("div.avatar_menu_button").addClass("avatar_menu_arrow"); + //$(this.parentNode.parentNode).css("z-index", submenuLayer); + }) + .mouseout(function() { + if($(this).parent().parent().find("div.sub_menu").css('display')!="block") { + $(this.parentNode.parentNode).children("div.avatar_menu_button").removeClass("avatar_menu_arrow"); + $(this.parentNode.parentNode).children("div.avatar_menu_button").removeClass("avatar_menu_arrow_on"); + $(this.parentNode.parentNode).children("div.avatar_menu_button").removeClass("avatar_menu_arrow_hover"); + $(this.parentNode.parentNode).children(".avatar_menu_button").hide(); + } + else { + $(this.parentNode.parentNode).children("div.avatar_menu_button").removeClass("avatar_menu_arrow"); + $(this.parentNode.parentNode).children("div.avatar_menu_button").removeClass("avatar_menu_arrow_on"); + $(this.parentNode.parentNode).children("div.avatar_menu_button").removeClass("avatar_menu_arrow_hover"); + $(this.parentNode.parentNode).children(".avatar_menu_button").show(); + $(this.parentNode.parentNode).children("div.avatar_menu_button").addClass("avatar_menu_arrow"); + } + }); + + + // avatar contextual menu + $(".avatar_menu_button img").click(function(e) { + + var submenu = $(this).parent().parent().find("div.sub_menu"); + + // close submenu if arrow is clicked & menu already open + if(submenu.css('display') == "block") { + //submenu.hide(); + } + else { + // get avatar dimensions + var avatar = $(this).parent().parent().parent().find("div.usericon"); + //alert( "avatarWidth: " + avatar.width() + ", avatarHeight: " + avatar.height() ); + + // move submenu position so it aligns with arrow graphic + if (e.pageX < 840) { // popup menu to left of arrow if we're at edge of page + submenu.css("top",(avatar.height()) + "px") + .css("left",(avatar.width()-15) + "px") + .fadeIn('normal'); + } + else { + submenu.css("top",(avatar.height()) + "px") + .css("left",(avatar.width()-166) + "px") + .fadeIn('normal'); + } + + // force z-index - workaround for IE z-index bug + avatar.css("z-index", submenuLayer); + avatar.find("a.icon img").css("z-index", submenuLayer); + submenu.css("z-index", submenuLayer+1); + + submenuLayer++; + + // change arrow to 'on' state + $(this.parentNode.parentNode).children("div.avatar_menu_button").removeClass("avatar_menu_arrow"); + $(this.parentNode.parentNode).children("div.avatar_menu_button").removeClass("avatar_menu_arrow_hover"); + $(this.parentNode.parentNode).children("div.avatar_menu_button").addClass("avatar_menu_arrow_on"); + } + + // hide any other open submenus and reset arrows + $("div.sub_menu:visible").not(submenu).hide(); + $(".avatar_menu_button").removeClass("avatar_menu_arrow"); + $(".avatar_menu_button").removeClass("avatar_menu_arrow_on"); + $(".avatar_menu_button").removeClass("avatar_menu_arrow_hover"); + $(".avatar_menu_button").hide(); + $(this.parentNode.parentNode).children("div.avatar_menu_button").addClass("avatar_menu_arrow_on"); + $(this.parentNode.parentNode).children("div.avatar_menu_button").show(); + //alert("submenuLayer = " +submenu.css("z-index")); + }) + // hover arrow each time mouseover enters arrow graphic (eg. when menu is already shown) + .mouseover(function() { + $(this.parentNode.parentNode).children("div.avatar_menu_button").removeClass("avatar_menu_arrow_on"); + $(this.parentNode.parentNode).children("div.avatar_menu_button").removeClass("avatar_menu_arrow"); + $(this.parentNode.parentNode).children("div.avatar_menu_button").addClass("avatar_menu_arrow_hover"); + }) + // if menu not shown revert arrow, else show 'menu open' arrow + .mouseout(function() { + if($(this).parent().parent().find("div.sub_menu").css('display')!="block"){ + $(this.parentNode.parentNode).children("div.avatar_menu_button").removeClass("avatar_menu_arrow_hover"); + $(this.parentNode.parentNode).children("div.avatar_menu_button").removeClass("avatar_menu_arrow"); + $(this.parentNode.parentNode).children("div.avatar_menu_button").addClass("avatar_menu_arrow"); + } + else { + $(this.parentNode.parentNode).children("div.avatar_menu_button").removeClass("avatar_menu_arrow_hover"); + $(this.parentNode.parentNode).children("div.avatar_menu_button").removeClass("avatar_menu_arrow"); + $(this.parentNode.parentNode).children("div.avatar_menu_button").addClass("avatar_menu_arrow_on"); + } + }); + + // hide avatar menu if click occurs outside of menu + // and hide arrow button + $(document).click(function(event) { + var target = $(event.target); + if (target.parents(".usericon").length == 0) { + $(".usericon div.sub_menu").fadeOut(); + $(".avatar_menu_button").removeClass("avatar_menu_arrow"); + $(".avatar_menu_button").removeClass("avatar_menu_arrow_on"); + $(".avatar_menu_button").removeClass("avatar_menu_arrow_hover"); + $(".avatar_menu_button").hide(); + } + }); + + +} + +$(document).ready(function() { + + setup_avatar_menu(); + +}); diff --git a/mod/tabbed_profile/views/default/profile/listing.php b/mod/tabbed_profile/views/default/profile/listing.php new file mode 100644 index 000000000..0622264b8 --- /dev/null +++ b/mod/tabbed_profile/views/default/profile/listing.php @@ -0,0 +1,49 @@ + $vars['entity'], + 'size' => 'tiny', + ) +); + +$banned = $vars['entity']->isBanned(); + +// Simple XFN +$rel_type = ""; +if (get_loggedin_userid() == $vars['entity']->guid) { + $rel_type = 'me'; +} elseif (check_entity_relationship(get_loggedin_userid(), 'friend', $vars['entity']->guid)) { + $rel_type = 'friend'; +} + +if ($rel_type) { + $rel = "rel=\"$rel_type\""; +} + +if (!$banned) { + $info .= "

    getUrl() . "\" $rel>" . $vars['entity']->name . "

    "; + $location = $vars['entity']->location; + if (!empty($location)) { + $info .= "

    " . elgg_echo("profile:location") . ": " . elgg_view("output/tags",array('value' => $vars['entity']->location)) . "

    "; + } + //create a view that a status plugin could extend - in the default case, this is the wire + $info .= elgg_view("profile/status", array("entity" => $vars['entity'])); +}else{ + $info .= "

    "; + if (isadminloggedin()) + $info .= "getUrl() . "\">"; + $info .= $vars['entity']->name; + if (isadminloggedin()) + $info .= ""; + $info .= "

    "; +} + +echo elgg_view_listing($icon, $info); diff --git a/mod/tabbed_profile/views/default/profile/menu/adminlinks.php b/mod/tabbed_profile/views/default/profile/menu/adminlinks.php new file mode 100644 index 000000000..39807764a --- /dev/null +++ b/mod/tabbed_profile/views/default/profile/menu/adminlinks.php @@ -0,0 +1,28 @@ +guid){ +?> + +isBanned()) { + echo elgg_view('output/confirmlink', array('text' => elgg_echo("ban"), 'href' => "action/admin/user/ban?guid={$vars['entity']->guid}")); + } else { + echo elgg_view('output/confirmlink', array('text' => elgg_echo("unban"), 'href' => "action/admin/user/unban?guid={$vars['entity']->guid}")); + } + echo elgg_view('output/confirmlink', array('text' => elgg_echo("delete"), 'href' => "action/admin/user/delete?guid={$vars['entity']->guid}")); + echo elgg_view('output/confirmlink', array('text' => elgg_echo("resetpassword"), 'href' => "action/admin/user/resetpassword?guid={$vars['entity']->guid}")); + if (!$vars['entity']->isAdmin()) { + echo elgg_view('output/confirmlink', array('text' => elgg_echo("makeadmin"), 'href' => "action/admin/user/makeadmin?guid={$vars['entity']->guid}")); + } else { + echo elgg_view('output/confirmlink', array('text' => elgg_echo("removeadmin"), 'href' => "action/admin/user/removeadmin?guid={$vars['entity']->guid}")); + } + } + } diff --git a/mod/tabbed_profile/views/default/profile/menu/friendlinks.php b/mod/tabbed_profile/views/default/profile/menu/friendlinks.php new file mode 100644 index 000000000..ed13edb8b --- /dev/null +++ b/mod/tabbed_profile/views/default/profile/menu/friendlinks.php @@ -0,0 +1,23 @@ +isFriend()) { + echo elgg_view('output/confirmlink', array( + 'href' => "action/friends/remove?friend={$vars['entity']->getGUID()}", + 'text' => elgg_echo('friend:remove'), + 'class' => 'remove_friend' + )); +} else { + echo elgg_view('output/confirmlink', array( + 'href' => "action/friends/add?friend={$vars['entity']->getGUID()}", + 'text' => elgg_echo('friend:add'), + 'class' => 'add_friend' + )); +} \ No newline at end of file diff --git a/mod/tabbed_profile/views/default/profile/menu/links.php b/mod/tabbed_profile/views/default/profile/menu/links.php new file mode 100644 index 000000000..4233d7ec5 --- /dev/null +++ b/mod/tabbed_profile/views/default/profile/menu/links.php @@ -0,0 +1,9 @@ + diff --git a/mod/tabbed_profile/views/default/profile/metatags.php b/mod/tabbed_profile/views/default/profile/metatags.php new file mode 100644 index 000000000..1197a2e0a --- /dev/null +++ b/mod/tabbed_profile/views/default/profile/metatags.php @@ -0,0 +1,14 @@ + + +container_guid); + } else { + $user = get_entity($vars['entity']->guid); + } +} else { + $user = elgg_get_page_owner(); +} +if (!$user) { + // no user so we quit view + echo elgg_echo('viewfailure', array(__FILE__)); + return TRUE; +} + +$more_info = ''; + +$location = elgg_view("output/tags",array('value' => $user->location)); +$section = $vars['section']; +if ($section == 'details') { + $icon = elgg_view("profile/icon",array('entity' => $user, 'size' => 'large', 'override' => 'true')); + $icon_class = "large"; +} else { + $icon = elgg_view("profile/icon",array('entity' => $user, 'size' => 'small')); + $more_info = "
    "; + $more_info .= "

    {$user->name}

    "; + $more_info .= "

    {$user->briefdescription}

    "; + $more_info .= "

    {$location}

    "; + $more_info .= "
    "; +} +$profile_actions = ""; +if (isloggedin() && (get_loggedin_userid() == elgg_get_page_owner_guid())) { + $profile_actions = "
    "; + $profile_actions .= "". elgg_echo('profile:edit') .""; + $profile_actions .= "". elgg_echo('avatar:edit') .""; + $profile_actions .= "
    "; +} else { + $profile_actions = "
    "; + if (isloggedin()) { + if (get_loggedin_userid() != $user->getGUID()) { + if ($user->isFriend()) { + $url = elgg_get_site_url()."action/friends/remove?friend={$user->getGUID()}"; + $url = elgg_add_action_tokens_to_url($url); + $profile_actions .= "" . elgg_echo('friend:remove') . ""; + } else { + $url = elgg_get_site_url()."action/friends/add?friend={$user->getGUID()}"; + $url = elgg_add_action_tokens_to_url($url); + $profile_actions .= "" . elgg_echo('friend:add') . ""; + } + } + } + if (is_plugin_enabled('messages') && isloggedin()) { + $profile_actions .= "guid}\" class='action-button'>". elgg_echo('messages:send') .""; + } + $profile_actions .= "
    "; +} + +$username = $user->username; +$email = $user->email; +$phone = $user->phone; + + +//if admin display admin links +if (isadminloggedin()) { + $admin_links = elgg_view('profile/admin_menu'); +} else { + $admin_links = ''; +} + + +//check tools are enabled - hard-coded for phase1 +// @todo - provide a view to extend for profile pages ownerblock tool-links +if(is_plugin_enabled('blog')){ + $blog_link = "
  • Blog
  • "; +}else{ + $blog_link = ""; +} +if(is_plugin_enabled('bookmarks')){ + $bookmark_link = "
  • Bookmarks
  • "; +}else{ + $bookmark_link = ""; +} +if(is_plugin_enabled('document')){ + $docs_link = "
  • Documents
  • "; +}else{ + $docs_link = ""; +} +if(is_plugin_enabled('feeds')){ + $feeds_link = "
  • Feeds
  • "; +}else{ + $feeds_link = ""; +} +if(is_plugin_enabled('tidypics')){ + $tidypics_link = "
  • Photos
  • "; +}else{ + $tidypics_link = ""; +} +if(is_plugin_enabled('videolist')){ + $video_link = "
  • Videos
  • "; +}else{ + $video_link = ""; +} + +//contruct the display +$display = << +
    + {$icon} +
    + {$more_info} + {$profile_actions} + + + {$admin_links} + + +EOT; + +echo $display; diff --git a/mod/tabbed_profile/views/default/profile/sidebar.php b/mod/tabbed_profile/views/default/profile/sidebar.php new file mode 100644 index 000000000..525a2da81 --- /dev/null +++ b/mod/tabbed_profile/views/default/profile/sidebar.php @@ -0,0 +1,13 @@ + +
    + $section)); +?> +
    \ No newline at end of file diff --git a/mod/tabbed_profile/views/default/profile/tab_navigation.php b/mod/tabbed_profile/views/default/profile/tab_navigation.php new file mode 100755 index 000000000..ca0873ebd --- /dev/null +++ b/mod/tabbed_profile/views/default/profile/tab_navigation.php @@ -0,0 +1,68 @@ +getURL()}/"; + +//select section +switch($section){ + case 'friends': + $friends = 'class="selected"'; + break; + + case 'details': + $details = 'class="selected"'; + break; + case 'groups': + $groups = 'class="selected"'; + break; + case 'twitter': + $twitter = 'class="selected"'; + break; + + case 'commentwall': + $commentwall = 'class="selected"'; + break; + case 'activity': + default: + $activity = 'class="selected"'; + break; +} +?> +
    +

    name; ?>

    +
      +
    • >
    • +
    • >
    • +
    • >
    • +
    • >
    • +
    • >
    • + twitter){ + ?> +
    • >Twitter
    • + $user)); + ?> +
    +
    \ No newline at end of file diff --git a/mod/tabbed_profile/views/default/profile/tabs/activity.php b/mod/tabbed_profile/views/default/profile/tabs/activity.php new file mode 100755 index 000000000..ccd2a3915 --- /dev/null +++ b/mod/tabbed_profile/views/default/profile/tabs/activity.php @@ -0,0 +1,32 @@ + $vars['entity'])); +} + +if (is_plugin_enabled('conversations')) { + // users last status msg, if they posted one + echo elgg_view("profile/status", array("entity" => $vars['entity'])); +} + +if (is_plugin_enabled('riverdashboard')) { + //select the correct river + if (get_plugin_setting('activitytype', 'riverdashboard') == 'classic') { + echo elgg_view_river_items($vars['entity']->getGuid(), 0, '', '', '', '', $limit,0,0,false,true); + } else { + echo elgg_view_river_items($vars['entity']->getGuid(), 0, '', '', '', '', $limit,0,0,false,false); + echo elgg_view('riverdashboard/js'); + } +} else { + // @todo this should not be here. + echo "Riverdashboard not loaded"; +} \ No newline at end of file diff --git a/mod/tabbed_profile/views/default/profile/tabs/commentwall.php b/mod/tabbed_profile/views/default/profile/tabs/commentwall.php new file mode 100644 index 000000000..bf54bd7e7 --- /dev/null +++ b/mod/tabbed_profile/views/default/profile/tabs/commentwall.php @@ -0,0 +1,13 @@ +getAnnotations('commentwall', 200, 0, 'desc'); + +if (isloggedin()) { + echo elgg_view("profile/commentwall/commentwalladd"); +} + +echo elgg_view("profile/commentwall/commentwall", array('annotation' => $comments)); diff --git a/mod/tabbed_profile/views/default/profile/tabs/details.php b/mod/tabbed_profile/views/default/profile/tabs/details.php new file mode 100755 index 000000000..27b0f943b --- /dev/null +++ b/mod/tabbed_profile/views/default/profile/tabs/details.php @@ -0,0 +1,41 @@ +profile) && sizeof($vars['config']->profile) > 0) { + foreach($vars['config']->profile as $shortname => $valtype) { + if ($shortname != "description") { + $value = $vars['entity']->$shortname; + if (!empty($value)) { + //This function controls the alternating class + $even_odd = ( 'odd' != $even_odd ) ? 'odd' : 'even'; + ?> +

    + : + $vars['entity']->$shortname)); + ?> +

    + isBanned()) { + echo "
    "; + echo elgg_echo('profile:banned'); + echo "
    "; + } else { + if ($vars['entity']->description) { + echo "

    " . elgg_echo("profile:aboutme") . "

    "; + echo "
    " . elgg_view('output/longtext', array('value' => $vars['entity']->description)) . "
    "; + } + } +} diff --git a/mod/tabbed_profile/views/default/profile/tabs/friends.php b/mod/tabbed_profile/views/default/profile/tabs/friends.php new file mode 100755 index 000000000..9195629e5 --- /dev/null +++ b/mod/tabbed_profile/views/default/profile/tabs/friends.php @@ -0,0 +1,12 @@ +getGUID(), FALSE, 'user', '', 0, 10, FALSE); + +if(!$friends) { + $friends = '

    ' . elgg_echo('profile:no_friends') . '

    '; +} + +echo $friends; \ No newline at end of file diff --git a/mod/tabbed_profile/views/default/profile/tabs/groups.php b/mod/tabbed_profile/views/default/profile/tabs/groups.php new file mode 100644 index 000000000..323bb61f1 --- /dev/null +++ b/mod/tabbed_profile/views/default/profile/tabs/groups.php @@ -0,0 +1,11 @@ +getGUID(),false,'group','',0, $limit,false, false); + +if(!$groups) { + $groups = '

    ' . elgg_echo('profile:no_groups') . '

    '; +} + +echo $groups; \ No newline at end of file diff --git a/mod/tabbed_profile/views/default/profile/tabs/twitter.php b/mod/tabbed_profile/views/default/profile/tabs/twitter.php new file mode 100755 index 000000000..06a0551d4 --- /dev/null +++ b/mod/tabbed_profile/views/default/profile/tabs/twitter.php @@ -0,0 +1,17 @@ +twitter; + +// if the twitter username is empty, then do not show +if($twitter_username){ +?> + +

    + + + +