本文整理汇总了PHP中threadsortshow函数的典型用法代码示例。如果您正苦于以下问题:PHP threadsortshow函数的具体用法?PHP threadsortshow怎么用?PHP threadsortshow使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了threadsortshow函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: unset
$navigation .= ' <em>›</em> <a href="forum.php?mod=forumdisplay&fid=' . $_G['fid'] . '&archiveid=' . $archiveid . '">' . $t_name . '</a>';
}
unset($t_link, $t_name);
}
$_GET['extra'] = $_GET['extra'] ? rawurlencode($_GET['extra']) : '';
if (@in_array('forum_viewthread', $_G['setting']['rewritestatus'])) {
$canonical = rewriteoutput('forum_viewthread', 1, '', $_G['tid'], 1, '', '');
} else {
$canonical = 'forum.php?mod=viewthread&tid=' . $_G['tid'];
}
$_G['setting']['seohead'] .= '<link href="' . $_G['siteurl'] . $canonical . '" rel="canonical" />';
$_G['forum_tagscript'] = '';
$threadsort = $thread['sortid'] && isset($_G['forum']['threadsorts']['types'][$thread['sortid']]) ? 1 : 0;
if ($threadsort) {
require_once libfile('function/threadsort');
$threadsortshow = threadsortshow($thread['sortid'], $_G['tid']);
}
if (empty($_G['forum']['allowview'])) {
if (!$_G['forum']['viewperm'] && !$_G['group']['readaccess']) {
showmessage('group_nopermission', NULL, array('grouptitle' => $_G['group']['grouptitle']), array('login' => 1));
} elseif ($_G['forum']['viewperm'] && !forumperm($_G['forum']['viewperm'])) {
showmessagenoperm('viewperm', $_G['fid']);
}
} elseif ($_G['forum']['allowview'] == -1) {
showmessage('forum_access_view_disallow');
}
if ($_G['forum']['formulaperm']) {
formulaperm($_G['forum']['formulaperm']);
}
if ($_G['forum']['password'] && $_G['forum']['password'] != $_G['cookie']['fidpw' . $_G['fid']]) {
dheader("Location: {$_G['siteurl']}forum.php?mod=forumdisplay&fid={$_G['fid']}");
开发者ID:MCHacker,项目名称:discuz-docker,代码行数:31,代码来源:forum_viewthread.php
示例2: common_reply_oneself_fenlei
public function common_reply_oneself_fenlei($tid)
{
$sortid = C::t('forum_typeoptionvar')->fetch_all_by_tid_optionid($tid, null);
global $_G;
if (!empty($sortid)) {
$threadsortshow = threadsortshow($sortid[0]['sortid'], $tid);
$fenlei = "";
foreach ($threadsortshow[optionlist] as $k1 => $v1) {
if ($v1['type'] == "image") {
$fenlei .= $v1['title'] . ":\r\n";
} else {
$fenlei .= $v1['title'] . ':' . $v1['value'] . "\r\n";
}
}
$fenlei = str_replace("»", "", $fenlei);
$fenlei = str_replace(" ", " ", $fenlei);
$fenlei = preg_replace("/\\<(?!br).(.*?)\\>/is", '', $fenlei);
foreach ($threadsortshow[optionlist] as $opt) {
$opt_arr[] = $opt;
}
$fenlei = "";
foreach ($opt_arr as $v1) {
$fenlei .= $v1['title'] . ':' . $v1['value'] . "\r\n";
}
$fenlei = str_replace("»", "", $fenlei);
$fenlei = str_replace(" ", " ", $fenlei);
$fenlei = str_replace('onload="thumbImg(this)"', '', $fenlei);
$fenlei = str_replace('data/attachment/forum', '/mobcent/data/attachment/forum/mobcentSmallPreview', $fenlei);
$fenlei = trim(str_replace('border="0"', 'width="2" height="4" /', $fenlei));
$fenlei1 = doContent($fenlei);
$fenlei2 = getContentFont($fenlei);
foreach ($fenlei1 as $k => $v) {
if ($v['type'] == 0) {
unset($fenlei1[$k]);
} else {
}
}
$fenlei_array2 = explode('|~|', $fenlei2);
foreach ($fenlei_array2 as $k => $v) {
if (!empty($v)) {
$fenlei_arr[] = array("infor" => str_replace('<hr class="l" />', '', preg_replace("#(\\w*)\\<.*?\\>(\\w*)#", "\$1\$2", $v)), "type" => 0);
}
if (preg_replace("#(\\w*)\\<.*?\\>(\\w*)#", "\$1\$2", $fenlei1[$k]["infor"])) {
$fenlei_arr[] = $fenlei1[$k];
}
}
return $fenlei_arr;
}
}
开发者ID:frogoscar,项目名称:mobcent-discuz,代码行数:49,代码来源:topic.php
示例3: _getSortInfo
private function _getSortInfo($thread)
{
// from forum_viewthread template
$sort = array('title' => '', 'summary' => '');
global $_G;
$threadsort = $thread['sortid'] && isset($_G['forum']['threadsorts']['types'][$thread['sortid']]) ? 1 : 0;
if ($threadsort) {
require_once libfile('function/threadsort');
$threadsortshow = threadsortshow($thread['sortid'], $_G['tid']);
}
if ($threadsort && $threadsortshow) {
if ($threadsortshow['typetemplate']) {
//echo $threadsortshow['typetemplate'];
$sort = $this->_getSortByTemplate($threadsortshow);
} elseif ($threadsortshow['optionlist']) {
if ($threadsortshow['optionlist'] == 'expire') {
$sort['summary'] = WebUtils::t("该信息已经过期\n");
} else {
$sort['title'] = $_G['forum']['threadsorts']['types'][$_G['forum_thread']['sortid']];
if (is_array($threadsortshow['optionlist'])) {
foreach ($threadsortshow['optionlist'] as $option) {
if ($option['type'] != 'info') {
$sort['summary'] .= sprintf("%s :\t", $option['title']);
if ($option['value'] || $option['type'] == 'number' && $option['value'] !== '') {
$matches = array();
preg_match('/action=protectsort.+?optionid=(\\d+)/', $option['value'], $matches);
if (!empty($matches)) {
$option['value'] = $this->_getProtectSortOptionListValue($_G['tid'], $matches[1]);
} else {
$option['value'] = WebUtils::emptyHtml($option['value']);
}
$sort['summary'] .= $option['value'] . $option['unit'];
}
$sort['summary'] .= "\n";
}
}
}
}
}
}
return $sort;
}
开发者ID:frogoscar,项目名称:mobcent-discuz,代码行数:42,代码来源:PostListAction.php
示例4: _convertSortInfo
private function _convertSortInfo($sortId, $tid)
{
global $_G;
$returnStr = array();
require_once libfile('function/threadsort');
$sortInfo = threadsortshow($sortId, $tid);
foreach ($sortInfo['optionlist'] as $value) {
if ($value['type'] != 'select') {
$returnStr[] = $value['title'] . ':' . $value['value'];
}
}
if (count($returnStr)) {
return implode('<br/>', $returnStr);
}
return false;
}
开发者ID:softhui,项目名称:discuz,代码行数:16,代码来源:Security.php
示例5: groupperm
$status = groupperm($_G['forum'], $_G['uid']);
if ($status == 1) {
showmessage('forum_group_status_off');
} elseif ($status == 2) {
showmessage('forum_group_noallowed', 'forum.php?mod=group&fid=' . $_G['fid']);
} elseif ($status == 3) {
showmessage('forum_group_moderated', 'forum.php?mod=group&fid=' . $_G['fid']);
}
$navigation = ' <em>›</em> <a href="group.php">' . $_G['setting']['navs'][3]['navname'] . '</a> ' . get_groupnav($_G['forum']);
$_G['grouptypeid'] = $_G['forum']['fup'];
}
$_G['forum_tagscript'] = '';
$threadsort = $_G['forum_thread']['sortid'] && isset($_G['forum']['threadsorts']['types'][$_G['forum_thread']['sortid']]) ? 1 : 0;
if ($threadsort) {
require_once libfile('function/threadsort');
$threadsortshow = threadsortshow($_G['forum_thread']['sortid'], $_G['tid']);
}
if (empty($_G['forum']['allowview'])) {
if (!$_G['forum']['viewperm'] && !$_G['group']['readaccess']) {
showmessage('group_nopermission', NULL, array('grouptitle' => $_G['group']['grouptitle']), array('login' => 1));
} elseif ($_G['forum']['viewperm'] && !forumperm($_G['forum']['viewperm'])) {
$navtitle = '';
showmessagenoperm('viewperm', $_G['fid']);
}
} elseif ($_G['forum']['allowview'] == -1) {
$navtitle = '';
showmessage('forum_access_view_disallow');
}
if ($_G['forum']['formulaperm']) {
formulaperm($_G['forum']['formulaperm']);
}
开发者ID:v998,项目名称:discuzx-en,代码行数:31,代码来源:forum_viewthread.php
示例6: libfile
}
}
if ($sortdata['recommend']) {
$recommend = DB::fetch_first("SELECT expiration FROM " . DB::table('category_threadmod') . " WHERE tid='{$tid}' AND action='recommend' ORDER BY expiration DESC LIMIT 1");
if (TIMESTAMP > $recommend['expiration'] && !empty($recommend['expiration'])) {
DB::query("UPDATE " . DB::table('category_sortvalue') . "{$sortid} SET recommend='0' WHERE tid='{$tid}'", 'UNBUFFERED');
}
}
}
$navigation = "› <a href=\"{$modurl}?mod=list&cid={$cid}&sortid={$sortid}\">" . $sortlist[$sortid]['name'] . "</a> ";
$navigation .= $arealist['city'][$cityid] ? "› <a href=\"{$modurl}?mod=list&cid={$cid}&sortid={$sortid}&filter=all&city={$cityid}\">" . $arealist['city'][$cityid] . "</a> " : '';
$navigation .= $arealist['district'][$cityid][$districtid] ? "› <a href=\"{$modurl}?mod=list&cid={$cid}&sortid={$sortid}&filter=all&city={$cityid}&district={$districtid}\">" . $arealist['district'][$cityid][$districtid] . "</a> " : '';
$navigation .= $arealist['street'][$districtid][$streetid] ? "› <a href=\"{$modurl}?mod=list&cid={$cid}&sortid={$sortid}&filter=all&city={$cityid}&district={$districtid}&street={$streetid}\">" . $arealist['street'][$districtid][$streetid] . "</a> " : '';
$navtitle = $arealist['city'][$cityid] . $arealist['district'][$cityid][$districtid] . $arealist['street'][$districtid][$streetid] . $thread['subject'] . ' - ' . $sortlist[$sortid]['name'] . ' - ';
require_once libfile('function/category');
$threadsortshow = threadsortshow($thread['tid'], $sortoptionarray, $templatearray, $thread['authorid'], $sortdata['groupid']);
$thread['avatar'] = category_uc_avatar($thread['authorid']);
$thread['dateline'] = dgmdate($sortdata['dateline'], 'd');
$thread['message'] = nl2br(dhtmlspecialchars($thread['message']));
$groupid = $sortdata['groupid'];
if ($usergrouplist[$groupid]['type'] == 'intermediary') {
$usergrouptitle = $usergrouplist[$groupid]['title'] ? "<a href=\"{$modurl}?mod=usergroup&gid={$groupid}&cid={$cid}&sortid={$sortid}\">" . $usergrouplist[$groupid]['title'] . "</a>" : '';
$usergroupicon = $usergrouplist[$groupid]['icon'] ? "<a href=\"{$modurl}?mod=usergroup&gid={$groupid}&cid={$cid}&sortid={$sortid}\"><img src=\"" . $_G['setting']['attachurl'] . 'common/' . $usergrouplist[$groupid]['icon'] . "\"></a>" : '';
} else {
$usergrouptitle = $usergrouplist[$groupid]['title'] ? $usergrouplist[$groupid]['title'] : '';
$usergroupicon = $usergrouplist[$groupid]['icon'] ? "<img src=\"" . $_G['setting']['attachurl'] . 'common/' . $usergrouplist[$groupid]['icon'] . "\">" : '';
}
visitedsetcookie($thread['tid']);
$neighborhoodlist = neighborhood($thread['tid'], $sortid, $cityid, $districtid, $streetid, $sortoptionarray, $ntemplatearray, $modurl);
$piclist = array();
if ($sortdata['attachid']) {
开发者ID:pan289091315,项目名称:Discuz,代码行数:31,代码来源:view.php
注:本文中的threadsortshow函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论