| @@ 83-111 (lines=29) @@ | ||
| 80 | echo elgg_view_page(elgg_echo('groups:all'), $body); |
|
| 81 | } |
|
| 82 | ||
| 83 | function groups_search_page() { |
|
| 84 | elgg_push_breadcrumb(elgg_echo('search')); |
|
| 85 | $tag = get_input("tag"); |
|
| 86 | $display_query = _elgg_get_display_query($tag); |
|
| 87 | $title = elgg_echo('groups:search:title', array($display_query)); |
|
| 88 | ||
| 89 | // groups plugin saves tags as "interests" - see groups_fields_setup() in start.php |
|
| 90 | $params = array( |
|
| 91 | 'metadata_name' => 'interests', |
|
| 92 | 'metadata_value' => $tag, |
|
| 93 | 'type' => 'group', |
|
| 94 | 'full_view' => false, |
|
| 95 | 'no_results' => elgg_echo('groups:search:none'), |
|
| 96 | ); |
|
| 97 | ||
| 98 | $content = elgg_list_entities_from_metadata($params); |
|
| 99 | $sidebar = elgg_view('groups/sidebar/find'); |
|
| 100 | $sidebar .= elgg_view('groups/sidebar/featured'); |
|
| 101 | ||
| 102 | $params = array( |
|
| 103 | 'content' => $content, |
|
| 104 | 'sidebar' => $sidebar, |
|
| 105 | 'filter' => false, |
|
| 106 | 'title' => $title, |
|
| 107 | ); |
|
| 108 | $body = elgg_view_layout('content', $params); |
|
| 109 | ||
| 110 | echo elgg_view_page($title, $body); |
|
| 111 | } |
|
| 112 | ||
| 113 | ||
| 114 | //List owned groups |
|
| @@ 122-151 (lines=30) @@ | ||
| 119 | echo elgg_view_page(elgg_echo('groups:all'), $body); |
|
| 120 | } |
|
| 121 | ||
| 122 | function groups_search_page() { |
|
| 123 | elgg_push_breadcrumb(elgg_echo('search')); |
|
| 124 | ||
| 125 | $tag = get_input("tag"); |
|
| 126 | $display_query = _elgg_get_display_query($tag); |
|
| 127 | $title = elgg_echo('groups:search:title', array($display_query)); |
|
| 128 | ||
| 129 | // groups plugin saves tags as "interests" - see groups_fields_setup() in start.php |
|
| 130 | $params = array( |
|
| 131 | 'metadata_name' => 'interests', |
|
| 132 | 'metadata_value' => $tag, |
|
| 133 | 'type' => 'group', |
|
| 134 | 'full_view' => false, |
|
| 135 | 'no_results' => elgg_echo('groups:search:none'), |
|
| 136 | ); |
|
| 137 | $content = elgg_list_entities_from_metadata($params); |
|
| 138 | ||
| 139 | $sidebar = elgg_view('groups/sidebar/find'); |
|
| 140 | //$sidebar .= elgg_view('groups/sidebar/featured'); |
|
| 141 | ||
| 142 | $params = array( |
|
| 143 | 'content' => $content, |
|
| 144 | 'sidebar' => $sidebar, |
|
| 145 | 'filter' => false, |
|
| 146 | 'title' => $title, |
|
| 147 | ); |
|
| 148 | $body = elgg_view_layout('content', $params); |
|
| 149 | ||
| 150 | echo elgg_view_page($title, $body); |
|
| 151 | } |
|
| 152 | ||
| 153 | /** |
|
| 154 | * List owned groups |
|
| @@ 80-109 (lines=30) @@ | ||
| 77 | echo elgg_view_page(elgg_echo('groups:all'), $body); |
|
| 78 | } |
|
| 79 | ||
| 80 | function groups_search_page() { |
|
| 81 | elgg_push_breadcrumb(elgg_echo('search')); |
|
| 82 | ||
| 83 | $tag = get_input("tag"); |
|
| 84 | $display_query = _elgg_get_display_query($tag); |
|
| 85 | $title = elgg_echo('groups:search:title', array($display_query)); |
|
| 86 | ||
| 87 | // groups plugin saves tags as "interests" - see groups_fields_setup() in start.php |
|
| 88 | $params = array( |
|
| 89 | 'metadata_name' => 'interests', |
|
| 90 | 'metadata_value' => $tag, |
|
| 91 | 'type' => 'group', |
|
| 92 | 'full_view' => false, |
|
| 93 | 'no_results' => elgg_echo('groups:search:none'), |
|
| 94 | ); |
|
| 95 | $content = elgg_list_entities_from_metadata($params); |
|
| 96 | ||
| 97 | $sidebar = elgg_view('groups/sidebar/find'); |
|
| 98 | $sidebar .= elgg_view('groups/sidebar/featured'); |
|
| 99 | ||
| 100 | $params = array( |
|
| 101 | 'content' => $content, |
|
| 102 | 'sidebar' => $sidebar, |
|
| 103 | 'filter' => false, |
|
| 104 | 'title' => $title, |
|
| 105 | ); |
|
| 106 | $body = elgg_view_layout('content', $params); |
|
| 107 | ||
| 108 | echo elgg_view_page($title, $body); |
|
| 109 | } |
|
| 110 | ||
| 111 | /** |
|
| 112 | * List owned groups |
|