国产沈阳熟女视频|骚视频97网站一区日本在线视频|久1社区在线视频|综合久久国外自产拍无码精品视频|亚洲欧美Tv先锋|综合五月天网址制服丝袜在线露脸|1024欧美手机视频我不卡|日本二区欧美亚洲国产|丁香五月婷婷五月|综合 另类 一区

284292114@qq.com 中國站
行業(yè)新聞 網(wǎng)站建設(shè) 網(wǎng)絡(luò)推廣 首頁>新聞中心>網(wǎng)站建設(shè)

PB會員投稿后臺審核才能顯示,如何修改指定欄目不需要審核就可以顯示?

時間:2025-10-12   訪問量:0

打開:

apps/home/controller  找到:MemberController.php

搜索:// 會員投稿

找到添加數(shù)據(jù)的代碼。

// 構(gòu)建數(shù)據(jù)
            $data = array(
                'acode' => get_lg(),
                'scode' => $scode,
                'subscode' => $subscode,
                'title' => $title,
                'titlecolor' => $titlecolor,
                'subtitle' => $subtitle,
                'filename' => $filename,
                'author' => $author,
                'source' => $source,
                'outlink' => $outlink,
                'date' => $date,
                'ico' => $ico,
                'pics' => $pics,
                'picstitle' => $picstitle,
                'content' => $content,
                'tags' => $tags,
                'enclosure' => $enclosure,
                'seotitle' => $seotitle,
                'keywords' => $keywords,
                'description' => clear_html_blank($description),
                'sorting' => 255,
                'status' => 0,               
                'istop' => 0,
                'isrecommend' => 0,
                'isheadline' => 0,
                'gid' => 0,
                'gtype' => 4,
                'gnote' => '',
                'tpl' => '',
                'isfront' => 1,
                'visits' => 0,
                'likes' => 0,
                'oppose' => 0,
                'create_user' => $username,
                'update_user' => $username
            );


如果只是指定一個欄目的話,我們將數(shù)據(jù)修改一下:

 'status' => ($scode == 20 ? 1 : 0), // ★ 當投稿欄目為20的時候,直接發(fā)布。不用審核


如果要指定多個欄目的話,我們可以使用數(shù)組。修改成以下方式。

// 定義允許自動審核的欄目ID數(shù)組
$autoPassScodes = [18, 20, 25]; // 這里寫需要自動審核的欄目ID

// 構(gòu)建數(shù)據(jù)
$data = array(
    'acode' => get_lg(),
    'scode' => $scode,
    'subscode' => $subscode,
    'title' => $title,
    'titlecolor' => $titlecolor,
    'subtitle' => $subtitle,
    'filename' => $filename,
    'author' => $author,
    'source' => $source,
    'outlink' => $outlink,
    'date' => $date,
    'ico' => $ico,
    'pics' => $pics,
    'picstitle' => $picstitle,
    'content' => $content,
    'tags' => $tags,
    'enclosure' => $enclosure,
    'seotitle' => $seotitle,
    'keywords' => $keywords,
    'description' => clear_html_blank($description),
    'sorting' => 255,
    'status' => (in_array($scode, $autoPassScodes) ? 1 : 0), // ★ 數(shù)組方式判斷
    'istop' => 0,
    'isrecommend' => 0,
    'isheadline' => 0,
    'gid' => 0,
    'gtype' => 4,
    'gnote' => '',
    'tpl' => '',
    'isfront' => 1,
    'visits' => 0,
    'likes' => 0,
    'oppose' => 0,
    'create_user' => $username,
    'update_user' => $username
);


這樣就實現(xiàn)了某些欄目不用審核投稿就成功了。


服務咨詢
1對1咨詢,專業(yè)客服為您解疑答惑
聯(lián)系銷售
15899750475
在線咨詢
聯(lián)系在線客服,為您解答所有的疑問