aboutsummaryrefslogtreecommitdiff
path: root/mod/search/views/default
diff options
context:
space:
mode:
Diffstat (limited to 'mod/search/views/default')
-rw-r--r--mod/search/views/default/search/comments/listing.php34
-rw-r--r--mod/search/views/default/search/listing.php2
-rw-r--r--mod/search/views/default/search/tags/listing.php2
3 files changed, 37 insertions, 1 deletions
diff --git a/mod/search/views/default/search/comments/listing.php b/mod/search/views/default/search/comments/listing.php
new file mode 100644
index 000000000..ba9b7ea6e
--- /dev/null
+++ b/mod/search/views/default/search/comments/listing.php
@@ -0,0 +1,34 @@
+<?php
+/**
+ * Elgg comments search listing
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
+
+foreach ($vars['entities'] as $entity) {
+ if ($owner = $entity->getOwnerEntity()) {
+ $owner_icon = $owner->getIcon('tiny');
+ $icon = "<img src=\"$owner_icon\" />";
+ } else {
+ $icon = '';
+ }
+ $title = "Comment on " . elgg_echo('item:' . $entity->getType() . ':' . $entity->getSubtype());
+ $description = $entity->getVolatileData('search_matched_comment');
+ $url = $entity->getURL();
+ $title = "<a href=\"$url\">$title</a>";
+ $tc = $entity->getVolatileData('search_matched_comment_time_created');;
+ $time = friendly_time($tc);
+
+ echo <<<___END
+<span class="searchListing">
+ <h3 class="searchTitle">$title</h3>
+ <span class="searchDetails">
+ <span class="searchDescription">$description</span><br />
+ $icon $time - $more</a>
+ </span>
+</span>
+___END;
+} \ No newline at end of file
diff --git a/mod/search/views/default/search/listing.php b/mod/search/views/default/search/listing.php
index 270e33267..23a6a44e8 100644
--- a/mod/search/views/default/search/listing.php
+++ b/mod/search/views/default/search/listing.php
@@ -26,6 +26,8 @@ $query = htmlspecialchars(http_build_query(
array(
'q' => $vars['params']['query'],
'type' => $vars['params']['type'],
+ 'limit' => get_input('limit', 10),
+ 'offset' => get_input('offset', 0),
'subtype' => $vars['params']['subtype']
)
));
diff --git a/mod/search/views/default/search/tags/listing.php b/mod/search/views/default/search/tags/listing.php
index a5a33c4a4..9b229b349 100644
--- a/mod/search/views/default/search/tags/listing.php
+++ b/mod/search/views/default/search/tags/listing.php
@@ -1,6 +1,6 @@
<?php
/**
- * Elgg search listing
+ * Elgg tag search listing
*
* @package Elgg
* @subpackage Core