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


PHP recommendupdate函數代碼示例

本文整理匯總了PHP中recommendupdate函數的典型用法代碼示例。如果您正苦於以下問題:PHP recommendupdate函數的具體用法?PHP recommendupdate怎麽用?PHP recommendupdate使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


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

示例1: template

$subforumonly = $_G['forum']['simple'] & 1;
$simplestyle = !$_G['forum']['allowside'] || $page > 1 ? true : false;
if ($subforumonly) {
    $_G['setting']['fastpost'] = false;
    $_G['gp_orderby'] = '';
    if (!defined('IN_ARCHIVER')) {
        include template('diy:forum/forumdisplay:' . $_G['fid']);
    } else {
        include loadarchiver('forum/forumdisplay');
    }
    exit;
}
$page = $_G['setting']['threadmaxpages'] && $page > $_G['setting']['threadmaxpages'] ? 1 : $page;
$start_limit = ($page - 1) * $_G['tpp'];
if ($_G['forum']['modrecommend'] && $_G['forum']['modrecommend']['open']) {
    $_G['forum']['recommendlist'] = recommendupdate($_G['fid'], $_G['forum']['modrecommend'], '', 1);
}
$recommendgroups = array();
if ($_G['forum']['status'] != 3 && $_G['setting']['groupstatus']) {
    loadcache('forumrecommend');
    $recommendgroups = $_G['cache']['forumrecommend'][$_G['fid']];
}
if ($recommendgroups) {
    if (empty($_G['cookie']['collapse']) || strpos($_G['cookie']['collapse'], 'recommendgroups_' . $_G['fid']) === FALSE) {
        $collapse['recommendgroups'] = '';
        $collapseimg['recommendgroups'] = 'collapsed_no.gif';
    } else {
        $collapse['recommendgroups'] = 'display: none';
        $collapseimg['recommendgroups'] = 'collapsed_yes.gif';
    }
}
開發者ID:kleitz,項目名稱:sports,代碼行數:31,代碼來源:forum_forumdisplay.php

示例2: nl2br

        exit;
    }
}
if ($forum['rules']) {
    if (empty($_COOKIE['discuz_collapse']) || strpos($_COOKIE['discuz_collapse'], 'rules') === FALSE) {
        $collapse['rules'] = '';
        $collapse['rules_link'] = 'display: none';
    } else {
        $collapse['rules'] = 'display: none';
        $collapse['rules_link'] = '';
    }
    $forum['rules'] && ($forum['rules'] = nl2br($forum['rules']));
}
$forum['modrecommend'] = $forum['modrecommend'] ? unserialize($forum['modrecommend']) : array();
if ($forum['modrecommend'] && $forum['modrecommend']['open']) {
    $forum['recommendlist'] = recommendupdate($fid, $forum['modrecommend']);
}
if ($forum['recommendlist']) {
    if (empty($_COOKIE['discuz_collapse']) || strpos($_COOKIE['discuz_collapse'], 'recommendlist') === FALSE) {
        $collapse['recommendlist'] = '';
        $collapse['recommendlist_link'] = 'display: none';
    } else {
        $collapse['recommendlist'] = 'display: none';
        $collapse['recommendlist_link'] = '';
    }
}
$toptablewidth = $forum['rules'] && $forum['recommendlist'] ? '50%' : '100%';
$forum['typemodels'] = $forum['typemodels'] ? unserialize($forum['typemodels']) : array();
$moderatedby = moddisplay($forum['moderators'], 'forumdisplay');
$highlight = empty($highlight) ? '' : htmlspecialchars($highlight);
if ($forum['autoclose']) {
開發者ID:BGCX262,項目名稱:zyyhong-svn-to-git,代碼行數:31,代碼來源:forumdisplay.php

示例3: array_merge

         } else {
             $replybgnew = $_GET['replybgnew'];
         }
         $forumfielddata = array_merge($forumfielddata, array('viewperm' => $_GET['viewpermnew'], 'postperm' => $_GET['postpermnew'], 'replyperm' => $_GET['replypermnew'], 'getattachperm' => $_GET['getattachpermnew'], 'postattachperm' => $_GET['postattachpermnew'], 'postimageperm' => $_GET['postimagepermnew'], 'relatedgroup' => $_GET['relatedgroupnew'], 'spviewperm' => implode("\t", $_GET['spviewpermnew']), 'replybg' => $replybgnew));
     }
     if ($forumfielddata) {
         C::t('forum_forumfield')->update($fid, $forumfielddata);
     }
     if ($pluginsetting) {
         foreach ($_GET['pluginnew'] as $pluginvarid => $value) {
             $pluginvars[$pluginvarid][$fid] = $value;
         }
     }
     if ($modrecommendnew && !$modrecommendnew['sort']) {
         require_once libfile('function/forumlist');
         recommendupdate($fid, $modrecommendnew, '1');
     }
     if ($forumkeys[$fid] != $_GET['keysnew'] && preg_match('/^\\w*$/', $_GET['keysnew']) && !preg_match('/^\\d+$/', $_GET['keysnew'])) {
         $forumkeys[$fid] = $_GET['keysnew'];
         C::t('common_setting')->update('forumkeys', $forumkeys);
     }
 }
 if (array_key_exists($fid, $navs) && !$_GET['shownavnew']) {
     C::t('common_nav')->delete($navs[$fid]);
 } elseif (!array_key_exists($fid, $navs) && $_GET['shownavnew']) {
     $data = array('url' => 'forum.php?mod=forumdisplay&fid=' . $fid, 'identifier' => $fid, 'parentid' => 0, 'name' => $_GET['namenew'], 'displayorder' => 0, 'subtype' => '', 'type' => 5, 'available' => 1, 'navtype' => 0);
     C::t('common_nav')->insert($data);
 }
 if (empty($row['single'])) {
     foreach ($row as $key => $value) {
         unset($_GET['' . $key]);
開發者ID:tang86,項目名稱:discuz-utf8,代碼行數:31,代碼來源:admincp_forums.php


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