Simple status box for the sidebar.
[elgg_plugins.git] / suggest / lib / suggest_sidebar_link.php
blobe76596cd5e24bac6344d688a5894b52cac3c1635
1 <?php
3 /*
4 * Created on Sep 3, 2007
6 * @author Diego Andrés Ramírez Aragón <diego@somosmas.org>
7 * @copyright Corporación Somos más - 2007
8 */
9 global $page_owner;
10 global $suggest_queries;
12 if ($page_owner != -1 && $page_owner == $_SESSION['userid']) {
14 if (!isset ($suggest_queries)) {
15 require_once dirname(__FILE__) . "/../config.php";
18 if (!empty ($suggest_queries)) {
19 $body = "<ul>";
20 foreach ($suggest_queries as $key => $value) {
21 $body .= "<li><a href=\"" . url . user_info('username', $page_owner) . "/$key/suggestions/\">" . $value['title'] . "</a></li>";
23 $body.="</ul>";
24 $run_result .= "<li id=\"suggestion\">";
25 $run_result .= templates_draw(array (
26 'context' => 'sidebarholder',
27 'title' => __gettext("Suggestions"),
28 'body' => $body));
29 $run_result .= "</li>";
31 } else {
32 $run_result .= "";