本文整理汇总了PHP中construct_forum_jump函数的典型用法代码示例。如果您正苦于以下问题:PHP construct_forum_jump函数的具体用法?PHP construct_forum_jump怎么用?PHP construct_forum_jump使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了construct_forum_jump函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: print_no_permission
// the following is the check for actions which allow creation of new pms
if ($permissions['pmquota'] < 1 or !$vbulletin->userinfo['receivepm']) {
$show['createpms'] = false;
}
// check permission to use private messaging
if ($permissions['pmquota'] < 1 and (!$vbulletin->userinfo['pmtotal'] or in_array($_REQUEST['do'], array('insertpm', 'newpm'))) or !$vbulletin->userinfo['userid']) {
print_no_permission();
}
if (!$vbulletin->userinfo['receivepm'] and in_array($_REQUEST['do'], array('insertpm', 'newpm'))) {
eval(standard_error(fetch_error('pm_turnedoff')));
}
// start navbar
$navbits = array('usercp.php' . $vbulletin->session->vars['sessionurl_q'] => $vbphrase['user_control_panel'], 'private.php' . $vbulletin->session->vars['sessionurl_q'] => $vbphrase['private_messages']);
// select correct part of forumjump
$frmjmpsel['pm'] = 'class="fjsel" selected="selected"';
construct_forum_jump();
$onload = '';
$show['trackpm'] = $cantrackpm = $permissions['pmpermissions'] & $vbulletin->bf_ugp_pmpermissions['cantrackpm'];
$vbulletin->input->clean_gpc('r', 'pmid', TYPE_UINT);
// ############################### default do value ###############################
if (empty($_REQUEST['do'])) {
if (!$vbulletin->GPC['pmid']) {
$_REQUEST['do'] = 'messagelist';
} else {
$_REQUEST['do'] = 'showpm';
}
}
($hook = vBulletinHook::fetch_hook('private_start')) ? eval($hook) : false;
// ############################### start update folders ###############################
// update the user's custom pm folders
if ($_POST['do'] == 'updatefolders') {
示例2: construct_forum_jump
/**
* Returns the HTML for the forum jump menu
*
* @param integer ID of the parent forum for the group to be shown (-1 for all)
* @param boolean If true, evaluate the forumjump template too
* @param string Characters to prepend to forum titles to indicate depth
* @param string Not sure actually...
*/
function construct_forum_jump($parentid = -1, $addbox = true, $prependchars = '', $permission = '')
{
global $vbulletin, $optionselected, $usecategories, $jumpforumid, $jumpforumtitle, $jumpforumbits, $curforumid, $daysprune;
global $stylevar, $vbphrase, $defaultselected, $forumjump, $selectedone;
global $frmjmpsel;
// allows context sensitivity for non-forum areas
global $gobutton;
static $complete = false;
if ($complete or !$vbulletin->options['useforumjump'] or !($vbulletin->userinfo['permissions']['forumpermissions'] & $vbulletin->bf_ugp_forumpermissions['canview'])) {
return;
}
if (empty($vbulletin->iforumcache)) {
// get the vbulletin->iforumcache, as we use it all over the place, not just for forumjump
cache_ordered_forums(0, 1);
}
if (empty($vbulletin->iforumcache["{$parentid}"]) or !is_array($vbulletin->iforumcache["{$parentid}"])) {
return;
}
foreach ($vbulletin->iforumcache["{$parentid}"] as $forumid) {
$forumperms = $vbulletin->userinfo['forumpermissions']["{$forumid}"];
#if ((!($forumperms & $vbulletin->bf_ugp_forumpermissions['canview']) AND !$vbulletin->options['showprivateforums']) OR !($vbulletin->forumcache["$forumid"]['options'] & $vbulletin->bf_misc_forumoptions['showonforumjump']) OR !$vbulletin->forumcache["$forumid"]['displayorder'] OR !($vbulletin->forumcache["$forumid"]['options'] & $vbulletin->bf_misc_forumoptions['active']))
if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canview']) and ($vbulletin->forumcache["{$forumid}"]['showprivate'] == 1 or !$vbulletin->forumcache["{$forumid}"]['showprivate'] and !$vbulletin->options['showprivateforums']) or !($vbulletin->forumcache["{$forumid}"]['options'] & $vbulletin->bf_misc_forumoptions['showonforumjump']) or !$vbulletin->forumcache["{$forumid}"]['displayorder'] or !($vbulletin->forumcache["{$forumid}"]['options'] & $vbulletin->bf_misc_forumoptions['active'])) {
continue;
} else {
// set $forum from the $vbulletin->forumcache
$forum = $vbulletin->forumcache["{$forumid}"];
$optionvalue = $forumid;
$optiontitle = $prependchars . " {$forum['title_clean']}";
$optionclass = 'fjdpth' . iif($forum['depth'] > 4, 4, $forum['depth']);
if ($curforumid == $optionvalue) {
$optionselected = 'selected="selected"';
$optionclass = 'fjsel';
$selectedone = 1;
} else {
$optionselected = '';
}
eval('$jumpforumbits .= "' . fetch_template('option') . '";');
construct_forum_jump($optionvalue, 0, $prependchars . FORUM_PREPEND, $forumperms);
}
// if can view
}
// end foreach ($vbulletin->iforumcache[$parentid] AS $forumid)
if ($addbox) {
if ($selectedone != 1) {
$defaultselected = 'selected="selected"';
}
if (!is_array($frmjmpsel)) {
$frmjmpsel = array();
}
if (empty($daysprune)) {
$daysprune = '';
} else {
$daysprune = intval($daysprune);
}
($hook = vBulletinHook::fetch_hook('forumjump')) ? eval($hook) : false;
eval('$forumjump = "' . fetch_template('forumjump') . '";');
// prevent forumjump from being built more than once
$complete = true;
}
}