From ece3f544d55a9918e4e2b6c0759a7faa1570e9ad Mon Sep 17 00:00:00 2001 From: cash Date: Sun, 19 Dec 2010 04:08:54 +0000 Subject: cleaned up profile hover menu git-svn-id: http://code.elgg.org/elgg/trunk@7679 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/profile/hover.php | 63 +++++++++++++++ views/default/profile/icon.php | 167 +++++++++++++++------------------------- 2 files changed, 127 insertions(+), 103 deletions(-) create mode 100644 views/default/profile/hover.php (limited to 'views/default/profile') diff --git a/views/default/profile/hover.php b/views/default/profile/hover.php new file mode 100644 index 000000000..85d6912ba --- /dev/null +++ b/views/default/profile/hover.php @@ -0,0 +1,63 @@ + + +
+ \ No newline at end of file diff --git a/views/default/profile/icon.php b/views/default/profile/icon.php index f58fbf10d..8021157b1 100644 --- a/views/default/profile/icon.php +++ b/views/default/profile/icon.php @@ -1,116 +1,77 @@ 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 = ''; } -if ($vars['entity'] instanceof ElggUser) { - $name = htmlentities($vars['entity']->name, ENT_QUOTES, 'UTF-8'); - $username = $vars['entity']->username; +$override = elgg_get_array_value('override', $vars, false); - 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 = ''; - } +$spacer_url = elgg_get_site_url() . '_graphics/spacer.gif'; +$icon_url = $user->getIcon($size); +$icon = "\"$name\""; - // 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'); ?>" /> - */ +?> + - isBanned())) { +?> + +isBanned())) { +?> + + +
-- cgit v1.2.3