function setup_module($column, $moduleName, $obj) { global $content_type, $show_media, $uid, $group_ids, $paging, $error_msg, $login_uid; $extra = unserialize(PA::$network_info->extra); $authorized_users = array(); if (!empty($show_media)) { $authorized_users = array($show_media->author_id, PA::$network_info->owner_id); if ($extra['network_content_moderation'] == NET_YES && Network::item_exists_in_moderation($show_media->content_id, $show_media->parent_collection_id, 'content') && !in_array($login_uid, $authorized_users)) { $error_msg = 1001; return 'skip'; } } switch ($column) { case 'middle': $obj->mode = PUB; $obj->content_id = $_REQUEST['cid']; $obj->uid = $uid; $obj->media_data = $show_media; $obj->Paging["page"] = $paging["page"]; $obj->Paging["show"] = $paging["show"]; break; default: return 'skip'; break; } }
$setting_data = ModuleSetting::load_setting(PAGE_PERMALINK, $uid); $content = Content::load_content((int) $_REQUEST['cid'], (int) PA::$login_uid); // apply output filtering $content->title = _out($content->title); $author = new User(); $author->load((int) $content->author_id); $is_group_content = FALSE; /** If Collection Type is a Group than left and right module will be the same as Group page */ $gid = @$_REQUEST['ccid']; $content_id = @$_REQUEST['cid']; $error_message = ''; $authorized_users = array($content->author_id, PA::$network_info->owner_id); $extra = unserialize(PA::$network_info->extra); if (@$extra['network_content_moderation'] == NET_YES && Network::item_exists_in_moderation($content_id, $content->parent_collection_id, 'content') && !in_array(PA::$login_uid, $authorized_users)) { $error_message = 1001; } if ($content->parent_collection_id != -1) { //load here content collection $cid = $content->parent_collection_id; $collection = ContentCollection::load_collection((int) $cid, PA::$login_uid); if ($collection->type == GROUP_COLLECTION_TYPE) { $is_member = Group::member_exists((int) $cid, PA::$login_uid); $is_admin = Group::is_admin((int) $cid, PA::$login_uid); $is_group_content = TRUE; $header = 'header_group.tpl'; // group header will be user in this case. //its group so lets load group details and group modules $media_gallery = 'grouppage'; $group_details = pageLoadGroup($collection);