function render() { $thread_obj = new MessageBoard(); $request_info = load_info(); $this->parent_id = $request_info['parent_id']; $this->parent_name_hidden = $request_info['parent_name_hidden']; $this->parent_type = $request_info['parent_type']; $this->header_title = $request_info['header_title']; $thread_obj->set_parent($this->parent_id, $this->parent_type); $this->Paging["count"] = $thread_obj->get($count = TRUE); $this->forum_details = $thread_obj->get($count = FALSE, $this->Paging["show"], $this->Paging["page"], 'changed', 'ASC'); // Here we finding the ID of group owner $group_owner = Group::get_admin_id($_GET['ccid']); $this->group_owner_id = $group_owner['user_id']; $this->inner_HTML = $this->generate_inner_html(); $content = parent::render(); return $content; }
function render() { global $base_url; $request_info = load_info(); $parent_id = $request_info['parent_id']; $parent_type = $request_info['parent_type']; $msg_board_obj = new MessageBoard(); $msg_board_obj->parent_id = $parent_id; $msg_board_obj->parent_type = $parent_type; $this->forum_messages = $msg_board_obj->get($count = FALSE, $show = 5, $page = 1, $sort_by = 'changed', $direction = 'DESC'); if (sizeof($this->forum_messages)) { $this->view_all_url = "{$base_url}/forum_home.php?gid={$parent_id}"; } $this->parent_id = $parent_id; $this->inner_HTML = $this->generate_inner_html(); $content = parent::render(); return $content; }
function render() { global $paging; $request_info = load_info(); $this->parent_id = $request_info['parent_id']; $this->parent_type = $request_info['parent_type']; $this->parent_name_hidden = $request_info['parent_name_hidden']; $this->header_title = $request_info['header_title']; $thread_obj = new MessageBoard(); $thread_obj->set_parent($this->parent_id, $this->parent_type); $this->Paging["count"] = $thread_obj->get($count = TRUE); $this->Paging['show'] = $paging['show']; $this->Paging['page'] = $paging['page']; $this->forum_details = $thread_obj->get($count = FALSE, $this->Paging["show"], $this->Paging["page"]); $group_data = Group::load_group_by_id((int) $_GET['gid']); $this->group_name = $group_data->title; $this->topic_count = $this->Paging["count"]; $this->inner_HTML = $this->generate_inner_html(); $content = parent::render(); return $content; }
function get_forum_links() { global $paging, $base_url; $request_info = load_info(); $this->parent_id = $request_info['parent_id']; $this->parent_type = $request_info['parent_type']; $this->parent_name_hidden = $request_info['parent_name_hidden']; $this->header_title = $request_info['header_title']; $thread_obj = new MessageBoard(); $thread_obj->set_parent($this->parent_id, $this->parent_type); $this->Paging["count"] = $thread_obj->get($count = TRUE); $forum_details = $thread_obj->get($count = FALSE, $this->Paging["show"], $this->Paging["page"]); $cnt = count($forum_details); if ($cnt > 0) { for ($i = 1; $i <= $cnt; $i++) { $forum_details[$i]['hyper_link'] = $base_url . '/forum_messages.php?mid=' . $forum_details[$i]['boardmessage_id'] . '&ccid=' . $_GET['gid']; $forum_details[$i]['edit_link'] = $base_url . '/edit_forum.php?mid=' . $forum_details[$i]['boardmessage_id'] . '&gid=' . $_GET['gid']; $forum_details[$i]['delete_link'] = $base_url . '/deleteforumbyadmin.php?mid=' . $forum_details[$i]['boardmessage_id'] . '&ccid=' . $_GET['gid'] . '" onclick="javascript:return confirm(\'Are you sure you want to delete this forum ? \');"'; } } return $forum_details; }
$use_theme = 'Beta'; //TODO : Remove this when new UI is completely implemented. //including necessary files include "includes/page.php"; include_once "{$path_prefix}/ext/Group/Group.php"; require_once "{$path_prefix}/api/MessageBoard/MessageBoard.php"; /*including Js files */ $parameter .= js_includes('common.js'); // for query count global $query_count_on_page, $login_uid; $query_count_on_page = 0; $user = new User(); $user->load($login_uid); $login_name = $user->login_name; $email = $user->email; $request_info = load_info(); $parent_id = $request_info['parent_id']; $parent_type = $request_info['parent_type']; $is_member = Group::member_exists($parent_id, $login_uid); if ($is_member == FALSE) { $error = TRUE; $msg[] = 'Please Join this group to perform any activity'; } $gid = (int) $_GET['gid']; function setup_module($column, $module, $obj) { global $group_data, $gid; $obj->gid = $gid; switch ($module) { case 'MembersFacewallModule': $group = new Group();
function edit_forum_topic($_form) { filter_all_post($_POST); $error = FALSE; $msg = ''; $title = trim($_POST['forum_title']); $body = trim($_POST['forum_contents']); if (empty($title)) { $error = TRUE; $msg .= "Please specify a title for the forum topic"; } if (empty($body)) { $error = TRUE; $msg .= "Please enter small description of the topic"; } if (!$error) { $request_info = load_info(); $cat_obj = new MessageBoard(); $cat_obj->title = $title; $cat_obj->body = $body; $cat_obj->boardmessage_id = $_REQUEST['mid']; if ($_POST['chk_allow_anonymous'] != ALLOW_ANONYMOUS) { $cat_obj->allow_anonymous = 0; } else { $cat_obj->allow_anonymous = 1; } try { $mid = $cat_obj->save($login_uid, NULL); } catch (PAException $e) { $msg = "Error occured in saving data"; $error = TRUE; } } $msg_array = array(); $msg_array['failure_msg'] = $msg; $msg_array['success_msg'] = NULL; $return_array = array('msg' => $msg_array); return $return_array; }