diff options
Diffstat (limited to 'views/default/output/longtext.php')
| -rw-r--r-- | views/default/output/longtext.php | 47 |
1 files changed, 32 insertions, 15 deletions
diff --git a/views/default/output/longtext.php b/views/default/output/longtext.php index 3d130359a..589100c4f 100644 --- a/views/default/output/longtext.php +++ b/views/default/output/longtext.php @@ -1,21 +1,38 @@ <?php +/** + * Elgg display long text + * Displays a large amount of text, with new lines converted to line breaks + * + * @package Elgg + * @subpackage Core + * + * @uses $vars['value'] The text to display + * @uses $vars['parse_urls'] Whether to turn urls into links. Default is true. + * @uses $vars['class'] + */ - /** - * Elgg display long text - * Displays a large amount of text, with new lines converted to line breaks - * - * @package Elgg - * @subpackage Core +$class = 'elgg-output'; +$additional_class = elgg_extract('class', $vars, ''); +if ($additional_class) { + $vars['class'] = "$class $additional_class"; +} else { + $vars['class'] = $class; +} - * @author Curverider Ltd +$parse_urls = elgg_extract('parse_urls', $vars, true); +unset($vars['parse_urls']); - * @link http://elgg.org/ - * - * @uses $vars['text'] The text to display - * - */ +$text = $vars['value']; +unset($vars['value']); - global $CONFIG; +if ($parse_urls) { + $text = parse_urls($text); +} - echo autop(parse_urls(filter_tags($vars['value']))); -?>
\ No newline at end of file +$text = filter_tags($text); + +$text = elgg_autop($text); + +$attributes = elgg_format_attributes($vars); + +echo "<div $attributes>$text</div>"; |
