Simple status box for the sidebar.
[elgg_plugins.git] / suggest / suggest.php
blobcb8f4c675c4b5be78ea111739b0543b100d394a5
1 <?php
2 /*
3 * Created on Aug 30, 2007
5 * @author Diego Andrés Ramírez Aragón <diego@somosmas.org>
6 * @copyright Corporación Somos más - 2007
7 */
8 require_once (dirname(dirname(__FILE__)) . "/../includes.php");
10 require dirname(__FILE__)."/config.php";
12 run("profile:init");
14 $context = optional_param('type');
15 $suggest = $suggest_queries[$context];
17 if(!empty($suggest)){
19 define("context", $suggest['menu_contrib']);
20 templates_page_setup();
22 define('SUGGEST_FILTER',false);
24 $title = run("profile:display:name");
25 $title .= " :: " . sprintf(__gettext("Suggested %s"),$suggest['title']);
27 $vars[] = "suggest";
28 $vars[] = SUGGEST_SUGGESTIONS_CONTRIB;
29 $vars[] = $context;
30 $body = suggest_mainbody($vars,'content_',"content");
32 else{
33 $body = sprintf(__gettext("There is no suggestions for the '%s' context "),$context);
34 $body="<p>$body</p>";
37 $body = templates_draw(array (
38 'context' => 'contentholder',
39 'title' => $title,
40 'body' => "<div id=\"view_own_blog\">$body</div>"
41 ));
43 echo templates_page_draw(array (
44 $title,
45 $body
46 ));