diff options
Diffstat (limited to 'mod/search/views/default')
| -rw-r--r-- | mod/search/views/default/page_elements/searchbox.php | 4 | ||||
| -rw-r--r-- | mod/search/views/default/search/comments/entity.php | 55 | ||||
| -rw-r--r-- | mod/search/views/default/search/comments/listing.php | 62 | ||||
| -rw-r--r-- | mod/search/views/default/search/css.php | 158 | ||||
| -rw-r--r-- | mod/search/views/default/search/entity.php | 57 | ||||
| -rw-r--r-- | mod/search/views/default/search/entity_list.php | 66 | ||||
| -rw-r--r-- | mod/search/views/default/search/gallery.php | 55 | ||||
| -rw-r--r-- | mod/search/views/default/search/gallery_listing.php | 16 | ||||
| -rw-r--r-- | mod/search/views/default/search/header.php | 6 | ||||
| -rw-r--r-- | mod/search/views/default/search/layout.php | 8 | ||||
| -rw-r--r-- | mod/search/views/default/search/list.php | 115 | ||||
| -rw-r--r-- | mod/search/views/default/search/listing.php | 68 | ||||
| -rw-r--r-- | mod/search/views/default/search/no_results.php | 6 | ||||
| -rw-r--r-- | mod/search/views/default/search/search_box.php | 43 | ||||
| -rw-r--r-- | mod/search/views/default/search/startblurb.php | 13 | ||||
| -rw-r--r-- | mod/search/views/default/search/tags/listing.php | 55 |
16 files changed, 355 insertions, 432 deletions
diff --git a/mod/search/views/default/page_elements/searchbox.php b/mod/search/views/default/page_elements/searchbox.php deleted file mode 100644 index cfc0b953b..000000000 --- a/mod/search/views/default/page_elements/searchbox.php +++ /dev/null @@ -1,4 +0,0 @@ -<form id="searchform" action="<?php echo $vars['url']; ?>pg/search/" method="get"> - <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/comments/entity.php b/mod/search/views/default/search/comments/entity.php new file mode 100644 index 000000000..77e950843 --- /dev/null +++ b/mod/search/views/default/search/comments/entity.php @@ -0,0 +1,55 @@ +<?php +/** + * Default search view for a comment + * + * @uses $vars['entity'] + */ + +$entity = $vars['entity']; +$comments_data = $entity->getVolatileData('search_comments_data'); +$comment_data = array_shift($comments_data); +$entity->setVolatileData('search_comments_data', $comments_data); + +$owner = get_entity($comment_data['owner_guid']); + +if ($owner instanceof ElggUser) { + $icon = elgg_view_entity_icon($owner, 'tiny'); +} else { + $icon = ''; +} + +// @todo Sometimes we find comments on entities we can't display... +if ($entity->getVolatileData('search_unavailable_entity')) { + $title = elgg_echo('search:comment_on', array(elgg_echo('search:unavailable_entity'))); + // keep anchor for formatting. + $title = "<a>$title</a>"; +} else { + if ($entity->getType() == 'object') { + $title = $entity->title; + } else { + $title = $entity->name; + } + + if (!$title) { + $title = elgg_echo('item:' . $entity->getType() . ':' . $entity->getSubtype()); + } + + if (!$title) { + $title = elgg_echo('item:' . $entity->getType()); + } + + $title = elgg_echo('search:comment_on', array($title)); + + // @todo this should use something like $comment->getURL() + $url = $entity->getURL() . '#comment_' . $comment_data['annotation_id']; + $title = "<a href=\"$url\">$title</a>"; +} + +$description = $comment_data['text']; +$tc = $comment_data['time_created']; +$time = elgg_view_friendly_time($tc); + +$body = "<p class=\"mbn\">$title</p>$description"; +$body .= "<p class=\"elgg-subtext\">$time</p>"; + +echo elgg_view_image_block($icon, $body); diff --git a/mod/search/views/default/search/comments/listing.php b/mod/search/views/default/search/comments/listing.php deleted file mode 100644 index 58353a110..000000000 --- a/mod/search/views/default/search/comments/listing.php +++ /dev/null @@ -1,62 +0,0 @@ -<?php -/** - * Elgg comments search listing - * - * @package Elgg - * @subpackage Core - * @author Curverider Ltd - * @link http://elgg.org/ - */ -?> - -<div class="search_listing"> -<?php -if (!is_array($vars['entities']) || !count($vars['entities'])) { - return FALSE; -} - -$title_str = elgg_echo('comments'); -$body = elgg_view_title($title_str); - -$query = htmlspecialchars(http_build_query( - array( - 'q' => $vars['params']['query'], - 'entity_type' => $vars['params']['type'], - 'entity_subtype' => $vars['params']['subtype'], - 'limit' => get_input('limit', 10), - 'offset' => get_input('offset', 0), - 'search_type' => 'comments', - ) -)); - -$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 ($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; -} -?> -</div> diff --git a/mod/search/views/default/search/css.php b/mod/search/views/default/search/css.php index 28dc82a4a..30ff45172 100644 --- a/mod/search/views/default/search/css.php +++ b/mod/search/views/default/search/css.php @@ -1,101 +1,67 @@ -.searchtype { -background: #FFFACD; -color: black; -} - -.searchtypes { -border: 1px #EEEEEE solid; -padding: 4px; -margin: 6px; -} - -.searchListing { - display: block; - margin-bottom: 2em; -} - -.searchMatch { - background-color: #FFFF66; -} - -.searchMatchColor1 { - background-color: #FFFF66; -} - -.searchMatchColor2 { +<?php +/** + * Elgg Search css + * + */ +?> + +/********************************** +Search plugin +***********************************/ +.elgg-search-header { + bottom: 5px; + height: 23px; + position: absolute; + right: 0; +} +.elgg-search input[type=text] { + width: 230px; +} +.elgg-search input[type=submit] { + display: none; +} +.elgg-search input[type=text] { + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + border-radius: 10px; + + border: 1px solid #71b9f7; + color: white; + font-size: 12px; + font-weight: bold; + padding: 2px 4px 2px 26px; + background: transparent url(<?php echo elgg_get_site_url(); ?>_graphics/elgg_sprites.png) no-repeat 2px -934px; +} +.elgg-search input[type=text]:focus, .elgg-search input[type=text]:active { + background-color: white; + background-position: 2px -916px; + border: 1px solid white; + color: #0054A7; +} + +.search-list li { + padding: 5px 0 0; +} +.search-heading-category { + margin-top: 20px; + color: #666666; +} + +.search-highlight { + background-color: #bbdaf7; +} +.search-highlight-color1 { + background-color: #bbdaf7; +} +.search-highlight-color2 { background-color: #A0FFFF; } - -.searchMatchColor3 { - background-color: #FF9999; -} - -.searchMatchColor4 { - background-color: #FF66FF; -} - -.searchMatchColor5 { - background-color: #99FF99; -} - - -.searchTitle { - text-decoration: underline; -} - -#searchform input.search_input { - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - background-color:#FFFFFF; - border:1px solid #BBBBBB; - color:#999999; - font-size:12px; - font-weight:bold; - margin:0pt; - padding:2px; - width:180px; - height:12px; -} -#searchform input.search_submit_button { - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - color:#333333; - background: #cccccc; - border:none; - font-size:12px; - font-weight:bold; - margin:0px; - padding:2px; - width:auto; - height:18px; - cursor:pointer; +.search-highlight-color3 { + background-color: #FDFFC3; } -#searchform input.search_submit_button:hover { - color:#ffffff; - background: #4690d6; +.search-highlight-color4 { + background-color: #ccc; } - - -.search_listing { - display: block; - -webkit-border-radius: 8px; - -moz-border-radius: 8px; - background:white; - margin:0 10px 5px 10px; - padding:5px; -} - -.entity_gallery_item .search_listing { - background: none; - text-align: center; +.search-highlight-color5 { + background-color: #4690d6; } - -/* override the entity container piece */ -.search_listing .entity_listing { - -webkit-border-radius: 0px; - -moz-border-radius: 0px; - background: transparent; - margin: 0; - padding: 0; -} - diff --git a/mod/search/views/default/search/entity.php b/mod/search/views/default/search/entity.php new file mode 100644 index 000000000..e04d08836 --- /dev/null +++ b/mod/search/views/default/search/entity.php @@ -0,0 +1,57 @@ +<?php +/** + * Default view for an entity returned in a search + * + * Display largely controlled by a set of overrideable volatile data: + * - search_icon (defaults to entity icon) + * - search_matched_title + * - search_matched_description + * - search_matched_extra + * - search_url (defaults to entity->getURL()) + * - search_time (defaults to entity->time_updated or entity->time_created) + * + * @uses $vars['entity'] Entity returned in a search + */ + +$entity = $vars['entity']; + +$icon = $entity->getVolatileData('search_icon'); +if (!$icon) { + // display the entity's owner by default if available. + // @todo allow an option to switch to displaying the entity's icon instead. + $type = $entity->getType(); + if ($type == 'user' || $type == 'group') { + $icon = elgg_view_entity_icon($entity, 'tiny'); + } elseif ($owner = $entity->getOwnerEntity()) { + $icon = elgg_view_entity_icon($owner, 'tiny'); + } else { + // display a generic icon if no owner, though there will probably be + // other problems if the owner can't be found. + $icon = elgg_view_entity_icon($entity, 'tiny'); + } +} + +$title = $entity->getVolatileData('search_matched_title'); +$description = $entity->getVolatileData('search_matched_description'); +$extra_info = $entity->getVolatileData('search_matched_extra'); +$url = $entity->getVolatileData('search_url'); + +if (!$url) { + $url = $entity->getURL(); +} + +$title = "<a href=\"$url\">$title</a>"; +$time = $entity->getVolatileData('search_time'); +if (!$time) { + $tc = $entity->time_created; + $tu = $entity->time_updated; + $time = elgg_view_friendly_time(($tu > $tc) ? $tu : $tc); +} + +$body = "<p class=\"mbn\">$title</p>$description"; +if ($extra_info) { + $body .= "<p class=\"elgg-subtext\">$extra_info</p>"; +} +$body .= "<p class=\"elgg-subtext\">$time</p>"; + +echo elgg_view_image_block($icon, $body); diff --git a/mod/search/views/default/search/entity_list.php b/mod/search/views/default/search/entity_list.php deleted file mode 100644 index d709210df..000000000 --- a/mod/search/views/default/search/entity_list.php +++ /dev/null @@ -1,66 +0,0 @@ -<?php -$context = $vars['context']; -$offset = $vars['offset']; -$entities = $vars['entities']; -$limit = $vars['limit']; -$count = $vars['count']; -$baseurl = $vars['baseurl']; -$context = $vars['context']; -$viewtype = $vars['viewtype']; -$pagination = $vars['pagination']; -$fullview = $vars['fullview']; - -$html = ""; -$nav = ""; -if (isset($vars['viewtypetoggle'])) { - $viewtypetoggle = $vars['viewtypetoggle']; -} else { - $viewtypetoggle = true; -} - -if ($context == "search" && $count > 0 && $viewtypetoggle) { - $nav .= elgg_view("navigation/viewtype",array( - - 'baseurl' => $baseurl, - 'offset' => $offset, - 'count' => $count, - 'viewtype' => $viewtype, - - )); -} - -if ($pagination) - $nav .= elgg_view('navigation/pagination',array( - - 'baseurl' => $baseurl, - 'offset' => $offset, - 'count' => $count, - 'limit' => $limit, - - )); - -$html .= $nav; - -if ($viewtype == "list") { - if (is_array($entities) && sizeof($entities) > 0) { - foreach($entities as $entity) { - // print out the entity - $ev = elgg_view_entity($entity, $fullview); - // then add the search decorations around it - $html .= elgg_view('search/listing', array('entity_view' => $ev, - 'search_types' => $entity->getVolatileData('search'))); - - } - } -} else if ($viewtype == "gallery") { - if (is_array($entities) && sizeof($entities) > 0) { - $html .= elgg_view("search/gallery",array('entities' => $entities)); - } -} - -if ($count) { - $html .= $nav; -} -echo $html; - -?> diff --git a/mod/search/views/default/search/gallery.php b/mod/search/views/default/search/gallery.php deleted file mode 100644 index 753a38684..000000000 --- a/mod/search/views/default/search/gallery.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php - - /** - * Elgg gallery view - * - * @package Elgg - * @subpackage Core - - * @author Curverider Ltd - - * @link http://elgg.org/ - */ - - $entities = $vars['entities']; - if (is_array($entities) && sizeof($entities) > 0) { - -?> - - <table class="entity_gallery"> - -<?php - - $col = 0; - foreach($entities as $entity) { - if ($col == 0) { - - echo "<tr>"; - - } - echo "<td class=\"entity_gallery_item\">"; - - $ev = elgg_view_entity($entity, $fullview); - - echo elgg_view('search/listing', array('entity_view' => $ev, - 'search_types' => $entity->getVolatileData('search'))); - - - echo "</td>"; - $col++; - if ($col > 3) { - echo "</tr>"; - $col = 0; - } - } - if ($col > 0) echo "</tr>"; - -?> - - </table> - -<?php - - } - -?>
\ No newline at end of file diff --git a/mod/search/views/default/search/gallery_listing.php b/mod/search/views/default/search/gallery_listing.php deleted file mode 100644 index bbecaf202..000000000 --- a/mod/search/views/default/search/gallery_listing.php +++ /dev/null @@ -1,16 +0,0 @@ -<?php -/** - * Elgg search listing: gallery view - * - * DEPRECATED VIEW: use entities/gallery_listing instead - * - * @package Elgg - * @subpackage Core - * @author Curverider Ltd - * @link http://elgg.org/ - */ - - - echo elgg_view('entities/gallery_listing', $vars); - -?>
\ No newline at end of file diff --git a/mod/search/views/default/search/header.php b/mod/search/views/default/search/header.php new file mode 100644 index 000000000..6f8654c13 --- /dev/null +++ b/mod/search/views/default/search/header.php @@ -0,0 +1,6 @@ +<?php +/** + * Search box in page header + */ + +echo elgg_view('search/search_box', array('class' => 'elgg-search-header'));
\ No newline at end of file diff --git a/mod/search/views/default/search/layout.php b/mod/search/views/default/search/layout.php new file mode 100644 index 000000000..eb597836e --- /dev/null +++ b/mod/search/views/default/search/layout.php @@ -0,0 +1,8 @@ +<?php +/** + * The default search layout + * + * @uses $vars['body'] + */ + +echo elgg_view_layout('one_sidebar', array('content' => $vars['body']));
\ No newline at end of file diff --git a/mod/search/views/default/search/list.php b/mod/search/views/default/search/list.php new file mode 100644 index 000000000..90aa28989 --- /dev/null +++ b/mod/search/views/default/search/list.php @@ -0,0 +1,115 @@ +<?php +/** + * List a section of search results corresponding in a particular type/subtype + * or search type (comments for example) + * + * @uses $vars['results'] Array of data related to search results including: + * - 'entities' Array of entities to be displayed + * - 'count' Total number of results + * @uses $vars['params'] Array of parameters including: + * - 'type' Entity type + * - 'subtype' Entity subtype + * - 'search_type' Type of search: 'entities', 'comments', 'tags' + * - 'offset' Offset in search results + * - 'limit' Number of results per page + * - 'pagination' Display pagination? + */ + +$entities = $vars['results']['entities']; +$count = $vars['results']['count'] - count($entities); + +if (!is_array($entities) || !count($entities)) { + return FALSE; +} + +$query = http_build_query( + array( + 'q' => $vars['params']['query'], + 'entity_type' => $vars['params']['type'], + 'entity_subtype' => $vars['params']['subtype'], + 'limit' => $vars['params']['limit'], + 'offset' => $vars['params']['offset'], + 'search_type' => $vars['params']['search_type'], + //@todo include vars for sorting, order, and friend-only. + ) +); + +$url = elgg_get_site_url() . "search?$query"; + +$more_items = $vars['results']['count'] - ($vars['params']['offset'] + $vars['params']['limit']); + +// get pagination +if (array_key_exists('pagination', $vars['params']) && $vars['params']['pagination']) { + $nav = elgg_view('navigation/pagination', array( + 'base_url' => $url, + 'offset' => $vars['params']['offset'], + 'count' => $vars['results']['count'], + 'limit' => $vars['params']['limit'], + )); + $show_more = false; +} else { + // faceted search page so no pagination + $nav = ''; + $show_more = $more_items > 0; +} + +// figure out what we're dealing with. +$type_str = NULL; + +if (array_key_exists('type', $vars['params']) && array_key_exists('subtype', $vars['params'])) { + $type_str_tmp = "item:{$vars['params']['type']}:{$vars['params']['subtype']}"; + $type_str_echoed = elgg_echo($type_str_tmp); + if ($type_str_echoed != $type_str_tmp) { + $type_str = $type_str_echoed; + } +} + +if (!$type_str && array_key_exists('type', $vars['params'])) { + $type_str = elgg_echo("item:{$vars['params']['type']}"); +} + +if (!$type_str) { + $type_str = elgg_echo('search:unknown_entity'); +} + +// allow overrides for titles +$search_type_str = elgg_echo("search_types:{$vars['params']['search_type']}"); +if (array_key_exists('search_type', $vars['params']) + && $search_type_str != "search_types:{$vars['params']['search_type']}") { + + $type_str = $search_type_str; +} + +if ($show_more) { + $more_str = elgg_echo('search:more', array($count, $type_str)); + $more_url = elgg_http_remove_url_query_element($url, 'limit'); + $more_link = "<li class='elgg-item'><a href=\"$more_url\">$more_str</a></li>"; +} else { + $more_link = ''; +} + +// @todo once elgg_view_title() supports passing a $vars array use it +$body = elgg_view('page/elements/title', array( + 'title' => $type_str, + 'class' => 'search-heading-category', +)); + +$view = search_get_search_view($vars['params'], 'entity'); +if ($view) { + $body .= '<ul class="elgg-list search-list">'; + foreach ($entities as $entity) { + $id = "elgg-{$entity->getType()}-{$entity->getGUID()}"; + $body .= "<li id=\"$id\" class=\"elgg-item\">"; + $body .= elgg_view($view, array( + 'entity' => $entity, + 'params' => $vars['params'], + 'results' => $vars['results'] + )); + $body .= '</li>'; + } + $body .= $more_link; + $body .= '</ul>'; +} + +echo $body; +echo $nav; diff --git a/mod/search/views/default/search/listing.php b/mod/search/views/default/search/listing.php deleted file mode 100644 index 37850c911..000000000 --- a/mod/search/views/default/search/listing.php +++ /dev/null @@ -1,68 +0,0 @@ -<?php -/** - * Elgg search listing - * - * @package Elgg - * @subpackage Core - * @author Curverider Ltd - * @link http://elgg.org/ - */ -?> - -<div class="search_listing"> - -<?php -$entities = $vars['entities']; -$count = $vars['count'] - count($vars['entities']); - -if (!is_array($vars['entities']) || !count($vars['entities'])) { - return FALSE; -} - -$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'], - 'entity_type' => $vars['params']['type'], - 'entity_subtype' => $vars['params']['subtype'], - 'limit' => get_input('limit', 10), - 'offset' => get_input('offset', 0), - 'search_type' => 'entities', - ) -)); - -$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) { - if ($owner = $entity->getOwnerEntity()) { - $owner_icon = $owner->getIcon('tiny'); - $icon = "<img src=\"$owner_icon\" />"; - } else { - $icon = ''; - } - $title = $entity->getVolatileData('search_matched_title'); - $description = $entity->getVolatileData('search_matched_description'); - $url = $entity->getURL(); - $title = "<a href=\"$url\">$title</a>"; - $tc = $entity->time_created; - $tu = $entity->time_updated; - $time = friendly_time(($tu > $tc) ? $tu : $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; -} - -?> -</div>
\ No newline at end of file diff --git a/mod/search/views/default/search/no_results.php b/mod/search/views/default/search/no_results.php new file mode 100644 index 000000000..0e9a5e295 --- /dev/null +++ b/mod/search/views/default/search/no_results.php @@ -0,0 +1,6 @@ +<?php +/** + * No results from search + */ + +echo elgg_autop(elgg_echo('search:no_results')); diff --git a/mod/search/views/default/search/search_box.php b/mod/search/views/default/search/search_box.php new file mode 100644 index 000000000..7474a280c --- /dev/null +++ b/mod/search/views/default/search/search_box.php @@ -0,0 +1,43 @@ +<?php +/** + * Search box + * + * @uses $vars['value'] Current search query + * @uses $vars['class'] Additional class + */ + +if (array_key_exists('value', $vars)) { + $value = $vars['value']; +} elseif ($value = get_input('q', get_input('tag', NULL))) { + $value = $value; +} else { + $value = elgg_echo('search'); +} + +$class = "elgg-search"; +if (isset($vars['class'])) { + $class = "$class {$vars['class']}"; +} + +// @todo - why the strip slashes? +$value = stripslashes($value); + +// @todo - create function for sanitization of strings for display in 1.8 +// encode <,>,&, quotes and characters above 127 +if (function_exists('mb_convert_encoding')) { + $display_query = mb_convert_encoding($value, 'HTML-ENTITIES', 'UTF-8'); +} else { + // if no mbstring extension, we just strip characters + $display_query = preg_replace("/[^\x01-\x7F]/", "", $value); +} +$display_query = htmlspecialchars($display_query, ENT_QUOTES, 'UTF-8', false); + +?> + +<form class="<?php echo $class; ?>" action="<?php echo elgg_get_site_url(); ?>search" method="get"> + <fieldset> + <input type="text" class="search-input" size="21" name="q" value="<?php echo $display_query; ?>" onblur="if (this.value=='') { this.value='<?php echo elgg_echo('search'); ?>' }" onfocus="if (this.value=='<?php echo elgg_echo('search'); ?>') { this.value='' };" /> + <input type="hidden" name="search_type" value="all" /> + <input type="submit" value="<?php echo elgg_echo('search:go'); ?>" class="search-submit-button" /> + </fieldset> +</form> diff --git a/mod/search/views/default/search/startblurb.php b/mod/search/views/default/search/startblurb.php index 82d2d62d1..d6394da0d 100644 --- a/mod/search/views/default/search/startblurb.php +++ b/mod/search/views/default/search/startblurb.php @@ -1,13 +1,6 @@ <?php /** - * @package Elgg - * @subpackage Core - * @author Curverider Ltd - * @link http://elgg.org/ + * @todo This doesn't appear to be called by anything. Look into removing. */ -?> -<div class="contentWrapper"> -<?php - echo sprintf(elgg_echo("tag:search:startblurb"), $vars['query']); -?> -</div>
\ No newline at end of file + +echo elgg_echo("tag:search:startblurb", array($vars['query'])); diff --git a/mod/search/views/default/search/tags/listing.php b/mod/search/views/default/search/tags/listing.php deleted file mode 100644 index 9b229b349..000000000 --- a/mod/search/views/default/search/tags/listing.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php -/** - * Elgg tag search listing - * - * @package Elgg - * @subpackage Core - * @author Curverider Ltd - * @link http://elgg.org/ - */ -?> - -<div class="search_listing"> - -<?php -$entities = $vars['entities']; -$count = $vars['count']; - -if (!is_array($vars['entities']) || !count($vars['entities'])) { - return FALSE; -} - -$title_str = elgg_echo("item:{$vars['params']['type']}:{$vars['params']['subtype']}"); -$body = elgg_view_title(elgg_echo('tags')); - -echo elgg_view('page_elements/contentwrapper', array('body' => $body)); - -foreach ($entities as $entity) { - if ($owner = $entity->getOwnerEntity()) { - $owner_icon = $owner->getIcon('tiny'); - $icon = "<img src=\"$owner_icon\" />"; - } else { - $icon = ''; - } - $tags = $entity->getVolatileData('search_matched_tags'); - - $entity_html = elgg_view_entity($entity); - $url = $entity->getURL(); - $title = "<a href=\"$url\">$title</a>"; - $tc = $entity->time_created; - $tu = $entity->time_updated; - $time = friendly_time(($tu > $tc) ? $tu : $tc); - - echo <<<___END -<span class="searchListing"> - <h3 class="searchTitle">$title</h3> - <span class="searchDetails"> - $entity_html - $tags - </span> -</span> -___END; -} - -?> -</div>
\ No newline at end of file |
