*/
$english = array(
-
-/**
- * Profile
- */
-
- 'profile' => "Profile",
- 'profile:edit:default' => 'Profile fields',
- 'profile:preview' => 'Preview',
-
-/**
- * Profile menu items and titles
- */
-
- 'profile:yours' => "My profile",
- 'profile:user' => "%s's profile",
-
- 'profile:edit' => "Edit profile",
- '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' => "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 profile",
- 'profile:editicon' => "Edit avatar",
-
- 'profile:aboutme' => "About me",
- 'profile:description' => "About me",
- 'profile:briefdescription' => "Brief description",
- 'profile:location' => "Location",
- 'profile:skills' => "Skills",
- 'profile:interests' => "Interests",
- 'profile:contactemail' => "Contact email",
- 'profile:phone' => "Telephone",
- 'profile:mobile' => "Mobile phone",
- 'profile:website' => "Website",
-
- 'profile:banned' => 'This user account has been suspended.',
- 'profile:deleteduser' => 'Deleted user',
-
- 'profile:river:update' => "%s updated their profile",
- 'profile:river:iconupdate' => "%s updated their profile icon",
-
- 'profile:label' => "Profile label",
- 'profile:type' => "Profile type",
- 'profile:twitter' => "Twitter username",
- 'twitter:visit' => "Visit this Twitter account",
- 'profile:editdefault:fail' => 'Default profile could not be saved',
- 'profile:editdefault:success' => 'Item successfully added to default profile',
-
-
- 'profile:editdefault:delete:fail' => 'Removed default profile item field failed',
- 'profile:editdefault:delete:success' => 'Default profile item deleted!',
-
- 'profile:defaultprofile:reset' => 'Default system profile reset',
-
- 'profile:resetdefault' => 'Reset default profile',
- 'profile:explainchangefields' => 'You can replace the existing profile fields with your own using the form below. <br /><br />Give the new profile field a label, for example, \'Favorite team\', then select the field type (eg. text, url, tags), and click the \'Add\' button. To re-order the fields drag on the handle next to the field label. To edit a field label - click on the label\'s text to make it editable. <br />At any time you can revert back to the default profile set up, but you will loose any information already entered into custom fields on profile pages.',
-
-
-/**
- * Profile status messages
- */
-
- 'profile:saved' => "Your profile was successfully saved.",
- 'profile:icon:uploaded' => "Your profile picture was successfully uploaded.",
-
-/**
- * Profile comment wall
- **/
- 'profile:commentwall:add' => "Add to the wall",
- 'profile:commentwall' => "Comment Wall",
- 'profile:commentwall:posted' => "You successfully posted on the comment wall.",
- 'profile:commentwall:deleted' => "You successfully deleted the message.",
- 'profile:commentwall:blank' => "Sorry; you need to actually put something in the message area before we can save it.",
- 'profile:commentwall:notfound' => "Sorry; we could not find the specified item.",
- 'profile:commentwall:notdeleted' => "Sorry; we could not delete this message.",
- 'profile:commentwall:none' => "No comment wall posts found.",
- 'profile:commentwall:somethingwentwrong' => "Something went wrong when trying to save your message, make sure you actually wrote a message.",
- 'profile:commentwall:failure' => "An unexpected error occurred when adding your message. Please try again.",
-
-/**
- * Email messages commentwall
- */
-
- 'profile:comment:subject' => 'You have a new message on your comment wall!',
- 'profile:comment:body' => "You have a new message on your comment wall from %s. It reads:
-
-
-%s
-
-
-To view your message board comments, click here:
-
- %s
-
-To view %s's profile, click here:
-
- %s
-
-You cannot reply to this email.",
-
-/**
- * Profile error messages
- */
-
- 'profile:no_friends' => 'This person hasn\'t added any friends yet!',
- 'profile:no_groups' => 'This user has not joined any groups yet.',
- 'profile:noaccess' => "You do not have permission to edit this profile.",
- 'profile:notfound' => "Sorry, we could not find the specified profile.",
- 'profile:icon:notfound' => "Sorry, there was a problem uploading your profile picture.",
- 'profile:icon:noaccess' => 'You cannot change this profile icon',
- 'profile:field_too_long' => 'Cannot save your profile information because the "%s" section is too long.',
+ 'profile' => 'Profile',
+ 'profile:notfound' => 'Sorry. We could not find the requested profile.',
);
elgg_register_event_handler('init', 'system', 'profile_init', 1);
/**
- * Profile init function; sets up the profile functions
- *
+ * Profile init function
*/
function profile_init() {
global $CONFIG;
elgg_extend_view('html_head/extend', 'profile/metatags');
elgg_extend_view('css/screen', 'profile/css');
-
- // Register actions
- elgg_register_action("profile/addcomment", $CONFIG->pluginspath . "profile/actions/addcomment.php");
- elgg_register_action("profile/deletecomment", $CONFIG->pluginspath . "profile/actions/deletecomment.php");
-
- elgg_register_event_handler('profileupdate', 'all', 'object_notifications');
// allow ECML in parts of the profile
elgg_register_plugin_hook_handler('get_views', 'ecml', 'profile_ecml_views_hook');
}
if ($action == 'edit') {
- // use for the core profile edit page
+ // use the core profile edit page
require $CONFIG->path . 'pages/profile/edit.php';
return;
}
// main profile page
$params = array(
- 'box' => elgg_view('profile/box'),
+ 'box' => elgg_view('profile/wrapper'),
'num_columns' => 3,
);
$content = elgg_view_layout('widgets', $params);
echo elgg_view_page($title, $body);
}
-/**
- * Returns the html for a user profile.
- *
- * @param string $username The username of the profile to display
- * @param string $section Which section is currently selected.
- *
- * @todo - This should really use a plugin hook to get the list of plugin tabs
- *
- * @return mixed FALSE or html for the profile.
- */
-function profile_get_user_profile_html($user, $section = 'activity') {
- $body = elgg_view('profile/tab_navigation', array('section' => $section, 'entity' => $user));
- $view_options = array('entity' => $user);
-
- $content = elgg_view("profile/tabs/$section", $view_options);
-
- $body .= elgg_view('profile/content_wrapper', array('content' => $content));
-
- $body .= elgg_view('profile/sidebar', array('section' => $section));
- return $body;
-}
-
/**
* Profile URL generator for $user->getUrl();
*
+++ /dev/null
-<?php
-/**
- * Profile info box
- */
-
-?>
-<div class="profile elgg-col-2of3">
- <div class="elgg-inner clearfix">
-<?php
- echo elgg_view('profile/sidebar', array('section' => 'details'));
- echo elgg_view('profile/details', array('entity' => elgg_get_page_owner()));
-?>
- </div>
-</div>
-
-<script type="text/javascript">
- $(document).ready(function() {
- $('#elgg-widget-col-1').css('min-height', $('.profile').outerHeight(true));
- //$(selector).each(function() {
- // if ($(this).height() > maxHeight) {
- // maxHeight = $(this).height();
- // }
- //})
- //$(selector).css('min-height', maxHeight);
- });
-</script>
\ No newline at end of file
<?php
/**
- * Elgg Profile
+ * Elgg Profile CSS
*
* @package Profile
*/
?>
/* ***************************************
- main layout blocks
+ Profile
*************************************** */
.profile {
float: left;
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
}
-#profile-sidebar {
- width:230px;
- float:left;
-}
#profile-details {
padding: 15px;
}
-
-/* ***************************************
- ownerblock in sidebar
-*************************************** */
+/*** ownerblock ***/
#profile-owner-block {
+ width: 200px;
+ float: left;
background-color: #eeeeee;
padding: 15px;
}
-.owner_block_icon {
- overflow: hidden;
+#profile-owner-block .large {
margin-bottom: 10px;
}
#profile-owner-block a.elgg-action-button {
color: white;
text-decoration: none;
}
-
-/* ***************************************
- admin menu in sidebar
-*************************************** */
.profile-admin-menu {
display: none;
}
.profile-admin-menu-wrapper a:hover {
color: black;
}
-
-/* ***************************************
- full profile info panel
-*************************************** */
+/*** profile details ***/
#profile-details .odd {
background-color:#f4f4f4;
-webkit-border-radius: 4px;
#profile-details .aboutme_contents {
padding:2px 0 0 3px;
}
-
-/* ***************************************
- banned user
-*************************************** */
/* banned user full profile panel */
#profile_content .banned_user {
border:2px solid red;
-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;
-}
-
* @uses $vars['entity'] The user entity
*/
+$user = elgg_get_page_owner();
+
echo '<div id="profile-details" class="elgg-body pll">';
-echo "<h2>{$vars['entity']->name}</h2>";
+echo "<h2>{$user->name}</h2>";
$even_odd = null;
if (is_array($vars['config']->profile) && sizeof($vars['config']->profile) > 0) {
foreach($vars['config']->profile as $shortname => $valtype) {
if ($shortname != "description") {
- $value = $vars['entity']->$shortname;
+ $value = $user->$shortname;
if (!empty($value)) {
//This function controls the alternating class
$even_odd = ( 'odd' != $even_odd ) ? 'odd' : 'even';
echo elgg_echo("profile:{$shortname}");
?>: </b>
<?php
- echo elgg_view("output/{$valtype}", array('value' => $vars['entity']->$shortname));
+ echo elgg_view("output/{$valtype}", array('value' => $user->$shortname));
?>
</p>
<?php
}
if (!get_plugin_setting('user_defined_fields', 'profile')) {
- if ($vars['entity']->isBanned()) {
+ if ($user->isBanned()) {
echo "<div class='banned_user'>";
- echo elgg_echo('profile:banned');
+ echo elgg_echo('banned');
echo "</div>";
} else {
if ($vars['entity']->description) {
+++ /dev/null
-<?php
-/**
- * Elgg user display (small)
- *
- * @package ElggProfile
- *
- * @uses $vars['entity'] The user entity
- */
-
-$icon = elgg_view(
- "profile/icon", array(
- 'entity' => $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 .= "<p class='entity-title user'><a href=\"" . $vars['entity']->getUrl() . "\" $rel>" . $vars['entity']->name . "</a></p>";
- $location = $vars['entity']->location;
- if (!empty($location)) {
- $info .= "<p class='entity-subtext user'>" . elgg_echo("profile:location") . ": " . elgg_view("output/tags",array('value' => $vars['entity']->location)) . "</p>";
- }
- //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 .= "<p class='entity-title user banned'>";
- if (isadminloggedin())
- $info .= "<a href=\"" . $vars['entity']->getUrl() . "\">";
- $info .= $vars['entity']->name;
- if (isadminloggedin())
- $info .= "</a>";
- $info .= "</p>";
-}
-
-echo elgg_view_image_block($icon, $info);
+++ /dev/null
-<?php
-/**
- * Profile admin context links
- *
- * @package ElggProfile
- *
- * @uses $vars['entity'] The user entity
- */
-
-if (isadminloggedin()){
- if (get_loggedin_userid()!=$vars['entity']->guid){
-?>
- <a href="<?php echo elgg_get_site_url(); ?>pg/settings/user/<?php echo $vars['entity']->username; ?>/"><?php echo elgg_echo('profile:editdetails'); ?></a>
-<?php
- if (!$vars['entity']->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}"));
- }
- }
- }
+++ /dev/null
-<?php
-/**
- * Elgg profile icon avatar menu: Add / Remove friend links
- *
- * @package ElggProfile
- *
- * @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' => "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
+++ /dev/null
-<?php
-/**
- * Elgg profile icon avatar menu: view for plugins to extend
- *
- * @package ElggProfile
- *
- * @uses $vars['entity'] The user entity. If none specified, the current user is assumed.
- */
-?>
<?php
/**
- * A simple owner block which houses info about the user whose 'stuff' you are looking at
+ * Profile owner block
*/
-// get the user who owns this profile
-if ($vars['entity']) {
- if ($vars['context'] == 'edit') {
- $user = get_entity($vars['entity']->container_guid);
- } else {
- $user = get_entity($vars['entity']->guid);
- }
-} else {
- $user = elgg_get_page_owner();
-}
+$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));
-
$icon = elgg_view("profile/icon", array(
'entity' => $user,
'size' => 'large',
'override' => 'true'
));
-$icon_class = "large";
// grab the actions and admin menu items from user hover
$menu = elgg_trigger_plugin_hook('register', "menu:user_hover", array('entity' => $user), array());
'class' => 'profile-content-menu',
));
-//contruct the display
-$display = <<<EOT
+echo <<<HTML
<div id="profile-owner-block">
- <div class="owner_block_icon $icon_class">
- $icon
- </div>
- $more_info
+ $icon
$profile_actions
$content_menu
$admin_links
</div>
-EOT;
-
-echo $display;
+HTML;
+++ /dev/null
-<?php
-/**
- * Elgg profile icon edit form
- *
- * @package ElggProfile
- */
-?>
-<div id="profile-sidebar">
-<?php
- $section = $vars['section'];
- echo elgg_view('profile/ownerblock', array('section' => $section));
-?>
-</div>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Profile info box
+ */
+
+?>
+<div class="profile elgg-col-2of3">
+ <div class="elgg-inner clearfix">
+ <?php echo elgg_view('profile/owner_block'); ?>
+ <?php echo elgg_view('profile/details'); ?>
+ </div>
+</div>
+
+<script type="text/javascript">
+ $(document).ready(function() {
+ $('#elgg-widget-col-1').css('min-height', $('.profile').outerHeight(true));
+ });
+</script>
\ No newline at end of file