Elgg  Version 1.9
Variables
comments_block.php File Reference

Go to the source code of this file.

Variables

 $options
 Display the latest related comments. More...
 
 $owner_guid = elgg_extract('owner_guid', $vars)
 
 $subtypes = elgg_extract('subtypes', $vars)
 
if($owner_guid|| $subtypes) if($owner_guid) if($subtypes) $title = elgg_echo('generic_comments:latest')
 
 $comments = elgg_get_entities($options)
 
if($commentselse
 

Variable Documentation

◆ $comments

Definition at line 66 of file comments_block.php.

◆ $options

$options
Initial value:
= array(
'type' => 'object',
'subtype' => 'comment',
'limit' => elgg_extract('limit', $vars, 4),
'wheres' => array()
)
elgg_extract($key, array $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:1464
if(file_exists($welcome)) $vars
Definition: upgrade.php:93

Display the latest related comments.

Generally used in a sidebar. Does not work with groups currently.

@uses $vars['subtypes'] Object subtype string or array of subtypes @uses $vars['owner_guid'] The owner of the content being commented on @uses $vars['limit'] The number of comments to display

Definition at line 12 of file comments_block.php.

◆ $owner_guid

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

Definition at line 19 of file comments_block.php.

◆ $subtypes

$subtypes = elgg_extract('subtypes', $vars)

Definition at line 20 of file comments_block.php.

◆ $title

if ( $owner_guid||$subtypes) if ( $owner_guid) if ( $subtypes) $title = elgg_echo('generic_comments:latest')

Definition at line 65 of file comments_block.php.

◆ else

if ( $comments) else
Initial value:
{
$body = '<p>' . elgg_echo('generic_comment:none') . '</p>'
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21

Definition at line 74 of file comments_block.php.