aboutsummaryrefslogtreecommitdiff
path: root/mod/thewire/pages/thewire/tag.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/thewire/pages/thewire/tag.php')
-rw-r--r--mod/thewire/pages/thewire/tag.php36
1 files changed, 36 insertions, 0 deletions
diff --git a/mod/thewire/pages/thewire/tag.php b/mod/thewire/pages/thewire/tag.php
new file mode 100644
index 000000000..53f9e9db9
--- /dev/null
+++ b/mod/thewire/pages/thewire/tag.php
@@ -0,0 +1,36 @@
+<?php
+/**
+ * Wire posts tagged with <tag>
+ */
+
+$tag = get_input('tag');
+if (!$tag) {
+ forward('thewire/all');
+}
+
+elgg_push_breadcrumb(elgg_echo('thewire'), 'thewire/all');
+elgg_push_breadcrumb('#' . $tag);
+
+// remove # from tag
+$tag = trim($tag, '# ');
+
+$title = elgg_echo('thewire:tags', array($tag));
+
+
+$content = elgg_list_entities_from_metadata(array(
+ 'metadata_name' => 'tags',
+ 'metadata_value' => $tag,
+ 'metadata_case_sensitive' => false,
+ 'type' => 'object',
+ 'subtype' => 'thewire',
+ 'limit' => 15,
+));
+
+$body = elgg_view_layout('content', array(
+ 'filter' => false,
+ 'content' => $content,
+ 'title' => $title,
+ 'buttons' => false,
+));
+
+echo elgg_view_page($title, $body);