diff options
Diffstat (limited to 'views/opensearch_rss/search')
-rw-r--r-- | views/opensearch_rss/search/layout.php | 2 | ||||
-rw-r--r-- | views/opensearch_rss/search/listing.php | 25 |
2 files changed, 27 insertions, 0 deletions
diff --git a/views/opensearch_rss/search/layout.php b/views/opensearch_rss/search/layout.php new file mode 100644 index 000000000..4cd2ff050 --- /dev/null +++ b/views/opensearch_rss/search/layout.php @@ -0,0 +1,2 @@ +<?php +echo $vars['body'];
\ No newline at end of file diff --git a/views/opensearch_rss/search/listing.php b/views/opensearch_rss/search/listing.php new file mode 100644 index 000000000..367bf332f --- /dev/null +++ b/views/opensearch_rss/search/listing.php @@ -0,0 +1,25 @@ +<?php + +global $OPEN_SEARCH_COUNT; +if (!isset($OPEN_SEARCH_COUNT)) { + $OPEN_SEARCH_COUNT = 0; +} + +$OPEN_SEARCH_COUNT += $vars['results']['count']; + +//var_dump($vars['results']); + +elgg_set_viewtype('rss'); +$entities = $vars['results']['entities']; +foreach ($entities as $entity) { + if ($view = search_get_search_view($vars['params'], 'entity')) { + $body .= elgg_view($view, array( + 'entity' => $entity, + 'params' => $vars['params'], + 'results' => $vars['results'] + )); + } +} +elgg_set_viewtype('opensearch_rss'); + +echo $body;
\ No newline at end of file |