5 $profile_id = $page_owner;
7 include(dirname(__FILE__
) . '/config.php');
10 if (logged_on
&& $page_owner == $_SESSION['userid']) {
12 $title = __gettext("Recent Activity");
14 $body .= "<a href=\"".url
."_activity/\">".__gettext("View your activity") . "</a></li></ul>";
16 $run_result .= "<li id=\"recent_activity\">";
17 $run_result .= templates_draw(array(
18 'context' => 'sidebarholder',
23 $run_result .= "</li>";
27 //$posts = count_records_select('weblog_posts','('.run("users:access_level_sql_where",$profile_id).") and owner = $profile_id");
29 if (logged_on ||
(isset($page_owner) && $page_owner != -1)) {
31 $title = __gettext("Forum & Blogs");
33 $weblog_username = user_info('username', $profile_id);
37 if (user_type($page_owner) == "person") {
38 $personalWeblog = __gettext("Personal blog");
40 <li
><a href
="{$CFG->wwwroot}{$weblog_username}/weblog/">$personalWeblog</a
> (<a href
="{$CFG->wwwroot}{$weblog_username}/weblog/rss">RSS
</a
>)</li
>
42 } else if (user_type($page_owner) == "community") {
46 $forum_flag = user_flag_get('forum', $profile_id);
48 //echo $forum_default;
50 if ((!$forum_flag) && ($forum_default == 0))
54 else if ((!$forum_flag) && ($forum_default == 1))
60 $use_forum= $forum_flag;
63 if ($use_forum=="yes"){
65 $communityWeblog = __gettext("Community Forum");
68 <a href
="{$CFG->wwwroot}mod/forum/forum.php?weblog=$weblog_username">$communityWeblog</a
>
69 (<a href
="{$CFG->wwwroot}{$weblog_username}/weblog/rss"><img src
="{$CFG->wwwroot}mod/template/icons/rss.png" alt
="RSS" border
="0" /></a
>)</li
>
72 $blogArchive = __gettext("Archive");
73 $membersWeblog = __gettext("Members blog");
75 <li
><a href
="{$CFG->wwwroot}{$weblog_username}/weblog/archive/">$blogArchive</a
></li
>
76 <li
><a href
="{$CFG->wwwroot}{$weblog_username}/weblog/friends/">$membersWeblog</a
></li
>
80 $communityWeblog = __gettext("Community Blog");
83 <a href
="{$CFG->wwwroot}{$weblog_username}/weblog">$communityWeblog</a
>
84 (<a href
="{$CFG->wwwroot}{$weblog_username}/weblog/rss"><img src
="{$CFG->wwwroot}mod/template/icons/rss.png" alt
="RSS" border
="0" /></a
>)</li
>
87 $blogArchive = __gettext("Archive");
88 $membersWeblog = __gettext("Friends blog");
90 <li
><a href
="{$CFG->wwwroot}{$weblog_username}/weblog/archive/">$blogArchive</a
></li
>
91 <li
><a href
="{$CFG->wwwroot}{$weblog_username}/weblog/friends/">$membersWeblog</a
></li
>
99 $run_result .= "<li id=\"sidebar_weblog\">";
100 $run_result .= templates_draw(array(
101 'context' => 'sidebarholder',
106 $run_result .= "</ul></li>";