本文整理汇总了PHP中construct_navbits函数的典型用法代码示例。如果您正苦于以下问题:PHP construct_navbits函数的具体用法?PHP construct_navbits怎么用?PHP construct_navbits使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了construct_navbits函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: construct_poll_nav
function construct_poll_nav($foruminfo, $threadinfo)
{
global $vbulletin, $vbphrase;
$navbits = array();
$navbits[fetch_seo_url('forumhome', array())] = $vbphrase['forum'];
$parentlist = array_reverse(explode(',', substr($foruminfo['parentlist'], 0, -3)));
foreach ($parentlist as $forumID) {
$forumTitle = $vbulletin->forumcache["{$forumID}"]['title'];
$navbits[fetch_seo_url('forum', array('forumid' => $forumID, 'title' => $forumTitle))] = $forumTitle;
}
$navbits[fetch_seo_url('thread', $threadinfo)] = $threadinfo['prefix_plain_html'] . ' ' . $threadinfo['title'];
switch ($_REQUEST['do']) {
case 'newpoll':
$navbits[''] = $vbphrase['post_a_poll'];
break;
case 'polledit':
$navbits[''] = $vbphrase['edit_poll'];
break;
case 'showresults':
$navbits[''] = $vbphrase['view_poll_results'];
break;
// are there more?
}
return construct_navbits($navbits);
}
示例2: construct_postings_nav
function construct_postings_nav($foruminfo, $threadinfo)
{
global $vbulletin, $vbphrase;
$navbits = array();
$navbits[fetch_seo_url('forumhome', array())] = $vbphrase['forum'];
$parentlist = array_reverse(explode(',', substr($foruminfo['parentlist'], 0, -3)));
foreach ($parentlist as $forumID) {
$forumTitle = $vbulletin->forumcache["{$forumID}"]['title'];
$navbits[fetch_seo_url('forum', array('forumid' => $forumID, 'title' => $forumTitle))] = $forumTitle;
}
$navbits[fetch_seo_url('thread', $threadinfo)] = $threadinfo['prefix_plain_html'] . ' ' . $threadinfo['title'];
switch ($_REQUEST['do']) {
case 'movethread':
$navbits[''] = $vbphrase['move_thread'];
break;
case 'copythread':
$navbits[''] = $vbphrase['copy_thread'];
break;
case 'editthread':
$navbits[''] = $vbphrase['edit_thread'];
break;
case 'deletethread':
$navbits[''] = $vbphrase['delete_thread'];
break;
case 'mergethread':
$navbits[''] = $vbphrase['merge_threads'];
break;
}
return construct_navbits($navbits);
}
示例3: construct_postings_nav
function construct_postings_nav($foruminfo, $threadinfo)
{
global $vbulletin, $vbphrase;
$navbits = array();
$parentlist = array_reverse(explode(',', substr($foruminfo['parentlist'], 0, -3)));
foreach ($parentlist as $forumID) {
$forumTitle = $vbulletin->forumcache["{$forumID}"]['title'];
$navbits['forumdisplay.php?' . $vbulletin->session->vars['sessionurl'] . "f={$forumID}"] = $forumTitle;
}
$navbits['showthread.php?' . $vbulletin->session->vars['sessionurl'] . "t={$threadinfo['threadid']}"] = $threadinfo['prefix_plain_html'] . ' ' . $threadinfo['title'];
switch ($_REQUEST['do']) {
case 'movethread':
$navbits[''] = $vbphrase['move_thread'];
break;
case 'copythread':
$navbits[''] = $vbphrase['copy_thread'];
break;
case 'editthread':
$navbits[''] = $vbphrase['edit_thread'];
break;
case 'deletethread':
$navbits[''] = $vbphrase['delete_thread'];
break;
case 'deleteposts':
$navbits[''] = $vbphrase['delete_posts'];
break;
case 'mergethread':
$navbits[''] = $vbphrase['merge_threads'];
break;
}
return construct_navbits($navbits);
}
示例4: prepareBreadCrumb
/**
* Prepares the breadcrumb for the template.
*/
protected function prepareBreadCrumb()
{
// Set the navbits from the breadcrumbinfo
$navbits = array();
foreach ($this->breadcrumbinfo AS $breadcrumb)
{
$navbits[$breadcrumb['link']] = $breadcrumb['title'];
}
$navbits[''] = $this->pagetitle;
$this->navbits = construct_navbits($navbits);
}
示例5: construct_poll_nav
function construct_poll_nav($foruminfo, $threadinfo)
{
global $vbulletin, $vbphrase;
$navbits = array();
$parentlist = array_reverse(explode(',', substr($foruminfo['parentlist'], 0, -3)));
foreach ($parentlist as $forumID) {
$forumTitle = $vbulletin->forumcache["{$forumID}"]['title'];
$navbits['forumdisplay.php?' . $vbulletin->session->vars['sessionurl'] . "f={$forumID}"] = $forumTitle;
}
$navbits['showthread.php?' . $vbulletin->session->vars['sessionurl'] . "t={$threadinfo['threadid']}"] = $threadinfo['prefix_plain_html'] . ' ' . $threadinfo['title'];
switch ($_REQUEST['do']) {
case 'newpoll':
$navbits[''] = $vbphrase['post_a_poll'];
break;
case 'polledit':
$navbits[''] = $vbphrase['edit_poll'];
break;
case 'showresults':
$navbits[''] = $vbphrase['view_poll_results'];
break;
// are there more?
}
return construct_navbits($navbits);
}
示例6: eval
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('custom_' . $template_name) . '");');
}
$_REQUEST['do'] = 'showsmilies';
// ############################### start show smilies ###############################
if ($_REQUEST['do'] == 'showsmilies') {
$smiliebits = '';
($hook = vBulletinHook::fetch_hook('misc_smilieslist_start')) ? eval($hook) : false;
$smilies = $db->query_read_slave("\n\t\tSELECT smilietext,smiliepath,smilie.title,imagecategory.title AS category\n\t\tFROM " . TABLE_PREFIX . "smilie AS smilie\n\t\tLEFT JOIN " . TABLE_PREFIX . "imagecategory AS imagecategory USING(imagecategoryid)\n\t\tORDER BY imagecategory.displayorder, imagecategory.title, smilie.displayorder\n\t");
while ($smilie = $db->fetch_array($smilies)) {
$smilie['title'] = htmlspecialchars_uni($smilie['title']);
if ($smilie['category'] != $lastcat) {
($hook = vBulletinHook::fetch_hook('misc_smilieslist_category')) ? eval($hook) : false;
eval('$smiliebits .= "' . fetch_template('help_smilies_category') . '";');
}
exec_switch_bg();
($hook = vBulletinHook::fetch_hook('misc_smilieslist_smilie')) ? eval($hook) : false;
eval('$smiliebits .= "' . fetch_template('help_smilies_smilie') . '";');
$lastcat = $smilie['category'];
}
$navbits = construct_navbits(array('faq.php' . $vbulletin->session->vars['sessionurl_q'] => $vbphrase['faq'], '' => $vbphrase['smilie_list']));
eval('$navbar = "' . fetch_template('navbar') . '";');
($hook = vBulletinHook::fetch_hook('misc_smilieslist_complete')) ? eval($hook) : false;
eval('print_output("' . fetch_template('help_smilies') . '");');
}
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 22:41, Fri Oct 10th 2008
|| # CVS: $RCSfile$ - $Revision: 27128 $
|| ####################################################################
\*======================================================================*/
示例7: print_no_permission
if (!$userinfo['canviewmyblog']) {
print_no_permission();
}
if ($vbulletin->userinfo['userid'] == $userinfo['userid'] and !($vbulletin->userinfo['permissions']['vbblog_general_permissions'] & $vbulletin->bf_ugp_vbblog_general_permissions['blog_canviewown'])) {
print_no_permission();
}
if ($vbulletin->userinfo['userid'] != $userinfo['userid'] and !($vbulletin->userinfo['permissions']['vbblog_general_permissions'] & $vbulletin->bf_ugp_vbblog_general_permissions['blog_canviewothers'])) {
// Can't view other's entries so off you go to your own blog.
exec_header_redirect("blog.php?{$session['sessionurl']}u=" . $vbulletin->userinfo['userid']);
}
$show['usercloud'] = true;
$tag_cloud = fetch_blog_tagcloud('usage', false, $userinfo['userid']);
} else {
$tag_cloud = fetch_blog_tagcloud('usage');
}
$navbits = construct_navbits(array('blog.php' . $vbulletin->session->vars['sessionurl_q'] => $vbphrase['blogs'], '' => $vbphrase['tags']));
$navbar = render_navbar_template($navbits);
($hook = vBulletinHook::fetch_hook('blog_tags_cloud_complete')) ? eval($hook) : false;
if ($userinfo) {
$sidebar =& build_user_sidebar($userinfo);
} else {
$sidebar =& build_overview_sidebar();
}
$templater = vB_Template::create('blog_tag_cloud');
$templater->register('tag_cloud', $tag_cloud);
$templater->register('tag_delimiters', $tag_delimiters);
$templater->register('userinfo', $userinfo);
$content = $templater->render();
$headinclude .= vB_Template::create('blog_css')->render();
$templater = vB_Template::create('BLOG');
$templater->register_page_templates();
示例8: if
if (!$vbulletin->options['displayemails'])
{
eval(standard_error(fetch_error('emaildisabled')));
}
else if (!$userinfo['showemail'])
{
eval(standard_error(fetch_error('usernoemail', $vbulletin->options['contactuslink'])));
}
else
{
($hook = vBulletinHook::fetch_hook('sendmessage_mailmember')) ? eval($hook) : false;
if ($vbulletin->options['secureemail']) // use secure email form or not?
{
// generate navbar
$navbits = construct_navbits(array('' => $vbphrase['email']));
$navbar = render_navbar_template($navbits);
$url =& $vbulletin->url;
$templater = vB_Template::create('mailform');
$templater->register_page_templates();
$templater->register('message', $message);
$templater->register('navbar', $navbar);
$templater->register('subject', $subject);
$templater->register('url', $url);
$templater->register('userinfo', $userinfo);
print_output($templater->render());
}
else
{
require_once(DIR . '/includes/functions_user.php');
示例9: while
$picturebit_height = $vbulletin->options['album_thumbsize'] + (($usercss ? $stylevar['cellspacing'] : 0) + $stylevar['cellpadding']) * 2 + 4;
$picturebit_width = $vbulletin->options['album_thumbsize'] + (($usercss ? $stylevar['cellspacing'] : 0) + $stylevar['cellpadding']) * 2;
$picturebits = '';
$unread_count = 0;
while ($picture = $db->fetch_array($pictures)) {
// $comment contains picture and album info
$picture = prepare_pictureinfo_thumb($picture, $picture);
$picture['unreadcomments'] = vb_number_format($picture['unreadcomments']);
($hook = vBulletinHook::fetch_hook('album_unread_picturebit')) ? eval($hook) : false;
eval('$picturebits .= "' . fetch_template('album_picturebit_unread') . '";');
}
if ($moderated_count != $vbulletin->userinfo['pcunreadcount']) {
// back counter -- likely tachy based, rebuild all counters
require_once DIR . '/includes/functions_picturecomment.php';
build_picture_comment_counters($vbulletin->userinfo['userid']);
}
if (!$picturebits) {
standard_error(fetch_error('no_unread_picture_comments', 'album.php?' . $vbulletin->session->vars['sessionurl'] . "u={$userinfo['userid']}"), '', false);
}
($hook = vBulletinHook::fetch_hook('album_unread_complete')) ? eval($hook) : false;
// navbar and final output
$navbits = construct_navbits(array('member.php?' . $vbulletin->session->vars['sessionurl'] . "u={$userinfo['userid']}" => construct_phrase($vbphrase['xs_profile'], $userinfo['username']), 'album.php?' . $vbulletin->session->vars['sessionurl'] . "u={$userinfo['userid']}" => construct_phrase($vbphrase['xs_albums'], $userinfo['username']), '' => $vbphrase['unread_picture_comments']));
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('album_unreadcomments') . '");');
}
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 22:41, Fri Oct 10th 2008
|| # CVS: $RCSfile$ - $Revision: 27273 $
|| ####################################################################
\*======================================================================*/
示例10: construct_navbits
$templater->register('newvisitormessages', $newvisitormessages);
$templater->register('numdiscussions', $numdiscussions);
$templater->register('numpms', $numpms);
$templater->register('numsocialgroups', $numsocialgroups);
$templater->register('numthreads', $numthreads);
$templater->register('pageinfo_vm', $pageinfo_vm);
$templater->register('pendingfriendrequests', $pendingfriendrequests);
$templater->register('pendingfriendstext', $pendingfriendstext);
$templater->register('reputationcolspan', $reputationcolspan);
$templater->register('reputationcommentbits', $reputationcommentbits);
$templater->register('subscribedthreadscolspan', $subscribedthreadscolspan);
$templater->register('template_hook', $template_hook);
$templater->register('threadbits', $threadbits);
$HTML = $templater->render();
// build navbar
$navbits = construct_navbits(array('' => $vbphrase['user_control_panel']));
$navbar = render_navbar_template($navbits);
$templater = vB_Template::create('USERCP_SHELL');
$templater->register_page_templates();
$templater->register('cpnav', $cpnav);
$templater->register('HTML', $HTML);
$templater->register('navbar', $navbar);
$templater->register('navclass', $navclass);
$templater->register('onload', $onload);
$templater->register('pagetitle', $pagetitle);
$templater->register('template_hook', $template_hook);
$templater->register('includecss', $includecss);
print_output($templater->render());
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 23:48, Wed Mar 24th 2010
示例11: array
$pagenavbits = array("u={$userinfo['userid']}", "u2={$userinfo2['userid']}");
if ($perpage != $vbulletin->options['vm_perpage']) {
$pagenavbits[] = "pp={$perpage}";
}
if ($vbulletin->GPC['showignored']) {
$pagenavbits[] = 'showignored=1';
}
$pagenavurl = 'converse.php?' . $vbulletin->session->vars['sessionurl'] . implode('&', $pagenavbits);
$block_data['pagenav'] = construct_page_nav($pagenumber, $perpage, $messagetotal, $pagenavurl, '');
if ($show['quickcomment']) {
require_once DIR . '/includes/functions_editor.php';
$block_data['editorid'] = construct_edit_toolbar('', false, 'visitormessage', $vbulletin->options['allowsmilies'], true, false, 'qr_small', '', array(), 'content', 'vBForum_VisitorMessage', 0, $userinfo['userid']);
$block_data['messagearea'] =& $messagearea;
$block_data['clientscript'] = $vBeditTemplate['clientscript'];
}
$navbits = construct_navbits(array(fetch_seo_url('member', $userinfo) => $userinfo['username'], '' => construct_phrase($vbphrase['conversation_between_x_and_y'], $userinfo['username'], $userinfo2['username'])));
$navbar = render_navbar_template($navbits);
$usercss = construct_usercss($userinfo, $show['usercss_switch']);
$show['usercss_switch'] = ($show['usercss_switch'] and $vbulletin->userinfo['userid'] != $userinfo['userid']);
construct_usercss_switch($show['usercss_switch'], $usercss_switch_phrase);
($hook = vBulletinHook::fetch_hook('converse_complete')) ? eval($hook) : false;
$templater = vB_Template::create('memberinfo_block_visitormessaging');
$templater->register('block_data', $block_data);
$templater->register('prepared', $prepared);
$templater->register('userinfo', $userinfo);
$templater->register('userinfo2', $userinfo2);
$html = $templater->render();
$templater = vB_Template::create('converse');
$templater->register_page_templates();
$templater->register('html', $html);
$templater->register('navbar', $navbar);
示例12: print_no_permission
require_once DIR . '/includes/functions_search.php';
require_once DIR . '/includes/functions_forumlist.php';
require_once DIR . '/includes/functions_misc.php';
//new search stuff.
require_once DIR . '/vb/search/core.php';
require_once DIR . '/vb/legacy/currentuser.php';
require_once DIR . '/vb/search/resultsview.php';
if (!$vbulletin->options['threadtagging']) {
print_no_permission();
}
($hook = vBulletinHook::fetch_hook('tags_start')) ? eval($hook) : false;
// #######################################################################
if ($_REQUEST['do'] == 'cloud') {
require_once DIR . '/includes/functions_search.php';
$tag_cloud = fetch_tagcloud('usage');
$navbits = construct_navbits(array('' => $vbphrase['tags']));
$navbar = render_navbar_template($navbits);
($hook = vBulletinHook::fetch_hook('tags_cloud_complete')) ? eval($hook) : false;
$templater = vB_Template::create('tag_cloud_page');
$templater->register_page_templates();
$templater->register('navbar', $navbar);
$templater->register('tag_cloud', $tag_cloud);
print_output($templater->render());
}
// #######################################################################
if ($_REQUEST['do'] == 'tag') {
$vbulletin->input->clean_array_gpc('r', array('tag' => TYPE_NOHTML, 'pagenumber' => TYPE_UINT, 'perpage' => TYPE_UINT));
if (!$vbulletin->GPC['tag']) {
standard_error(fetch_error('invalidid', $vbphrase['tag'], $vbulletin->options['contactuslink']));
}
$search_core = vB_Search_Core::get_instance();
示例13: array
// get special phrase groups
$phrasegroups = array('pointmarket');
// get special data templates from the datastore
$specialtemplates = array();
// pre-cache templates used by all actions
$globaltemplates = array('MARKET', 'market_sidebar');
// pre-cache templates used by specific actions
$actiontemplates = array('market_category', 'market_itemlist', 'market_itembuy', 'market_itembuy_do', 'market_home', 'market_gift_list', 'market_gift_access_bit', 'market_gift_access', 'market_gambling', 'market_gambling_bit', 'market_refund', 'market_donate_history', 'market_steal_history', 'market_steal_history_bit');
// ######################### REQUIRE BACK-END ############################
// if your page is outside of your normal vb forums directory, you should change directories by uncommenting the next line
// chdir ('/path/to/your/forums');
require_once './global.php';
// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################
$navbits = construct_navbits(array('' => 'Point Market'));
$navbar = render_navbar_template($navbits);
// ############# PAGE TITLE ##############
$pagetitle = 'Point Market';
$pointfield = $vbulletin->options['market_point_name'];
// Field Name
$points_name = $vbulletin->options['market_point'];
// Regular Name
$points = $vbulletin->userinfo[$pointfield];
$userid = $vbulletin->userinfo['userid'];
$refunds = $vbulletin->userinfo['market_refund'];
$purchases = $vbulletin->userinfo['market_purchases'];
$discount = $permissions['market_discount'];
$discount_percentage = $discount * 100;
$point_decimal = $vbulletin->options['market_point_decimal'];
// ########### Point Market Open? ########
示例14: eval
eval(standard_error(fetch_error('no_permission')));
}
$templater = vB_Template::create('dso_slips_list_slips');
}
// $dso_footer = "<vb:if condition=\"$vboptions['dso_slips_copyright']\"><br /><br /><div id=\"dso_copyright\" align=\"center\">DSO Timeslips © <script type=\"text/javascript\">d = new Date();y = d.getFullYear();document.write(y);</script> <a href=\"http://www.dragonsys.org\">Dragonsys.org</a></div></vb:if>";
$templater->register('slip_or_track', $slip_or_track);
$templater->register('queue', $queue);
$templater->register('pagenav', $pagenav);
$templater->register('pagenumber', $pagenumber);
$templater->register('perpage', $perpage);
$templater->register('output', $output);
$page_templater .= $templater->render();
// #######################################################################
if (!empty($page_templater)) {
// make navbar
$navbits = construct_navbits(array('' => $vbphrase['dso_slips_nav']));
$navbar = render_navbar_template($navbits);
$pagetitle = empty($custompagetitle) ? $pagetitle : $custompagetitle;
if (!$vbulletin->options['storecssasfile']) {
$includecss = implode(',', $includecss);
}
// shell template
$templater = vB_Template::create('GENERIC_SHELL');
$templater->register_page_templates();
$templater->register('includecss', $includecss);
$templater->register('headinclude', $headinclude);
$templater->register('headinclude_bottom', $headinclude_bottom);
$templater->register('HTML', $page_templater);
$templater->register('navbar', $navbar);
$templater->register('navclass', $navclass);
$templater->register('onload', $onload);
示例15: standard_error
/**
* Halts execution and shows the specified error message
*
* @param string Error message
* @param string Optional HTML code to insert in the <head> of the error page
* @param boolean If true, set the visitor's status on WOL to error page
* @param string Optional template to force the display to use. Ignored if showing a lite error
*/
function standard_error($error = '', $headinsert = '', $savebadlocation = true, $override_template = '')
{
global $header, $footer, $headinclude, $forumjump, $timezone, $gobutton;
global $vbulletin, $vbphrase, $stylevar, $template_hook;
global $pmbox, $show, $ad_location, $notifications_menubits, $notifications_total;
$show['notices'] = false;
construct_forum_jump();
$title = $vbulletin->options['bbtitle'];
$pagetitle =& $title;
$errormessage = $error;
if (!$vbulletin->userinfo['badlocation'] and $savebadlocation) {
$vbulletin->userinfo['badlocation'] = 3;
}
require_once DIR . '/includes/functions_misc.php';
$postvars = construct_post_vars_html();
if (defined('VB_ERROR_PERMISSION') and VB_ERROR_PERMISSION == true) {
$show['permission_error'] = true;
} else {
$show['permission_error'] = false;
}
$show['search_noindex'] = (bool) ($vbulletin->userinfo['permissions']['forumpermissions'] & $vbulletin->bf_ugp_forumpermissions['canview']);
$navbits = $navbar = '';
if (defined('VB_ERROR_LITE') and VB_ERROR_LITE == true) {
$templatename = 'STANDARD_ERROR_LITE';
define('NOPMPOPUP', 1);
// No Footer here
} else {
if ($vbulletin->userinfo['permissions']['forumpermissions'] & $vbulletin->bf_ugp_forumpermissions['canview']) {
$show['forumdesc'] = false;
$navbits = construct_navbits(array('' => $vbphrase['vbulletin_message']));
eval('$navbar = "' . fetch_template('navbar') . '";');
}
$templatename = $override_template ? preg_replace('#[^a-z0-9_]#i', '', $override_template) : 'STANDARD_ERROR';
}
($hook = vBulletinHook::fetch_hook('error_generic')) ? eval($hook) : false;
if ($vbulletin->GPC['ajax']) {
require_once DIR . '/includes/class_xml.php';
$xml = new vB_AJAX_XML_Builder($vbulletin, 'text/xml');
$xml->add_tag('error', $errormessage);
$xml->print_xml();
exit;
} else {
if ($vbulletin->noheader) {
@header('Content-Type: text/html' . ($vbulletin->userinfo['lang_charset'] != '' ? '; charset=' . $vbulletin->userinfo['lang_charset'] : ''));
}
eval('print_output("' . fetch_template($templatename) . '");');
exit;
}
}