当前位置: 首页>>代码示例>>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;未经允许,请勿转载。