'; default_exception(); $contents = Content::load_content_id_array(); for ($i = 0;$i < count($contents);$i++) { $contents[$i]['comments'] = Comment::get_comment_for_content($contents[$i]['content_id']); $contents[$i]['trackback'] = Content::get_trackbacks_for_content($contents[$i]['content_id']); $user1 = new User(); // *** FIXME: it looks like user::load used to take a second param // *** that determined whether it would load deleted users or not. // *** this disappeared a long time ago, though, and in the meantime // *** a new second param has appeared, that indicates the type of // *** the first param. so if anyone wants to put this back, feel // *** free... until then, the following code may not work as // *** expected: $user1->load((int)$contents[$i]['author_id']); $contents[$i]['author_name'] = ''.$user1->first_name.''; //$contents[$i]['create_time'] = content_date($contents[$i]['changed']); $contents[$i]['trackback_url'] = "$base_url/pa_trackback.php?cid=".$contents[$i]['content_id']; $tags = Tag::load_tags_for_content($contents[$i]['content_id']); if($tags) { $t = array(); for($j = 0;$j < count($tags);$j++) { $t_name = $tags[$j]['name']; $uid = $_SESSION['user']['id']; $t[] = "".$tags[$j]['name'].""; } $contents[$i]['tag_entry'] = "Tags : ".implode(", ", $t); } else { $contents[$i]['tag_entry'] = ""; } } $allgroups = Group::get_user_groups((int)$_SESSION['user']['id']); $heading = "My Recent Groups"; if (!$allgroups) { $error_msg = "Not a member of any group yet."; } if ($allgroups) { foreach ($allgroups as $groups) { $gids[] = $groups['gid']; } } $group_details = array(); for ($gr = 0;$gr < count($gids);$gr++) { $group = ContentCollection::load_collection($gids[$gr], $_SESSION['user']['id']); $group_tags = Tag::load_tags_for_content_collection($gids[$gr]); $member_exist = Group::member_exists($gids[$gr], $_SESSION['user']['id']); if($group_tags) { $t = array(); for($i = 0;$i < count($group_tags);$i++) { $name = $group_tags[$i]['name']; $t[] = ''.$group_tags[$i]['name'].''; } $tag_string = "Tags: ".implode(", ", $t); } else { $tag_string = ""; } if ($group->picture) { $picture = "picture."\" height='60px' width='60px'/>"; } else { $picture = ""; } if (!$_SESSION['user']['id']) { $join_string = ''; } elseif ($member_exist == FALSE) { $join_string = ' | JOIN'; } else { $join_string = ''; } if ($group->reg_type == 0) { $reg = "Open"; } elseif ($group->reg_type == 1) { $reg = "Moderated"; } elseif ($group->reg_type == 2) { $reg = "Invite Only"; } if ($group->access_type == 0) { $access = "Public"; } elseif ($group->access_type == 1) { $access = "Member Only"; } $members = count($group->get_members()); $group_details[$gr]['id'] = $group->collection_id; $group_details[$gr]['title'] = stripslashes($group->title); $group_details[$gr]['desc'] = stripslashes($group->description); $group_details[$gr]['tag_string'] = $tag_string; $group_details[$gr]['picture'] = $picture; $group_details[$gr]['reg'] = $reg; $group_details[$gr]['access'] = $access; $group_details[$gr]['join_string'] = $join_string; $group_details[$gr]['members'] = $members; } $header = & new Template(CURRENT_THEME_FSPATH."/header_all.tpl"); $header->set('current_theme_path', $current_theme_path); $module2 = new LinkModule($links['myself']); $module2->mode = PRI; $module2->title = "Published Links"; $module2->orientation = LEFT; $module1 = new ShowContentModule($contents); $module1->title = "Community Content"; $module3 = new LinkModule($links['myself']); $module3->mode = PRI; $module3->block_type = 'Homepage'; $module3->title = "My Links"; $module3->orientation = LEFT; $module4 = new GroupModule($group_details); $module4->block_type = "GroupList"; $module4->title = "GroupList"; $module5 = new GroupModule($contents); $module5->block_type = "GroupCategory"; $module5->title = "GroupCategory"; $module6 = new ContentModule($contents); $module6->title = "Community blog Content"; print $header->fetch(); print $module2->render(); print '
'; print $module1->render(); print $module4->render(); print $module5->render(); print $module6->render(); print '
'; print '
'; print $module3->render(); print '
'; ?>