diff options
Diffstat (limited to 'mod/profile/views/default/profile/icon.php')
-rw-r--r-- | mod/profile/views/default/profile/icon.php | 89 |
1 files changed, 44 insertions, 45 deletions
diff --git a/mod/profile/views/default/profile/icon.php b/mod/profile/views/default/profile/icon.php index 3fd6ab87b..59b16cdac 100644 --- a/mod/profile/views/default/profile/icon.php +++ b/mod/profile/views/default/profile/icon.php @@ -1,53 +1,54 @@ <?php - /** - * Elgg profile icon - * - * @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. - * @uses $vars['size'] The size - small, medium or large. If none specified, medium is assumed. - */ +/** + * Elgg profile icon + * + * @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. + * @uses $vars['size'] The size - small, medium or large. If none specified, medium is assumed. + */ - // Get entity - if (empty($vars['entity'])) - $vars['entity'] = $vars['user']; +// Get entity +if (empty($vars['entity'])) { + $vars['entity'] = $vars['user']; +} - if ($vars['entity'] instanceof ElggUser) { - - $name = htmlentities($vars['entity']->name, ENT_QUOTES, 'UTF-8'); - $username = $vars['entity']->username; - - if ($icontime = $vars['entity']->icontime) { - $icontime = "{$icontime}"; - } else { - $icontime = "default"; - } - +if ($vars['entity'] instanceof ElggUser) { + $name = htmlentities($vars['entity']->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"; - + 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 = ""; - } + if (!empty($vars['align'])) { + $align = " align=\"{$vars['align']}\" "; + } else { + $align = ''; + } // Override - if (isset($vars['override']) && $vars['override'] == true) { - $override = true; - } else $override = false; - - if (!$override) { - + if (isset($vars['override']) && $vars['override'] == true) { + $override = true; + } else $override = false; + + if (!$override) { + ?> -<div class="usericon"> +<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"> @@ -79,7 +80,7 @@ ?><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) { + if (!$override) { ?></a> </div> @@ -87,6 +88,4 @@ <?php } - } - -?>
\ No newline at end of file +}
\ No newline at end of file |