aboutsummaryrefslogtreecommitdiff
path: root/views/default/output
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/output')
-rw-r--r--views/default/output/date.php5
-rw-r--r--views/default/output/file.php3
-rw-r--r--views/default/output/gender.php3
-rw-r--r--views/default/output/longtext.php3
-rw-r--r--views/default/output/pulldown.php3
-rw-r--r--views/default/output/tagcloud.php28
-rw-r--r--views/default/output/tags.php23
-rw-r--r--views/default/output/text.php3
-rw-r--r--views/default/output/timestamp.php5
-rw-r--r--views/default/output/url.php11
10 files changed, 87 insertions, 0 deletions
diff --git a/views/default/output/date.php b/views/default/output/date.php
new file mode 100644
index 000000000..ebb891154
--- /dev/null
+++ b/views/default/output/date.php
@@ -0,0 +1,5 @@
+<?php
+ if ($vars['value'] > 86400) {
+ echo gmdate("F j, Y",$vars['value']);
+ }
+?> \ No newline at end of file
diff --git a/views/default/output/file.php b/views/default/output/file.php
new file mode 100644
index 000000000..af042230f
--- /dev/null
+++ b/views/default/output/file.php
@@ -0,0 +1,3 @@
+<span class="file-attachment">
+ <a href="<?php echo $vars['value']; ?>">Download attachment</a>
+<span> \ No newline at end of file
diff --git a/views/default/output/gender.php b/views/default/output/gender.php
new file mode 100644
index 000000000..79048485c
--- /dev/null
+++ b/views/default/output/gender.php
@@ -0,0 +1,3 @@
+<?php
+ echo $vars['value'];
+?> \ No newline at end of file
diff --git a/views/default/output/longtext.php b/views/default/output/longtext.php
new file mode 100644
index 000000000..d16332182
--- /dev/null
+++ b/views/default/output/longtext.php
@@ -0,0 +1,3 @@
+<?php
+ echo nl2br($vars['value']);
+?> \ No newline at end of file
diff --git a/views/default/output/pulldown.php b/views/default/output/pulldown.php
new file mode 100644
index 000000000..79048485c
--- /dev/null
+++ b/views/default/output/pulldown.php
@@ -0,0 +1,3 @@
+<?php
+ echo $vars['value'];
+?> \ No newline at end of file
diff --git a/views/default/output/tagcloud.php b/views/default/output/tagcloud.php
new file mode 100644
index 000000000..5d219fd07
--- /dev/null
+++ b/views/default/output/tagcloud.php
@@ -0,0 +1,28 @@
+<?php
+
+ /**
+ * This is a generic view that will display a tag cloud for any
+ * section; photos, services, resources and a user or group
+ **/
+
+ if (!empty($vars['tagcloud']) && is_array($vars['tagcloud'])) {
+
+ $counter = 0;
+ $cloud = "";
+ $max = 0;
+ foreach($vars['tagcloud'] as $tag) {
+ if ($tag->total > $max) {
+ $max = $tag->total;
+ }
+ }
+ foreach($vars['tagcloud'] as $tag) {
+ if (!empty($cloud)) $cloud .= ", ";
+ $size = round((log($tag->total) / log($max)) * 100) + 30;
+ if ($size < 60) $size = 60;
+ $cloud .= "<a href=\"" . $vars['url'] . "search/?tag=". urlencode($tag->tag) . "&type=".urlencode($tag->tag_type)."\" style=\"font-size: {$size}%\" title=\"".addslashes($tag->tag)." ({$tag->total})\" style=\"text-decoration:none;\">" .$tag->tag . "</a>";
+ }
+ echo $cloud;
+
+ }
+
+?> \ No newline at end of file
diff --git a/views/default/output/tags.php b/views/default/output/tags.php
new file mode 100644
index 000000000..8bb97be8c
--- /dev/null
+++ b/views/default/output/tags.php
@@ -0,0 +1,23 @@
+<?php
+ if (!empty($vars['tags']) && is_array($vars['tags'])) {
+
+ $string = "";
+ foreach($vars['tags'] as $tag) {
+ if (!empty($tagstr)) {
+ $tagstr .= ", ";
+ }
+ if (!empty($vars['type'])) {
+ $type = "&type={$vars['type']}";
+ } else {
+ $type = "";
+ }
+ if (is_string($tag)) {
+ $tagstr .= "<a href=\"{$vars['url']}search/?tag=".urlencode($tag) . "{$type}\">{$tag}</a>";
+ } else {
+ $tagstr .= "<a href=\"{$vars['url']}search/?tag=".urlencode($tag->tag) . "{$type}\">{$tag->tag}</a>";
+ }
+ }
+ echo $tagstr;
+
+ }
+?> \ No newline at end of file
diff --git a/views/default/output/text.php b/views/default/output/text.php
new file mode 100644
index 000000000..79048485c
--- /dev/null
+++ b/views/default/output/text.php
@@ -0,0 +1,3 @@
+<?php
+ echo $vars['value'];
+?> \ No newline at end of file
diff --git a/views/default/output/timestamp.php b/views/default/output/timestamp.php
new file mode 100644
index 000000000..20d25d043
--- /dev/null
+++ b/views/default/output/timestamp.php
@@ -0,0 +1,5 @@
+<?php
+
+ echo date("F j, Y", $vars['value']);
+
+?> \ No newline at end of file
diff --git a/views/default/output/url.php b/views/default/output/url.php
new file mode 100644
index 000000000..98fb610a1
--- /dev/null
+++ b/views/default/output/url.php
@@ -0,0 +1,11 @@
+<?php
+
+ $val = trim($vars['value']);
+ if (!empty($val)) {
+ if (substr_count($val, "http://") == 0) {
+ $val = "http://" . $val;
+ }
+ echo "<a href=\"{$val}\" target=\"_blank\">{$val}</a>";
+ }
+
+?> \ No newline at end of file