aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-05 22:46:28 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-05 22:46:28 +0000
commite5227e9221edbce84eee82af7f2c9903de702f37 (patch)
tree5e402b5508a8af64ff40761087926dd0f9443303 /views
parent577eb6f725449fea5738ca122eedb5e4b2c8ff56 (diff)
downloadelgg-e5227e9221edbce84eee82af7f2c9903de702f37.tar.gz
elgg-e5227e9221edbce84eee82af7f2c9903de702f37.tar.bz2
Fixes #2559 refs #2475 added ElggEntity:getIconURL() and elgg_view_entity_icon()
git-svn-id: http://code.elgg.org/elgg/trunk@8039 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views')
-rw-r--r--views/default/css/elements/icons.php42
-rw-r--r--views/default/input/userpicker.php2
-rw-r--r--views/default/page/elements/topbar.php2
-rw-r--r--views/default/profile/icon.php71
-rw-r--r--views/foaf/page/shells/default.php7
5 files changed, 32 insertions, 92 deletions
diff --git a/views/default/css/elements/icons.php b/views/default/css/elements/icons.php
index 18ea4899e..3f9121eb1 100644
--- a/views/default/css/elements/icons.php
+++ b/views/default/css/elements/icons.php
@@ -69,7 +69,7 @@
.elgg-icon-hover-menu:hover {
background-position: -150px -32px;
}
-.elgg-user-icon > .elgg-icon-hover-menu {
+.elgg-avatar > .elgg-icon-hover-menu {
display: none;
position: absolute;
right: 0;
@@ -78,26 +78,27 @@
cursor: pointer;
}
-<?php //@todo prefix with elgg- ?>
.elgg-ajax-loader {
background-color: white;
background-image: url(<?php echo elgg_get_site_url(); ?>_graphics/ajax_loader_bw.gif);
background-repeat: no-repeat;
background-position: center center;
- min-height:33px;
- min-width:33px;
+ min-height: 33px;
+ min-width: 33px;
}
/* ***************************************
AVATAR ICONS
*************************************** */
-.elgg-user-icon {
- position:relative;
+.elgg-avatar {
+ position: relative;
}
-.elgg-user-icon.tiny,
-img.tiny {
- width:25px;
- height:25px;
+.elgg-avatar > a > img {
+ display: block;
+}
+.elgg-avatar-tiny > a > img {
+ 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;
@@ -108,10 +109,9 @@ img.tiny {
-khtml-background-size: 25px;
-moz-background-size: 25px;
}
-.elgg-user-icon.small,
-img.small {
- width:40px;
- height:40px;
+.elgg-avatar-small > a > img {
+ 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;
@@ -122,11 +122,11 @@ img.small {
-khtml-background-size: 40px;
-moz-background-size: 40px;
}
-img.large {
- width:200px;
- height:200px;
+.elgg-avatar-medium > a > img {
+ width: 100px;
+ height: 100px;
+}
+.elgg-avatar-large > a > img {
+ width: 200px;
+ height: 200px;
}
-img.medium {
- width:100px;
- height:100px;
-} \ No newline at end of file
diff --git a/views/default/input/userpicker.php b/views/default/input/userpicker.php
index 20198d236..c9cfe2d8f 100644
--- a/views/default/input/userpicker.php
+++ b/views/default/input/userpicker.php
@@ -26,7 +26,7 @@ function user_picker_add_user($user_id) {
return FALSE;
}
- $icon = $user->getIcon('tiny');
+ $icon = $user->getIconURL('tiny');
$code = '<li class="user-picker-entry">';
$code .= "<img class=\"livesearch_icon\" src=\"$icon\" />";
diff --git a/views/default/page/elements/topbar.php b/views/default/page/elements/topbar.php
index 31d709b7b..40306fcc3 100644
--- a/views/default/page/elements/topbar.php
+++ b/views/default/page/elements/topbar.php
@@ -22,7 +22,7 @@ echo elgg_view('output/url', array(
// avatar
$user_link = $user->getURL();
-$user_image = $user->getIcon('topbar');
+$user_image = $user->getIconURL('topbar');
$image = "<img src=\"$user_image\" alt=\"$user->name\" class=\"elgg-border-plain\" />";
echo elgg_view('output/url', array(
'href' => $user_link,
diff --git a/views/default/profile/icon.php b/views/default/profile/icon.php
index 5685c0a73..1a36ca3cd 100644
--- a/views/default/profile/icon.php
+++ b/views/default/profile/icon.php
@@ -1,77 +1,16 @@
<?php
/**
* Elgg profile icon
- *
+ *
+ * @deprecated 1.8 use elgg_view_entity_icon()
+ *
* @uses $vars['entity'] The user entity. If none specified, the current user is assumed.
* @uses $vars['size'] The size - small, medium or large. If none specified, medium is assumed.
- * @uses $vars['align']
* @uses $vars['override']
* @uses $vars['js']
*/
-$user = elgg_get_array_value('entity', $vars, get_loggedin_user());
-$size = elgg_get_array_value('size', $vars, 'medium');
-if (!in_array($size, array('topbar', 'tiny', 'small', 'medium', 'large', 'master'))) {
- $size = 'medium';
-}
-
-if (!($user instanceof ElggUser)) {
- return true;
-}
-
-$name = htmlspecialchars($user->name, ENT_QUOTES, 'UTF-8');
-$username = $user->username;
-
-$icontime = $user->icontime;
-if (!$icontime) {
- $icontime = "default";
-}
-
-$js = elgg_get_array_value('js', $vars, '');
-
-// Get any align and js
-if (!empty($vars['align'])) {
- $align = " align=\"{$vars['align']}\" ";
-} else {
- $align = '';
-}
-
$override = elgg_get_array_value('override', $vars, false);
+$vars['hover'] = !$override;
-$spacer_url = elgg_get_site_url() . '_graphics/spacer.gif';
-$icon_url = $user->getIcon($size);
-$icon = "<img src=\"$spacer_url\" $align alt=\"$name\" title=\"$name\" $js style=\"background: url($icon_url) no-repeat;\" class=\"$size\" />";
-
-// no hover menu if override set
-if ($override) {
- echo $icon;
- return true;
-}
-
-?>
-<div class="elgg-user-icon <?php echo $size; ?>">
-<?php
-$params = array(
- 'entity' => $user,
- 'username' => $username,
- 'name' => $name,
-);
-echo elgg_view('profile/hover', $params);
-
-if ((isadminloggedin()) || (!$user->isBanned())) {
-?>
- <a href="<?php echo $user->getURL(); ?>" class="icon" >
-<?php
-}
-
-// Rounded avatar corners - CSS3 method
-// users avatar as background image so we can clip it with border-radius in supported browsers
-echo $icon;
-
-if ((isadminloggedin()) || (!$user->isBanned())) {
-?>
- </a>
-<?php
-}
-?>
-</div>
+echo elgg_view('icon/user/default', $vars);
diff --git a/views/foaf/page/shells/default.php b/views/foaf/page/shells/default.php
index 1cd0ed82e..d360f209b 100644
--- a/views/foaf/page/shells/default.php
+++ b/views/foaf/page/shells/default.php
@@ -1,10 +1,12 @@
<?php
/**
- * Elgg XML output pageshell
+ * FOAF pageshell
*
* @package Elgg
* @subpackage Core
*
+ * // @todo removed below because blog is a plugin
+ * <foaf:weblog rdf:resource="<?php echo elgg_get_site_url(); ?>pg/blog/<?php echo $owner->username; ?>" />
*/
header("Content-Type: text/xml");
@@ -39,8 +41,7 @@ if (!$owner = elgg_get_page_owner_entity()) {
<foaf:nick><?php echo $owner->username; ?></foaf:nick>
<foaf:name><?php echo $owner->name; ?></foaf:name>
<foaf:homepage rdf:resource="<?php echo $owner->getURL(); ?>" />
- <foaf:depiction rdf:resource="<?php echo elgg_format_url($owner->getIcon('large')); ?>" />
- <foaf:weblog rdf:resource="<?php echo elgg_get_site_url(); ?>pg/blog/<?php echo $owner->username; ?>" />
+ <foaf:depiction rdf:resource="<?php echo elgg_format_url($owner->getIconURL('large')); ?>" />
<?php
echo $vars['body'];
?>