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