Elgg  Version 1.11
Variables
comment.php File Reference

Go to the source code of this file.

Variables

 $full_view = elgg_extract('full_view', $vars, true)
 Elgg comment view. More...
 
 $comment = $vars['entity']
 
 $entity = get_entity($comment->container_guid)
 
 $commenter = get_user($comment->owner_guid)
 
if(!$entity||!$commenter) $friendlytime = elgg_view_friendly_time($comment->time_created)
 
 $commenter_icon = elgg_view_entity_icon($commenter, 'tiny')
 
 $commenter_link = "<a href=\"{$commenter->getURL()}\">$commenter->name</a>"
 
 $entity_title = $entity->title ? $entity->title : elgg_echo('untitled')
 
 $entity_link = "<a href=\"{$entity->getURL()}\">$entity_title</a>"
 
if($full_view) else
 
 $posted = elgg_echo('generic_comment:on', array($commenter_link, $entity_link))
 
 $body
 

Variable Documentation

$body
Initial value:
= <<<HTML
<span class="elgg-subtext">
$posted ($friendlytime): $excerpt
</span>
HTML
ui datepicker td span
Definition: admin.php:634
$posted
Definition: comment.php:69
if(!$entity||!$commenter) $friendlytime
Definition: comment.php:19

Definition at line 71 of file comment.php.

$comment = $vars['entity']

Definition at line 11 of file comment.php.

$commenter = get_user($comment->owner_guid)

Definition at line 14 of file comment.php.

$commenter_icon = elgg_view_entity_icon($commenter, 'tiny')

Definition at line 21 of file comment.php.

$commenter_link = "<a href=\"{$commenter->getURL()}\">$commenter->name</a>"

Definition at line 22 of file comment.php.

Definition at line 13 of file comment.php.

$entity_link = "<a href=\"{$entity->getURL()}\">$entity_title</a>"

Definition at line 25 of file comment.php.

$entity_title = $entity->title ? $entity->title : elgg_echo('untitled')

Definition at line 24 of file comment.php.

if (!$entity||!$commenter) $friendlytime = elgg_view_friendly_time($comment->time_created)

Definition at line 19 of file comment.php.

$full_view = elgg_extract('full_view', $vars, true)

Elgg comment view.

$vars['entity'] ElggComment $vars['full_view'] Display full view or brief view

Examples:
/root/Elgg/engine/lib/views.php.

Definition at line 9 of file comment.php.

$posted = elgg_echo('generic_comment:on', array($commenter_link, $entity_link))

Definition at line 69 of file comment.php.

if ($full_view) else
Initial value:
{
$excerpt = elgg_get_excerpt($comment->description, 80)
elgg_get_excerpt($text, $num_chars=250)
Returns an excerpt.
Definition: output.php:72
$comment
Definition: comment.php:11

Definition at line 65 of file comment.php.