diff options
Diffstat (limited to 'mod/search/views/default')
-rw-r--r-- | mod/search/views/default/page_elements/searchbox.php | 2 | ||||
-rw-r--r-- | mod/search/views/default/search/listing.php | 15 |
2 files changed, 14 insertions, 3 deletions
diff --git a/mod/search/views/default/page_elements/searchbox.php b/mod/search/views/default/page_elements/searchbox.php index 4bab36be9..cfc0b953b 100644 --- a/mod/search/views/default/page_elements/searchbox.php +++ b/mod/search/views/default/page_elements/searchbox.php @@ -1,4 +1,4 @@ <form id="searchform" action="<?php echo $vars['url']; ?>pg/search/" method="get"> - <input type="text" size="21" name="tag" value="<?php echo elgg_echo('search'); ?>" onclick="if (this.value=='<?php echo elgg_echo('search'); ?>') { this.value='' }" class="search_input" /> + <input type="text" size="21" name="q" value="<?php echo elgg_echo('search'); ?>" onclick="if (this.value=='<?php echo elgg_echo('search'); ?>') { this.value='' }" class="search_input" /> <input type="submit" value="<?php echo elgg_echo('search:go'); ?>" class="search_submit_button" /> </form> diff --git a/mod/search/views/default/search/listing.php b/mod/search/views/default/search/listing.php index 2ed657547..270e33267 100644 --- a/mod/search/views/default/search/listing.php +++ b/mod/search/views/default/search/listing.php @@ -13,7 +13,7 @@ <?php $entities = $vars['entities']; -$count = $vars['count']; +$count = $vars['count'] - count($vars['entities']); if (!is_array($vars['entities']) || !count($vars['entities'])) { return FALSE; @@ -22,6 +22,17 @@ if (!is_array($vars['entities']) || !count($vars['entities'])) { $title_str = elgg_echo("item:{$vars['params']['type']}:{$vars['params']['subtype']}"); $body = elgg_view_title($title_str); +$query = htmlspecialchars(http_build_query( + array( + 'q' => $vars['params']['query'], + 'type' => $vars['params']['type'], + 'subtype' => $vars['params']['subtype'] + ) +)); + +$url = "{$vars['url']}pg/search?$query"; +$more = "<a href=\"$url\">+$count more $title_str</a>"; + echo elgg_view('page_elements/contentwrapper', array('body' => $body)); foreach ($entities as $entity) { @@ -44,7 +55,7 @@ foreach ($entities as $entity) { <h3 class="searchTitle">$title</h3> <span class="searchDetails"> <span class="searchDescription">$description</span><br /> - $icon - $time - <a href="">More $title_str</a> - + $icon $time - $more</a> </span> </span> ___END; |