當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Network::item_exists_in_moderation方法代碼示例

本文整理匯總了PHP中Network::item_exists_in_moderation方法的典型用法代碼示例。如果您正苦於以下問題:PHP Network::item_exists_in_moderation方法的具體用法?PHP Network::item_exists_in_moderation怎麽用?PHP Network::item_exists_in_moderation使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Network的用法示例。


在下文中一共展示了Network::item_exists_in_moderation方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: setup_module

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;
    }
}
開發者ID:Cyberspace-Networks,項目名稱:PeopleAggregator,代碼行數:26,代碼來源:media_full_view.php

示例2: _out

$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);
開發者ID:Cyberspace-Networks,項目名稱:PeopleAggregator,代碼行數:31,代碼來源:content.php


注:本文中的Network::item_exists_in_moderation方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。