// Extend CSS
elgg_extend_view('css', 'file/css');
- // Extend hover-over and profile menu
- elgg_extend_view('profile/menu/links','file/menu');
-
// extend group main page
elgg_extend_view('groups/left_column','file/groupprofile_files');
+++ /dev/null
-<?php
-
- /**
- * Elgg hoverover extender for file
- *
- * @package ElggFile
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @copyright Curverider Ltd 2008-2010
- * @link http://elgg.com/
- */
-
-?>
-
- <li class="user_menu_file">
- <a href="<?php echo $vars['url']; ?>pg/file/<?php echo $vars['entity']->username; ?>"><?php echo elgg_echo("file"); ?></a>
- </li>
\ No newline at end of file
// Register a URL handler for shouts posts
register_entity_url_handler('messages_url','object','messages');
- // Extend hover-over and profile menu
+ // Extend avatar user-menu
elgg_extend_view('profile/menu/links','messages/menu');
// Register a notification handler for site messages
* @copyright Curverider Ltd 2008-2010
* @link http://elgg.com/
*/
-
- //need to be logged in to send a message
- if (isloggedin()) {
-?>
- <li class="user_menu_messages">
- <a href="<?php echo $vars['url']; ?>mod/messages/send.php?send_to=<?php echo $vars['entity']->guid; ?>"><?php echo elgg_echo("messages:sendmessage"); ?></a>
- </li>
-
-<?php
-}
\ No newline at end of file
+// login check already performed in profile/icon
+?>
+<li class="user_menu_profile">
+ <a class="send_message" href="<?php echo $vars['url']; ?>mod/messages/send.php?send_to=<?php echo $vars['entity']->guid; ?>"><?php echo elgg_echo("messages:sendmessage"); ?></a>
+</li>
\ No newline at end of file
add_menu(elgg_echo('pages'), $CONFIG->wwwroot . "mod/pages/world.php");
}
- // Extend hover-over menu
- elgg_extend_view('profile/menu/links','pages/menu');
-
// Register a page handler, so we can have nice URLs
register_page_handler('pages','pages_page_handler');
+++ /dev/null
-<?php
- /**
- * Elgg Pages: Add group menu
- *
- * @package ElggPages
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd
- * @copyright Curverider Ltd 2008-2010
- * @link http://elgg.com/
- */
-?>
-<li class="user_menu_pages">
- <a href="<?php echo $vars['url']; ?>pg/pages/owned/<?php echo $vars['entity']->username; ?>"><?php echo elgg_echo("pages"); ?></a>
-</li>
\ No newline at end of file
'profile:user' => "%s's profile",
'profile:edit' => "Edit profile",
- 'profile:profilepictureinstructions' => "The profile picture is the image that's displayed on your profile page. <br /> You can change it as often as you'd like. (File formats accepted: GIF, JPG or PNG)",
- 'profile:icon' => "Profile picture",
+ 'profile:profilepictureinstructions' => "Your avatar is the image that's displayed on your profile page. <br /> You can change it as often as you'd like. (File formats accepted: GIF, JPG or PNG)",
+ 'profile:icon' => "Avatar",
'profile:createicon' => "Create your avatar",
'profile:currentavatar' => "Current avatar",
'profile:createicon:header' => "Profile picture",
- 'profile:profilepicturecroppingtool' => "Profile picture cropping tool",
- 'profile:createicon:instructions' => "Click and drag a square below to match how you want your picture cropped. A preview of your cropped picture will appear in the box on the right. When you are happy with the preview, click 'Create your avatar'. This cropped image will be used throughout the site as your avatar. ",
+ 'profile:profilepicturecroppingtool' => "Avatar cropping tool",
+ 'profile:createicon:instructions' => "Click and drag a square below to match how you want your avatar cropped. A preview will appear in the box on the right. When you are happy with the preview, click 'Create your avatar'. This cropped version will be used throughout the site as your avatar. ",
- 'profile:editdetails' => "Edit details",
- 'profile:editicon' => "Edit profile icon",
+ 'profile:editdetails' => "Edit profile",
+ 'profile:editicon' => "Edit avatar",
'profile:aboutme' => "About me",
'profile:description' => "About me",
elgg_extend_view('css', 'profile/css');
elgg_extend_view('js/initialise_elgg', 'profile/javascript');
- if (get_context() == 'profile') {
- elgg_extend_view('canvas_header/submenu', 'profile/submenu');
- }
-
- // Extend context menu with admin links
- if (isadminloggedin()){
- elgg_extend_view('profile/menu/links', 'profile/menu/adminwrapper', 10000);
- }
-
// Now override icons
register_plugin_hook('entity:icon:url', 'user', 'profile_usericon_hook');
width:164px;
background:#FFFFFF;
text-align:left;
- -webkit-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.50); /* safari v3+ */
- -moz-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.50); /* FF v3.5+ */
+ -webkit-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.50);
+ -moz-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.50);
}
div.usericon a.icon img {
z-index:10;
background:#cccccc;
text-decoration:none;
}
-.usericon .sub_menu h3 {
- font-size:1.3em;
- line-height: 1.1em;
+.usericon .sub_menu h3.displayname {
+ font-size:1.3em !important; /* make sure nothing overrides our sub menu h3 */
+ line-height: 1.1em !important;
padding:0 !important;
margin:0 !important;
- border-bottom:solid 1px #dddddd;
- color: #4690d6;
+ border-bottom:solid 1px #dddddd !important;
}
-.usericon .sub_menu h3 a {
+.usericon .sub_menu h3.displayname a {
padding:3px 3px 3px 8px;
}
+.usericon .sub_menu h3.displayname a .username {
+ display:block;
+ font-weight: normal;
+ font-size: 0.8em;
+}
.usericon .sub_menu a {
padding:2px 3px 2px 8px;
}
// Override
if (isset($vars['override']) && $vars['override'] == true) {
$override = true;
- } else $override = false;
-
+ } else {
+ $override = false;
+ }
+ // profile avatar drop-down menu
if (!$override) {
-
-?>
-<div class="usericon <?php echo $vars['size']; ?>">
-<div class="avatar_menu_button"><img src="<?php echo $vars['url']; ?>_graphics/spacer.gif" border="0" width="15px" height="15px" /></div>
-
- <div class="sub_menu">
- <h3><a href="<?php echo $vars['entity']->getURL(); ?>"><?php echo $vars['entity']->name; ?></a></h3>
- <?php
- echo "<ul class='sub_menu_list'>";
- if (isloggedin()) {
- $actions = elgg_view('profile/menu/actions',$vars);
- if (!empty($actions)) {
- echo "<li class='user_menu_addremovefriend'>{$actions}</li>";
- }
- if ($vars['entity']->getGUID() == $vars['user']->getGUID()) {
- echo elgg_view('profile/menu/linksownpage',$vars);
- } else {
- echo elgg_view('profile/menu/links',$vars);
- }
- } else {
- echo elgg_view('profile/menu/links',$vars);
- }
- echo "</ul>";
?>
- </div>
- <?php
- if ((isadminloggedin()) || (!$vars['entity']->isBanned())) {
- ?><a href="<?php echo $vars['entity']->getURL(); ?>" class="icon" ><?php
- }
+ <div class="usericon <?php echo $vars['size']; ?>">
+ <div class="avatar_menu_button"><img src="<?php echo $vars['url']; ?>_graphics/spacer.gif" border="0" width="15px" height="15px" /></div>
+ <div class="sub_menu">
+ <h3 class="displayname"><a href="<?php echo $vars['entity']->getURL(); ?>"><?php echo $vars['entity']->name; ?>
+ <span class="username"><?php echo "@".$vars['entity']->username; ?></span>
+ </a></h3>
+ <?php
+ echo "<ul class='sub_menu_list'>";
+ if (isloggedin()) {
+ // if not looking at your own avatar menu
+ if ($vars['entity']->getGUID() != $vars['user']->getGUID()) {
+
+ // Add / Remove friend link
+ $friendlinks = elgg_view('profile/menu/friendlinks',$vars);
+ if (!empty($friendlinks)) {
+ echo "<li class='user_menu_profile'>{$friendlinks}</li>";
+ }
+ // view for plugins to extend
+ echo elgg_view('profile/menu/links',$vars);
+ } else {
+ // if looking at your own avatar menu - provide a couple of handy links
+ ?>
+ <li class="user_menu_profile">
+ <a class="edit_profile" href="<?php echo $vars['url']?>pg/profile/<?php echo $vars['entity']->username; ?>/edit/details"><?php echo elgg_echo("profile:edit"); ?></a>
+ </li>
+ <li class="user_menu_profile">
+ <a class="edit_avatar" href="<?php echo $vars['url']?>pg/profile/<?php echo $vars['entity']->username; ?>/edit/icon"><?php echo elgg_echo("profile:editicon"); ?></a>
+ </li>
+ <?php
+ }
+
+ // if Admin is logged in, and not looking at admins own avatar menu
+ if (isadminloggedin() && ($_SESSION['id']!=$vars['entity']->guid) ){
+ $adminlinks = elgg_view('profile/menu/adminlinks', $vars);
+ if (!empty($adminlinks)) {
+ echo "<li class='user_menu_admin'>{$adminlinks}</li>";
+ }
+ }
+
+ }
+ echo "</ul>";
+ ?>
+ </div>
+ <?php
+ if ((isadminloggedin()) || (!$vars['entity']->isBanned())) {
+ ?><a href="<?php echo $vars['entity']->getURL(); ?>" class="icon" ><?php
+ }
}
?><img src="<?php echo $vars['entity']->getIcon($vars['size']); ?>" border="0" <?php echo $align; ?> alt="<?php echo htmlentities($vars['entity']->name, ENT_QUOTES, 'UTF-8'); ?>" title="<?php echo htmlentities($vars['entity']->name, ENT_QUOTES, 'UTF-8'); ?>" <?php echo $vars['js']; ?> /><?php
- if (!$override) {
-
- ?></a>
-</div>
-
-<?php
-
+ if (!$override) {
+ ?>
+ </a></div>
+ <?php
}
}
\ No newline at end of file
+++ /dev/null
-<?php
-/**
- * Elgg profile icon hover over: actions
- *
- * @package ElggProfile
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd <info@elgg.com>
- * @copyright Curverider Ltd 2008-2010
- * @link http://elgg.com/
- *
- * @uses $vars['entity'] The user entity. If none specified, the current user is assumed.
- */
-
-if (isloggedin()) {
- if ($_SESSION['user']->getGUID() != $vars['entity']->getGUID()) {
- $ts = time();
- $token = generate_action_token($ts);
- if ($vars['entity']->isFriend()) {
- echo elgg_view('output/confirmlink', array(
- 'href' => "{$vars['url']}action/friends/remove?friend={$vars['entity']->getGUID()}",
- 'text' => elgg_echo('friend:remove'),
- 'class' => 'user_menu_removefriend'
- ));
- } else {
- echo elgg_view('output/confirmlink', array(
- 'href' => "{$vars['url']}action/friends/add?friend={$vars['entity']->getGUID()}",
- 'text' => elgg_echo('friend:add'),
- 'class' => 'user_menu_addfriend'
- ));
- }
- }
-}
\ No newline at end of file
+++ /dev/null
-<?php
-/**
- * Wraps the admin links
- *
- * @package ElggProfile
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd
- * @copyright Curverider Ltd 2008-2010
- * @link http://elgg.com/
- *
- */
-
-$adminlinks = elgg_view('profile/menu/adminlinks', $vars);
-
-if (!empty($adminlinks)) {
- echo "<li class='user_menu_admin'>{$adminlinks}</li>";
-}
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Elgg profile icon avatar menu: Add / Remove friend links
+ *
+ * @package ElggProfile
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd <info@elgg.com>
+ * @copyright Curverider Ltd 2008-2010
+ * @link http://elgg.com/
+ *
+ * @uses $vars['entity'] The user entity. If none specified, the current user is assumed.
+ */
+$ts = time();
+$token = generate_action_token($ts);
+if ($vars['entity']->isFriend()) {
+ echo elgg_view('output/confirmlink', array(
+ 'href' => "{$vars['url']}action/friends/remove?friend={$vars['entity']->getGUID()}",
+ 'text' => elgg_echo('friend:remove'),
+ 'class' => 'remove_friend'
+ ));
+} else {
+ echo elgg_view('output/confirmlink', array(
+ 'href' => "{$vars['url']}action/friends/add?friend={$vars['entity']->getGUID()}",
+ 'text' => elgg_echo('friend:add'),
+ 'class' => 'add_friend'
+ ));
+}
\ No newline at end of file
<?php
/**
- * Elgg profile icon hover over: passive links
+ * Elgg profile icon avatar menu: view for plugins to extend
*
* @package ElggProfile
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
* @uses $vars['entity'] The user entity. If none specified, the current user is assumed.
*/
?>
-
-<li class="user_menu_profile">
- <a href="<?php echo $vars['entity']->getURL(); ?>"><?php echo elgg_echo("profile"); ?></a>
-</li>
-<?php
- if ($vars['entity']->canEdit()){
-?>
- <li class="user_menu_profile">
- <a href="<?php echo $vars['url']?>pg/profile/<?php echo $vars['entity']->username; ?>/edit/icon"><?php echo elgg_echo("profile:editicon"); ?></a>
- </li>
-<?php
- }
-?>
-<li class="user_menu_friends">
- <a href="<?php echo $vars['url']; ?>pg/friends/<?php echo $vars['entity']->username; ?>/"><?php echo elgg_echo("friends"); ?></a>
-</li>
-<li class="user_menu_friends_of">
- <a href="<?php echo $vars['url']; ?>pg/friendsof/<?php echo $vars['entity']->username; ?>/"><?php echo elgg_echo("friends:of"); ?></a>
-</li>
+++ /dev/null
-<?php
-/**
- * Elgg profile icon / profile links: passive links when looking at your own icon / profile
- *
- * @package ElggProfile
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd <info@elgg.com>
- * @copyright Curverider Ltd 2008-2010
- * @link http://elgg.com/
- *
- * @uses $vars['entity'] The user entity. If none specified, the current user is assumed.
- */
-?>
-<?php
- if ($vars['entity']->canEdit()){
-?>
- <li class="user_menu_profile">
- <a href="<?php echo $vars['url']?>pg/profile/<?php echo $vars['entity']->username; ?>/edit/icon"><?php echo elgg_echo("profile:editicon"); ?></a>
- </li>
-<?php
- }
-?>
-<li class="user_menu_friends">
- <a href="<?php echo $vars['url']; ?>pg/friends/<?php echo $vars['entity']->username; ?>/"><?php echo elgg_echo("friends"); ?></a>
-</li>
-<li class="user_menu_friends_of">
- <a href="<?php echo $vars['url']; ?>pg/friendsof/<?php echo $vars['entity']->username; ?>/"><?php echo elgg_echo("friends:of"); ?></a>
-</li>
-
$profile_actions = "";
if(get_loggedin_user()->getGuid() == page_owner()){
$profile_actions = "<div class='clearfloat profile_actions'>";
- $profile_actions .= "<a href='{$vars['url']}pg/profile/{$user->username}/edit/details' class='action_button'>Edit profile</a>";
- $profile_actions .= "<a href='{$vars['url']}pg/profile/{$user->username}/edit/icon' class='action_button'>Edit profile icon</a>";
+ $profile_actions .= "<a href='{$vars['url']}pg/profile/{$user->username}/edit/details' class='action_button'>". elgg_echo('profile:edit') ."</a>";
+ $profile_actions .= "<a href='{$vars['url']}pg/profile/{$user->username}/edit/icon' class='action_button'>". elgg_echo('profile:editicon') ."</a>";
$profile_actions .= "</div>";
}else{
$profile_actions = "<div class='profile_actions'>";
+++ /dev/null
-<?php
-
- /**
- * Elgg profile submenu links
- * These sit in the submenu when the profile editing is on view
- *
- * @package Elgg
- * @subpackage Core
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd
- * @copyright Curverider Ltd 2008-2010
- * @link http://elgg.org/
- *
- */
-
-?>
-
-<ul class="submenu profilelinks">
- <li><a href="<?php echo $CONFIG->wwwroot . "mod/profile/edit.php"; ?>"><?php echo elgg_echo('profile:details'); ?></a></li>
- <li><a href="<?php echo $CONFIG->wwwroot."mod/profile/editicon.php"; ?>"><?php echo elgg_echo('profile:editicon'); ?></a></li>
- <li><a href="<?php echo $CONFIG->wwwroot."pg/profile/" . $_SESSION['user']->username; ?>"><?php echo elgg_echo('profile:back'); ?></a></li>
-</ul>
\ No newline at end of file
-
<li class="user_menu_profile">
<?php
- echo "<a href=\"javascript:location.href='". $CONFIG->wwwroot . "mod/reportedcontent/add.php?address='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)\">" . elgg_echo('reportedcontent:report') . "</a>";
+ echo "<a class='report_this' href=\"javascript:location.href='". $CONFIG->wwwroot . "mod/reportedcontent/add.php?address='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)\">" . elgg_echo('reportedcontent:report') . "</a>";
?>
</li>
\ No newline at end of file