Elgg  Version 5.1
Variables
excerpt.php File Reference

Go to the source code of this file.

Variables

 $text = elgg_extract('text', $vars, '')
 Output view for elgg_get_excerpt. More...
 
 $suffix = elgg_extract('suffix', $vars, '...')
 
 $string_length = elgg_strlen($text)
 
 $num_chars = (int) elgg_extract('num_chars', $vars, 250)
 
if($string_length<=$num_chars) $excerpt = elgg_substr($text, 0, $num_chars)
 
 $space = elgg_strrpos($excerpt, ' ', 0)
 
 if ($string_length!=elgg_strlen($excerpt))
 

Variable Documentation

if ($space===false) $excerpt = elgg_substr($text, 0, $num_chars)

Definition at line 24 of file excerpt.php.

$num_chars = (int) elgg_extract('num_chars', $vars, 250)
Examples:
/root/Elgg/engine/lib/output.php.

Definition at line 16 of file excerpt.php.

$space = elgg_strrpos($excerpt, ' ', 0)

Definition at line 25 of file excerpt.php.

$string_length = elgg_strlen($text)

Definition at line 15 of file excerpt.php.

$suffix = elgg_extract('suffix', $vars, '...')

Definition at line 13 of file excerpt.php.

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

Output view for elgg_get_excerpt.

$vars['text'] The text to get the excerpt for $vars['num_chars'] The max number of characters of the excerpt $vars['suffix'] The suffix to be added if text is cut

Definition at line 10 of file excerpt.php.

if($string_length!=elgg_strlen($excerpt))

Definition at line 34 of file excerpt.php.