array($module_name)); /* This function is a Callback function which initialize the value for the BLOCK MODULES */ if (!empty($_GET['gid'])) { $gid = (int)$_GET['gid']; $group_data = ContentCollection::load_collection($gid, $_SESSION['user']['id']); $group_name = $group_data->title; if ($_SESSION['user']['id']) { $is_member = Group::get_user_type($_SESSION['user']['id'], (int)$gid); } } function setup_module($column, $module, $obj) { /* in this module we have to set user_id , group_id, as well as netwrok_id */ global $type, $group_data, $is_member, $msg, $show_view; $obj->type = $type; $obj->show_view = $show_view; switch ($module) { case 'ImagesMediaGalleryModule': case 'AudiosMediaGalleryModule': case 'VideosMediaGalleryModule': if ($group_data->reg_type == REG_INVITE && $is_member == NOT_A_MEMBER) { $msg = MessagesHandler::get_message(9005); return "skip"; } break; } } // fetching the data from the Constants.php and Rendering the data of the page // at present we are setting the value of setting data $page = new PageRenderer("setup_module", PAGE_MEDIA_GALLERY, "Group Media Gallery", "container_one_column_media_gallery.tpl", "header_group.tpl", PUB, NULL, $network_info, $onload,$setting_data); $page->header->set('group_name', $group_name); if (!empty($_GET['msg_id'])) { $msg_obj = new MessagesHandler(); $msg = $msg_obj->get_message($_GET['msg_id']); } if (!empty($msg)) { $msg_tpl = & new Template(CURRENT_THEME_FSPATH."/display_message.tpl"); $msg_tpl->set('message', $msg); $page->add_module("middle", "top", $msg_tpl->fetch()); } $theme_details = get_group_theme(@$_GET['gid']); if (is_array($theme_details['css_files'])) { foreach ($theme_details['css_files'] as $key => $value) { $page->add_header_css($value); } } $page->header->set('caption_image', $group_data->header_image); $page->header->set('desktop_image_action', $group_data->header_image_action); $page->header->set('theme_details', $theme_details); $page->header->set('display_header_image', $group_data->display_header_image); echo $page->render(); ?>