aboutsummaryrefslogtreecommitdiff
path: root/views/default/output/longtext.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/output/longtext.php')
-rw-r--r--views/default/output/longtext.php38
1 files changed, 38 insertions, 0 deletions
diff --git a/views/default/output/longtext.php b/views/default/output/longtext.php
new file mode 100644
index 000000000..589100c4f
--- /dev/null
+++ b/views/default/output/longtext.php
@@ -0,0 +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']
+ */
+
+$class = 'elgg-output';
+$additional_class = elgg_extract('class', $vars, '');
+if ($additional_class) {
+ $vars['class'] = "$class $additional_class";
+} else {
+ $vars['class'] = $class;
+}
+
+$parse_urls = elgg_extract('parse_urls', $vars, true);
+unset($vars['parse_urls']);
+
+$text = $vars['value'];
+unset($vars['value']);
+
+if ($parse_urls) {
+ $text = parse_urls($text);
+}
+
+$text = filter_tags($text);
+
+$text = elgg_autop($text);
+
+$attributes = elgg_format_attributes($vars);
+
+echo "<div $attributes>$text</div>";