aboutsummaryrefslogtreecommitdiff
path: root/mod/thewire/pages/tag.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-12 22:41:25 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-12 22:41:25 +0000
commitda90ff55725a9118ce6111ab2b6371650bf78ade (patch)
tree937da734d50c8147ca8f2cc52791dabf430464c6 /mod/thewire/pages/tag.php
parentcc6b7d1d223241e397e0d41354924e74606eeffc (diff)
downloadelgg-da90ff55725a9118ce6111ab2b6371650bf78ade.tar.gz
elgg-da90ff55725a9118ce6111ab2b6371650bf78ade.tar.bz2
a mostly completed port of JHU/APL wire plugin to 1.8
git-svn-id: http://code.elgg.org/elgg/trunk@8183 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/thewire/pages/tag.php')
-rw-r--r--mod/thewire/pages/tag.php36
1 files changed, 36 insertions, 0 deletions
diff --git a/mod/thewire/pages/tag.php b/mod/thewire/pages/tag.php
new file mode 100644
index 000000000..7e62a33de
--- /dev/null
+++ b/mod/thewire/pages/tag.php
@@ -0,0 +1,36 @@
+<?php
+/**
+ * Wire posts tagged with <tag>
+ */
+
+$tag = get_input('tag');
+if (!$tag) {
+ forward('pg/thewire/all');
+}
+
+elgg_push_breadcrumb(elgg_echo('thewire'), 'pg/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);