Elgg  Version 2.3
Variables
default.php File Reference

Go to the source code of this file.

Variables

 $user = elgg_extract('entity', $vars, elgg_get_logged_in_user_entity())
 Elgg user icon. More...
 
 $size = elgg_extract('size', $vars, 'medium')
 
if(!($user instanceof ElggUser)) $icon_sizes = elgg_get_icon_sizes('user')
 
if(!array_key_exists($size, $icon_sizes)) $name = htmlspecialchars($user->name, ENT_QUOTES, 'UTF-8', false)
 
 $username = $user->username
 
 $class = "elgg-avatar elgg-avatar-$size"
 
if(isset($vars['class'])) if($user->isBanned()) $use_link = elgg_extract('use_link', $vars, true)
 
 $icontime = $user->icontime
 
if(! $icontime) $img_class = ''
 
if(isset($vars['img_class'])) $use_hover = elgg_extract('use_hover', $vars, true)
 
if(isset($vars['hover'])) $icon
 
 $show_menu = $use_hover && (elgg_is_admin_logged_in() || !$user->isBanned())
 
if($show_menu) if($use_link) else
 

Variable Documentation

◆ $class

$class = "elgg-avatar elgg-avatar-$size"

Definition at line 33 of file default.php.

◆ $icon

if (isset( $vars[ 'hover'])) $icon
Initial value:
= elgg_view('output/img', array(
'src' => $user->getIconURL($size),
'alt' => $name,
'title' => $name,
'class' => $img_class,
))
$size
Definition: default.php:20
$user
Elgg user icon.
Definition: default.php:18
if(!array_key_exists($size, $icon_sizes)) $name
Definition: default.php:30
if(! $icontime) $img_class
Definition: default.php:50
elgg_view($view, $vars=array(), $ignore1=false, $ignore2=false, $viewtype='')
Return a parsed view.
Definition: views.php:336

Definition at line 62 of file default.php.

◆ $icon_sizes

if (!( $user instanceof ElggUser)) $icon_sizes = elgg_get_icon_sizes('user')

Definition at line 25 of file default.php.

◆ $icontime

$icontime = $user->icontime

Definition at line 45 of file default.php.

◆ $img_class

if (! $icontime) $img_class = ''

Definition at line 50 of file default.php.

◆ $name

if (!array_key_exists( $size, $icon_sizes)) $name = htmlspecialchars($user->name, ENT_QUOTES, 'UTF-8', false)

Definition at line 30 of file default.php.

◆ $show_menu

$show_menu = $use_hover && (elgg_is_admin_logged_in() || !$user->isBanned())

Definition at line 69 of file default.php.

◆ $size

$size = elgg_extract('size', $vars, 'medium')

Definition at line 19 of file default.php.

◆ $use_hover

if (isset( $vars[ 'img_class'])) $use_hover = elgg_extract('use_hover', $vars, true)

Definition at line 56 of file default.php.

◆ $use_link

if (isset( $vars[ 'class'])) if ( $user->isBanned()) $use_link = elgg_extract('use_link', $vars, true)

Definition at line 43 of file default.php.

◆ $user

Elgg user icon.

Rounded avatar corners - CSS3 method uses avatar as background image so we can clip it with border-radius in supported browsers

@uses $vars['entity'] The user entity. If none specified, the current user is assumed. @uses $vars['size'] The size - tiny, small, medium or large. (medium) @uses $vars['use_hover'] Display the hover menu? (true) @uses $vars['use_link'] Wrap a link around image? (true) @uses $vars['class'] Optional class added to the .elgg-avatar div @uses $vars['img_class'] Optional CSS class added to img @uses $vars['link_class'] Optional CSS class for the link @uses $vars['href'] Optional override of the link href

Definition at line 18 of file default.php.

◆ $username

$username = $user->username

Definition at line 31 of file default.php.

◆ else

if ( $show_menu) if ( $use_link) else
Initial value:
{
echo "<a>$icon</a>"

Definition at line 94 of file default.php.