• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP is_browser函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中is_browser函数的典型用法代码示例。如果您正苦于以下问题:PHP is_browser函数的具体用法?PHP is_browser怎么用?PHP is_browser使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了is_browser函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: is_wysiwyg_compatible

/**
* Returns the maximum compatible editor mode depending on permissions, options and browser
*
* @param	integer	The requested editor mode (-1 = user default, 0 = simple textarea, 1 = standard editor controls, 2 = wysiwyg controls)
* @param	string	Editor type (full = 'fe', quick reply = 'qr')
*
* @return	integer	The maximum possible mode (0, 1, 2)
*/
function is_wysiwyg_compatible($userchoice = -1, $editormode = 'fe')
{
    global $vbulletin;
    // Netscape 4... don't even bother to check user choice as the toolbars won't work
    if (is_browser('netscape') or is_browser('webtv')) {
        return 0;
    }
    // check for a standard setting
    if ($userchoice == -1) {
        $userchoice = $vbulletin->userinfo['showvbcode'];
    }
    // unserialize the option if we need to
    if (!is_array($vbulletin->options['editormodes_array'])) {
        $vbulletin->options['editormodes_array'] = unserialize($vbulletin->options['editormodes']);
    }
    // make sure we have a valid editor mode to check
    switch ($editormode) {
        case 'fe':
        case 'qr':
        case 'qe':
            break;
        default:
            $editormode = 'fe';
    }
    // check board options for toolbar permissions
    if ($userchoice > $vbulletin->options['editormodes_array']["{$editormode}"]) {
        $choice = $vbulletin->options['editormodes_array']["{$editormode}"];
    } else {
        $choice = $userchoice;
    }
    // Legacy Hook 'editor_wysiwyg_compatible' Removed //
    if ($choice == 2) {
        if (!is_browser('opera') or is_browser('opera', '9.0')) {
            // Check Mozilla Browsers
            if (is_browser('firebird', '0.6.1') or is_browser('camino', '0.9') or is_browser('mozilla', '20030312') and !is_browser('firebird') and !is_browser('camino')) {
                return 2;
            } else {
                if (is_browser('ie', '5.5') and !is_browser('mac')) {
                    return 2;
                } else {
                    if (false and is_browser('opera', '9.0')) {
                        return 2;
                    } else {
                        return 1;
                    }
                }
            }
        } else {
            // browser is incompatible - return standard toolbar
            return 1;
        }
    } else {
        // return standard or no toolbar
        return $choice;
    }
}
开发者ID:cedwards-reisys,项目名称:nexus-web,代码行数:64,代码来源:functions_editor.php


示例2: is_browser_shorcode

/**
 * @param        $browser
 * @param string $content
 *
 * @return bool|string
 */
function is_browser_shorcode($browser, $content = "") {
	$browser = shortcode_atts(array(
		'name'    => '',
		'version' => ''
	), $browser, 'is_browser');

	if (is_browser($browser['name'], $browser['version'])) {
		return ($content);
	} else {
		return FALSE;
	}
}
开发者ID:JDarkGreen,项目名称:wpmaletek,代码行数:18,代码来源:shortcodes.php


示例3: construct_nav_option

function construct_nav_option($title, $url)
{
    // creates an <option> or <a href for the left-panel of index.php
    // (depending on value of $cpnavjs)
    // NOTE: '&' . $vbulletin->session->vars['sessionurl'] will be AUTOMATICALLY added to the URL - do not add to your link!
    global $vbulletin, $options;
    static $sessionlink, $bubblefix;
    if (!isset($options)) {
        $options = array();
        if ($vbulletin->session->vars['sessionurl'] == '') {
            $sessionlink = '';
        } else {
            $sessionlink = "&amp;s=" . $vbulletin->session->vars['sessionhash'];
        }
        // only include the bubble-fix for IE - ignore when encountering the Konqueror/Safari event model
        if (is_browser('ie')) {
            $bubblefix = ' onclick="nobub()"';
        } else {
            $bubblefix = '';
        }
    }
    $options[] = "\t\t<div class=\"navlink-normal\" onclick=\"nav_goto('{$url}{$sessionlink}');\" onmouseover=\"this.className='navlink-hover';\" onmouseout=\"this.className='navlink-normal'\"><a href=\"{$url}{$sessionlink}\"{$bubblefix}>{$title}</a></div>\n";
}
开发者ID:holandacz,项目名称:nb4,代码行数:23,代码来源:adminfunctions_navpanel.php


示例4: vB_BbCodeParser_Wysiwyg

 /**
  * Constructor. Sets up the tag list.
  *
  * @param	vB_Registry	Reference to registry object
  * @param	array		List of tags to parse
  * @param	boolean		Whether to append custom tags (they will not be parsed anyway)
  */
 function vB_BbCodeParser_Wysiwyg(&$registry, $tag_list = array(), $append_custom_tags = true)
 {
     parent::vB_BbCodeParser($registry, $tag_list, $append_custom_tags);
     // change all unparsable tags to use the unparsable callback
     foreach ($this->unparsed_tags as $remove) {
         if (isset($this->tag_list['option']["{$remove}"])) {
             $this->tag_list['option']["{$remove}"]['callback'] = 'handle_wysiwyg_unparsable';
             unset($this->tag_list['option']["{$remove}"]['html'], $this->tag_list['option']["{$remove}"]['strip_space_after']);
         }
         if (isset($this->tag_list['no_option']["{$remove}"])) {
             $this->tag_list['no_option']["{$remove}"]['callback'] = 'handle_wysiwyg_unparsable';
             unset($this->tag_list['no_option']["{$remove}"]['html'], $this->tag_list['option']["{$remove}"]['strip_space_after']);
         }
     }
     // make the "pre" tags use the correct handler
     foreach (array('code', 'php', 'html') as $pre_tag) {
         if (isset($this->tag_list['no_option']["{$pre_tag}"])) {
             $this->tag_list['no_option']["{$pre_tag}"]['callback'] = 'handle_preformatted_tag';
             unset($this->tag_list['no_option']["{$pre_tag}"]['html'], $this->tag_list['option']["{$pre_tag}"]['strip_space_after']);
         }
     }
     $this->type = is_browser('ie') ? 'ie' : 'moz_css';
 }
开发者ID:cedwards-reisys,项目名称:nexus-web,代码行数:30,代码来源:class_bbcode_alt.php


示例5: get_line_end_format

/**
 * Helper function for fetching the line end format.
 *
 * @return String 'win', 'unix', or 'mac' based on the user's browser..
 */
function get_line_end_format()
{
    if (is_browser('win')) {
        return 'win';
    } elseif (is_browser('unix')) {
        return 'unix';
    } elseif (is_browser('mac')) {
        return 'mac';
    } else {
        return 'unix';
    }
}
开发者ID:rohanprabhu,项目名称:phpLDAPadmin,代码行数:17,代码来源:export_form.php


示例6: file_download

function file_download($filestring, $filename, $filetype = 'application/octet-stream')
{
    if (!isset($isIE)) {
        static $isIE;
        $isIE = iif(is_browser('ie') or is_browser('opera'), true, false);
    }
    if ($isIE and $filetype == 'application/octet-stream') {
        $filetype = 'application/octetstream';
    }
    if (preg_match('~&#([0-9]+);~', $filename)) {
        if (function_exists('iconv')) {
            $filename = @iconv(vB_Template_Runtime::fetchStyleVar('charset'), 'UTF-8//IGNORE', $filename);
        }
        $filename = preg_replace_callback('~&#([0-9]+);~', 'convert_int_to_utf8_callback', $filename);
        $filename_charset = 'utf-8';
    } else {
        $filename_charset = vB_Template_Runtime::fetchStyleVar('charset');
    }
    $filename = preg_replace('#[\\r\\n]#', '', $filename);
    // Opera and IE have not a clue about this, mozilla puts on incorrect extensions.
    if (is_browser('mozilla')) {
        $filename = "filename*=" . $filename_charset . "''" . rawurlencode($filename);
    } else {
        // other browsers seem to want names in UTF-8
        if ($filename_charset != 'utf-8' and function_exists('iconv')) {
            $filename = @iconv($filename_charset, 'UTF-8//IGNORE', $filename);
        }
        // Should just make this (!is_browser('ie'))
        if (is_browser('opera') or is_browser('konqueror') or is_browser('safari')) {
            // Opera / konqueror does not support encoded file names
            $filename = 'filename="' . str_replace('"', '', $filename) . '"';
        } else {
            // encode the filename to stay within spec
            $filename = 'filename="' . rawurlencode($filename) . '"';
        }
    }
    header('Content-Type: ' . $filetype);
    header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT');
    header('Content-Disposition: attachment; ' . $filename);
    header('Content-Length: ' . strlen($filestring));
    header('Cache-Control: private, must-revalidate, post-check=0, pre-check=0');
    header('Pragma: public');
    echo $filestring;
    exit;
}
开发者ID:cedwards-reisys,项目名称:nexus-web,代码行数:45,代码来源:functions_file.php


示例7: rawurlencode

{
	$filename = "filename*=" . $filename_charset . "''" . rawurlencode($filename);
}
else
{
	// other browsers seem to want names in UTF-8
	if ($filename_charset != 'utf-8' AND function_exists('iconv'))
	{
		$filename_conv = iconv($filename_charset, 'UTF-8//IGNORE', $filename);
		if ($filename_conv !== false)
		{
			$filename = $filename_conv;
		}
	}

	if (is_browser('opera') OR is_browser('konqueror') OR is_browser('safari'))
	{
		// Opera / Konqueror does not support encoded file names
		$filename = 'filename="' . str_replace('"', '', $filename) . '"';
	}
	else
	{
		// encode the filename to stay within spec
		$filename = 'filename="' . rawurlencode($filename) . '"';
	}
}

if (in_array($extension, array('jpg', 'jpe', 'jpeg', 'gif', 'png')))
{
	header("Content-disposition: inline; $filename");
	header('Content-transfer-encoding: binary');
开发者ID:hungnv0789,项目名称:vhtm,代码行数:31,代码来源:attachment.php


示例8: print_template_javascript

/**
* Prints a row containing template search javascript controls
*/
function print_template_javascript()
{
    global $stylevar, $vbphrase, $vbulletin;
    print_phrase_ref_popup_javascript();
    echo '<script type="text/javascript" src="../clientscript/vbulletin_templatemgr.js"></script>';
    echo '<script type="text/javascript">
<!--
	var textarea_id = "' . $vbulletin->textarea_id . '";
	var vbphrase = { \'not_found\' : "' . fetch_js_safe_string($vbphrase['not_found']) . '" };
// -->
</script>
';
    print_label_row(iif(is_browser('ie') or is_browser('mozilla', '20040707'), $vbphrase['search_in_template'], $vbphrase['additional_functions']), iif(is_browser('ie') or is_browser('mozilla', '1.7'), '
	<input type="text" class="bginput" name="string" accesskey="t" value="' . htmlspecialchars_uni($vbulletin->GPC['searchstring']) . '" size="20" onChange="n=0;" tabindex="1" />
	<input type="button" class="button" style="font-weight:normal" value=" ' . $vbphrase['find'] . ' " accesskey="f" onClick="findInPage(document.cpform.string.value);" tabindex="1" />
	&nbsp;') . '<input type="button" class="button" style="font-weight:normal" value=" ' . $vbphrase['copy'] . ' " accesskey="c" onclick="HighlightAll();" tabindex="1" />
	&nbsp;
	<input type="button" class="button" style="font-weight:normal" value="' . $vbphrase['view_quickref'] . '" accesskey="v" onclick="js_open_phrase_ref(0, 0);" tabindex="1" />
	');
}
开发者ID:holandacz,项目名称:nb4,代码行数:23,代码来源:adminfunctions_template.php


示例9: handle_bbcode_quote

 /**
  * Handles a [quote] tag. Displays a string in an area indicating it was quoted from someone/somewhere else.
  *
  * @param	string	The body of the quote.
  * @param	string	If tag has option, the original user to post.
  *
  * @return	string	HTML representation of the tag.
  */
 function handle_bbcode_quote($message, $username = '')
 {
     global $vbulletin, $vbphrase, $stylevar, $show;
     // remove smilies from username
     $username = $this->strip_smilies($username);
     if (preg_match('/^(.+)(?<!&#[0-9]{3}|&#[0-9]{4}|&#[0-9]{5});\\s*(\\d+)\\s*$/U', $username, $match)) {
         $username = $match[1];
         $postid = $match[2];
     } else {
         $postid = 0;
     }
     $username = $this->do_word_wrap($username);
     $show['username'] = iif($username != '', true, false);
     $message = $this->strip_front_back_whitespace($message, 1);
     if ($this->options['cachable'] == false) {
         $show['iewidthfix'] = (is_browser('ie') and !is_browser('ie', 6));
     } else {
         // this post may be cached, so we can't allow this "fix" to be included in that cache
         $show['iewidthfix'] = false;
     }
     $template = $this->printable ? 'bbcode_quote_printable' : 'bbcode_quote';
     eval('$html = "' . fetch_template($template) . '";');
     return $html;
 }
开发者ID:holandacz,项目名称:nb4,代码行数:32,代码来源:class_bbcode.php


示例10: array

require_once CWD . '/includes/init.php';
$vbulletin->input->clean_array_gpc('r', array('referrerid' => TYPE_UINT, 'postid' => TYPE_UINT, 'threadid' => TYPE_UINT, 'forumid' => TYPE_INT, 'pollid' => TYPE_UINT, 'a' => TYPE_STR, 'mode' => TYPE_STR, 'nojs' => TYPE_BOOL));
$vbulletin->input->clean_array_gpc('p', array('ajax' => TYPE_BOOL));
// #############################################################################
// turn off popups if they are not available to this browser
if ($vbulletin->options['usepopups']) {
    if (is_browser('ie', 5) and !is_browser('mac') or is_browser('mozilla') or is_browser('firebird') or is_browser('opera', 7) or is_browser('webkit') or is_browser('konqueror', 3.2)) {
        // use popups
    } else {
        // don't use popups
        $vbulletin->options['usepopups'] = 0;
    }
}
// #############################################################################
// set a variable used by the spacer templates to detect IE versions less than 6
$show['old_explorer'] = (is_browser('ie') and !is_browser('ie', 6));
// #############################################################################
// read the list of collapsed menus from the 'vbulletin_collapse' cookie
$vbcollapse = array();
if (!empty($vbulletin->GPC['vbulletin_collapse'])) {
    $val = preg_split('#\\n#', $vbulletin->GPC['vbulletin_collapse'], -1, PREG_SPLIT_NO_EMPTY);
    foreach ($val as $key) {
        $vbcollapse["collapseobj_{$key}"] = 'display:none;';
        $vbcollapse["collapseimg_{$key}"] = '_collapsed';
        $vbcollapse["collapsecel_{$key}"] = '_collapsed';
    }
    unset($val);
}
// #############################################################################
// start server too busy
$servertoobusy = false;
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:global.php


示例11: kleeja_run_hook

 ($hook = kleeja_run_hook('down_go_page')) ? eval($hook) : null;
 //run hook
 //start download ,,
 if (!is_readable($path_file)) {
     ($hook = kleeja_run_hook('down_file_not_exists')) ? eval($hook) : null;
     //run hook
     big_error('----', 'Error - can not open file.');
 }
 if (!($size = @filesize($path_file))) {
     $size = $d_size;
 }
 $name = empty($rn) ? $n : $rn;
 if (is_browser('mozilla')) {
     $h_name = "filename*=UTF-8''" . rawurlencode(htmlspecialchars_decode($name));
 } else {
     if (is_browser('opera, safari, konqueror')) {
         $h_name = 'filename="' . str_replace('"', '', htmlspecialchars_decode($name)) . '"';
     } else {
         $h_name = 'filename="' . rawurlencode(htmlspecialchars_decode($name)) . '"';
     }
 }
 //Figure out the MIME type (if not specified)
 $ext = array_pop(explode('.', $path_file));
 $mime_type = get_mime_for_header($ext);
 if (@ob_get_length()) {
     @ob_end_clean();
 }
 // required for IE, otherwise Content-Disposition may be ignored
 if (@ini_get('zlib.output_compression')) {
     @ini_set('zlib.output_compression', 'Off');
 }
开发者ID:Amine12boutouil,项目名称:Kleeja-2.0.0-alpha,代码行数:31,代码来源:do.php


示例12: is_browser

/**
* Browser detection
* returns whether or not the visiting browser is the one specified [part of kleeja style system]
* i.e. is_browser('ie6') -> true or false
* i.e. is_browser('ie, opera') -> true or false
*/
function is_browser($b)
{
    //is there , which mean -OR-
    if (strpos($b, ',') !== false) {
        $e = explode(',', $b);
        foreach ($e as $n) {
            if (is_browser(trim($n))) {
                return true;
            }
        }
        return false;
    }
    //if no agent, let's take the worst case
    $u_agent = !empty($_SERVER['HTTP_USER_AGENT']) ? htmlspecialchars((string) strtolower($_SERVER['HTTP_USER_AGENT'])) : (function_exists('getenv') ? getenv('HTTP_USER_AGENT') : '');
    $t = trim(preg_replace('/[0-9.]/', '', $b));
    $r = trim(preg_replace('/[a-z]/', '', $b));
    $return = false;
    switch ($t) {
        case 'ie':
            $return = strpos($u_agent, trim('msie ' . $r)) !== false ? true : false;
            break;
        case 'firefox':
            $return = strpos(str_replace('/', ' ', $u_agent), trim('firefox ' . $r)) !== false ? true : false;
            break;
        case 'safari':
            $return = strpos($u_agent, trim('safari/' . $r)) !== false ? true : false;
            break;
        case 'chrome':
            $return = strpos($u_agent, trim('chrome ' . $r)) !== false ? true : false;
            break;
        case 'flock':
            $return = strpos($u_agent, trim('flock ' . $r)) !== false ? true : false;
            break;
        case 'opera':
            $return = strpos($u_agent, trim('opera ' . $r)) !== false ? true : false;
            break;
        case 'konqueror':
            $return = strpos($u_agent, trim('konqueror/' . $r)) !== false ? true : false;
            break;
        case 'mozilla':
            $return = strpos($u_agent, trim('gecko/' . $r)) !== false ? true : false;
            break;
        case 'webkit':
            $return = strpos($u_agent, trim('applewebkit/' . $r)) !== false ? true : false;
            break;
            /**
             * Mobile Phones are so popular those days, so we have to support them ...
             * This is still in our test lab.
             * @see http://en.wikipedia.org/wiki/List_of_user_agents_for_mobile_phones
             **/
        /**
         * Mobile Phones are so popular those days, so we have to support them ...
         * This is still in our test lab.
         * @see http://en.wikipedia.org/wiki/List_of_user_agents_for_mobile_phones
         **/
        case 'mobile':
            $mobile_agents = array('iPhone;', 'iPod;', 'iPad;', 'BlackBerry', 'Android', 'HTC', 'IEMobile', 'LG/', 'LG-', 'LGE-', 'MOT-', 'Nokia', 'SymbianOS', 'nokia_', 'PalmSource', 'webOS', 'SAMSUNG-', 'SEC-SGHU', 'SonyEricsson');
            $return = false;
            foreach ($mobile_agents as $agent) {
                if (strpos($u_agent, $agent) !== false) {
                    $return = true;
                    break;
                }
            }
            break;
    }
    ($hook = kleeja_run_hook('is_browser_func')) ? eval($hook) : null;
    //run hook
    return $return;
}
开发者ID:Amine12boutouil,项目名称:Kleeja-2.0.0-alpha,代码行数:76,代码来源:functions_display.php


示例13: is_wysiwyg_compatible

/**
* Returns the maximum compatible editor mode depending on permissions, options and browser
*
* @param	integer	The requested editor mode (-1 = user default, 0 = simple textarea, 1 = standard editor controls, 2 = wysiwyg controls)
* @param	string	Editor type (full = 'fe', quick reply = 'qr')
*
* @return	integer	The maximum possible mode (0, 1, 2)
*/
function is_wysiwyg_compatible($userchoice = -1, $editormode = 'fe')
{
	global $vbulletin;

	// Netscape 4... don't even bother to check user choice as the toolbars won't work
	if (is_browser('netscape') OR is_browser('webtv'))
	{
		return 0;
	}

	// check for a standard setting
	if ($userchoice == -1)
	{
		$userchoice = $vbulletin->userinfo['showvbcode'];
	}

	// unserialize the option if we need to
	if (!is_array($vbulletin->options['editormodes_array']))
	{
		$vbulletin->options['editormodes_array'] = unserialize($vbulletin->options['editormodes']);
	}

	// make sure we have a valid editor mode to check
	switch ($editormode)
	{
		case 'fe':
		case 'qr':
		case 'qe':
			break;
		default:
			$editormode = 'fe';
	}

	// check board options for toolbar permissions
	if ($userchoice > $vbulletin->options['editormodes_array']["$editormode"])
	{
		$choice = $vbulletin->options['editormodes_array']["$editormode"];
	}
	else
	{
		$choice = $userchoice;
	}

	$hook_return = null;
	($hook = vBulletinHook::fetch_hook('editor_wysiwyg_compatible')) ? eval($hook) : false;
	if ($hook_return !== null)
	{
		return $hook_return;
	}

	if ($choice == 2) // attempting to use WYSIWYG, check that we really can
	{
		if (!is_browser('opera') OR is_browser('opera', '9.0'))
		{
			// Check Mozilla Browsers
			if (is_browser('firebird', '0.6.1') OR is_browser('camino', '0.9') OR (is_browser('mozilla', '20030312') AND !is_browser('firebird') AND !is_browser('camino')))
			{
				return 2;
			}
			else if (is_browser('ie', '5.5') AND !is_browser('mac'))
			{
				return 2;
			}
			else if (false AND is_browser('opera', '9.0'))
			{
				return 2;
			}
			else
			{
				return 1;
			}
		}
		else
		{
			// browser is incompatible - return standard toolbar
			return 1;
		}
	}
	else
	{
		// return standard or no toolbar
		return $choice;
	}
}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:92,代码来源:functions_editor.php


示例14: clean_fragment

 /**
  * Cleans output to be parsed into the uri.
  * Setting $canonical is useful for creating redirect url's that cannot be
  * encoded for redirects.
  *
  * @param string $fragment
  * @param bool $canonical							- Whether to encode for output
  * @return string
  */
 public static function clean_fragment($fragment, $canonical = false)
 {
     global $vbulletin;
     if (class_exists('vBulletinHook', false)) {
         ($hook = vBulletinHook::fetch_hook('friendlyurl_clean_fragment')) ? eval($hook) : false;
     }
     // Convert to UTF-8
     if (self::UNI_CONVERT == $vbulletin->options['friendlyurl_unicode']) {
         // convert to UTF-8
         $fragment = to_utf8($fragment, $vbulletin->userinfo['lang_charset']);
         // convert NCRs
         $fragment = unhtmlspecialchars($fragment, true);
     } else {
         if (self::UNI_STRIP == $vbulletin->options['friendlyurl_unicode']) {
             // strip NCRs
             $fragment = stripncrs($fragment);
         }
     }
     // Remove url entities
     $fragment = self::clean_entities($fragment);
     // Prepare the URL for output
     if (!$canonical and self::UNI_CONVERT == $vbulletin->options['friendlyurl_unicode'] and 'UTF-8' != $vbulletin->userinfo['lang_charset']) {
         if (is_browser('ie')) {
             if ($vbulletin->options['friendlyurl_ncrencode']) {
                 $fragment = ncrencode($fragment, true);
             }
         } else {
             $fragment = urlencode($fragment);
         }
     } else {
         if ($canonical and self::UNI_IGNORE == $vbulletin->options['friendlyurl_unicode']) {
             // ensure NCRs are converted
             $fragment = unhtmlspecialchars($fragment, true);
         }
     }
     return $fragment;
 }
开发者ID:0hyeah,项目名称:yurivn,代码行数:46,代码来源:class_friendly_url.php


示例15: intval

	);
	$messagearea = "
		<script type=\"text/javascript\">
		<!--
			var threaded_mode = $threadedmode;
			var require_click = $show[qr_require_click];
			var is_last_page = $show[allow_ajax_qr]; // leave for people with cached JS files
			var allow_ajax_qr = $show[allow_ajax_qr];
			var last_post_id = $LASTPOSTID;
			var ajax_last_post = " . intval($effective_lastpost) . ";
		// -->
		</script>
		$messagearea
	";

	if (is_browser('mozilla') AND $show['wysiwyg'] == 2)
	{
		// Mozilla WYSIWYG can't have the QR collapse button,
		// so remove that and force QR to be expanded
		$show['quickreply_collapse'] = false;

		unset(
			$vbcollapse["collapseobj_quickreply"],
			$vbcollapse["collapseimg_quickreply"],
			$vbcollapse["collapsecel_quickreply"]
		);
	}
	else
	{
		$show['quickreply_collapse'] = true;
	}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:31,代码来源:showthread.php


示例16: construct_navbits

$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
// #############################################################################
// setup $show variables
$show['lightbox'] = ($vbulletin->options['lightboxenabled'] and $vbulletin->options['usepopups']);
$show['search'] = (!$show['search_engine'] and $forumperms & $vbulletin->bf_ugp_forumpermissions['cansearch'] and $vbulletin->options['enablesearches'] and ($vbulletin->userinfo['userid'] or !$vbulletin->options['hvcheck_search'] or !$vbulletin->options['hv_type']));
$show['subscribed'] = iif($threadinfo['issubscribed'], true, false);
$show['threadrating'] = iif($forum['allowratings'] and $forumperms & $vbulletin->bf_ugp_forumpermissions['canthreadrate'], true, false);
$show['ratethread'] = iif($show['threadrating'] and (!$threadinfo['vote'] or $vbulletin->options['votechange']), true, false);
$show['closethread'] = iif($threadinfo['open'], true, false);
$show['unstick'] = iif($threadinfo['sticky'], true, false);
$show['reputation'] = ($vbulletin->options['reputationenable'] and $vbulletin->userinfo['userid'] and $vbulletin->userinfo['permissions']['genericoptions'] & $vbulletin->bf_ugp_genericoptions['isnotbannedgroup']);
// next/prev links don't work for search engines or non-lastpost sort orders
$show['next_prev_links'] = (!$show['search_engine'] and ($foruminfo['defaultsortfield'] == 'lastpost' or !$foruminfo['defaultsortfield']));
// deals with this: http://www.vbulletin.com/forum/project.php?issueid=22750 - don't apply for IE < 7
$stylevar['margin_3px_fix'] = (!is_browser('ie') or is_browser('ie', 7)) ? 3 - $stylevar['cellpadding'] : 0;
$pagenumber = $vbulletin->GPC['pagenumber'];
if (!$show['threadrating'] or !$vbulletin->options['allowthreadedmode']) {
    $nodhtmlcolspan = 'colspan="2"';
}
eval('$ad_location[\'ad_showthread_beforeqr\'] = "' . fetch_template('ad_showthread_beforeqr') . '";');
($hook = vBulletinHook::fetch_hook('showthread_complete')) ? eval($hook) : false;
// #############################################################################
// output page
eval('print_output("' . fetch_template('SHOWTHREAD') . '");');
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 22:41, Fri Oct 10th 2008
|| # CVS: $RCSfile$ - $Revision: 27544 $
|| ####################################################################
\*======================================================================*/
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:showthread.php


示例17: construct_window_page_nav


//.........这里部分代码省略.........
	if ($pagenumber < $confirmedpages)
	{
		$nextpage = $pagenumber + 1;
		if ($seolink)
		{
			$pageinfo['page'] = $nextpage;
			$nextaddress = fetch_seo_url($seolink, $objectinfo, $pageinfo);
		}
		$nextnumbers = fetch_start_end_total_array($nextpage, $perpage, $confirmedcount);
		$show['next'] = true;
	}

	if (($pagenumber - $window) > 1)
	{
		$firstnumbers = fetch_start_end_total_array(1, $perpage, $confirmedcount);
		if ($seolink)
		{
			unset($pageinfo['page']);
			$firstaddress = fetch_seo_url($seolink, $objectinfo, $pageinfo);
		}
		$show['first'] = true;
	}


	for ($curpage = ($pagenumber - $window); $curpage <= $pagenumber+$window AND $curpage <= $confirmedpages; $curpage++)
	{
		if ($curpage < 1)
		{
			continue;
		}

		else if ($curpage == $pagenumber)
		{
			$numbers = fetch_start_end_total_array($curpage, $perpage, $confirmedcount);

			$templater = vB_Template::create('pagenav_curpage_window');
			$templater->register('curpage', $curpage);
			$templater->register('numbers', $numbers);
			$templater->register('use_qmark', $use_qmark);
			$templater->register('total', $total);
			$pagenavarr[] = $templater->render();
		}

		else
		{
			if ($seolink)
			{
				$pageinfo['page'] = $curpage;
				$address = fetch_seo_url($seolink, $objectinfo, $pageinfo);
				$show['curpage'] = false;
			}
			else
			{
				$show['curpage'] = ($curpage != 1);
			}
			$pagenumbers = fetch_start_end_total_array($curpage, $perpage, $confirmedcount);

			$templater = vB_Template::create('pagenav_pagelink_window');
			$templater->register('address', $address);
			$templater->register('address2', $address2);
			$templater->register('anchor', $anchor);
			$templater->register('curpage', $curpage);
			$templater->register('pagenumbers', $pagenumbers);
			$templater->register('total', $total);
			$templater->register('use_qmark', $use_qmark);
			$pagenavarr[] = $templater->render();
		}
	}

	if (LANGUAGE_DIRECTION == 'rtl' AND (is_browser('ie') AND is_browser('ie') < 8))
	{
		$pagenavarr = array_reverse($pagenavarr);
	}

	$pagenav = implode('', $pagenavarr);

	$templater = vB_Template::create('pagenav_window');
	$templater->register('address2', $address2);
	$templater->register('anchor', $anchor);
	$templater->register('firstaddress', $firstaddress);
	$templater->register('firstnumbers', $firstnumbers);
	$templater->register('jumpaddress', $address);
	$templater->register('lastaddress', $lastaddress);
	$templater->register('lastnumbers', $lastnumbers);
	$templater->register('nextaddress', $nextaddress);
	$templater->register('nextnumbers', $nextnumbers);
	$templater->register('nextpage', $nextpage);
	$templater->register('pagenav', $pagenav);
	$templater->register('pagenumber', $pagenumber);
	$templater->register('prevaddress', $prevaddress);
	$templater->register('prevnumbers', $prevnumbers);
	$templater->register('prevpage', $prevpage);
	$templater->register('total', $total);
	$templater->register('totalpages', $confirmedpages);
	$templater->register('use_qmark', $use_qmark);
	$templater->register('hiddenfields', $hiddenfields);

	$pagenav = $templater->render();
	return $pagenav;
}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:101,代码来源:functions.php


示例18: vb_number_format

// get total members and newest member from template
$numbermembers = vb_number_format($vbulletin->userstats['numbermembers']);
$newuserinfo = array(
	'userid'   => $vbulletin->userstats['newuserid'],
	'username' => $vbulletin->userstats['newusername']
);
$activemembers = vb_number_format($vbulletin->userstats['activemembers']);
$show['activemembers'] = ($vbulletin->options['activememberdays'] > 0 AND ($vbulletin->options['activememberoptions'] & 2)) ? true : false;

$ad_location['board_after_forums'] = vB_Template::create('ad_board_after_forums')->render();
$ad_location['board_below_whats_going_on'] = vB_Template::create('ad_board_below_whats_going_on')->render();

// ### SIDEBAR #################################################
$show['sidebar'] = false;
// disable blocks for ie6
if ($vbulletin->options['enablesidebar'] AND !(is_browser('ie') AND !is_browser('ie', 7)))
{
	$blockmanager = vB_BlockManager::create($vbulletin);
	$sidebar = $blockmanager->getSidebarHTML();
	if ($sidebar)
	{
		$show['sidebar'] = true;
	}

	$show['sidebarposition'] = vB_Template_Runtime::fetchStyleVar($vbulletin->options['sidebarposition'] == 0 ? 'left' : 'right');
}

// ### ALL DONE! SPIT OUT THE HTML AND LET'S GET OUTTA HERE... ###
($hook = vBulletinHook::fetch_hook('forumhome_complete')) ? eval($hook) : false;

$navbar = render_navbar_template(construct_navbits($navbits));
开发者ID:hungnv0789,项目名称:vhtm,代码行数:31,代码来源:forum.php


示例19: do_get_thread


//.........这里部分代码省略.........
                }
            }
            $counter++;
        }
        if ($pollinfo['multiple']) {
            $pollinfo['numbervotes'] = $pollinfo['voters'];
            $show['multiple'] = true;
        }
        if ($pollinfo['public']) {
            $show['publicwarning'] = true;
        } else {
            $show['publicwarning'] = false;
        }
        $displayed_dateline = $threadinfo['lastpost'];
        ($hook = vBulletinHook::fetch_hook('showthread_poll_complete')) ? eval($hook) : false;
        if ($showresults or $uservoted) {
            $templater = vB_Template::create('pollresults_table');
            $templater->register('pollbits', $pollbits);
            $templater->register('pollenddate', $pollenddate);
            $templater->register('pollendtime', $pollendtime);
            $templater->register('pollinfo', $pollinfo);
            $templater->register('pollstatus', $pollstatus);
            $poll = $templater->render();
        } else {
            $templater = vB_Template::create('polloptions_table');
            $templater->register('pollbits', $pollbits);
            $templater->register('pollenddate', $pollenddate);
            $templater->register('pollendtime', $pollendtime);
            $templater->register('pollinfo', $pollinfo);
            $poll = $templater->render();
        }
    }
    // work out if quickreply should be shown or not
    if ($vbulletin->options['quickreply'] and !$thread['isdeleted'] and !is_browser('netscape') and $vbulletin->userinfo['userid'] and ($vbulletin->userinfo['userid'] == $threadinfo['postuserid'] and $forumperms & $vbulletin->bf_ugp_forumpermissions['canreplyown'] or $vbulletin->userinfo['userid'] != $threadinfo['postuserid'] and $forumperms & $vbulletin->bf_ugp_forumpermissions['canreplyothers']) and ($thread['open'] or can_moderate($threadinfo['forumid'], 'canopenclose')) and !fetch_require_hvcheck('post')) {
        $show['quickreply'] = true;
    } else {
        $show['quickreply'] = false;
        $show['wysiwyg'] = 0;
        $quickreply = '';
    }
    $show['largereplybutton'] = (!$thread['isdeleted'] and !$show['threadedmode'] and $forum['allowposting'] and !$show['search_engine']);
    if (!$forum['allowposting']) {
        $show['quickreply'] = false;
    }
    $show['multiquote_global'] = ($vbulletin->options['multiquote'] and $vbulletin->userinfo['userid']);
    if ($show['multiquote_global']) {
        $vbulletin->input->clean_array_gpc('c', array('vbulletin_multiquote' => TYPE_STR));
        $vbulletin->GPC['vbulletin_multiquote'] = explode(',', $vbulletin->GPC['vbulletin_multiquote']);
    }
    // post is cachable if option is enabled, last post is newer than max age, and this user
    // isn't showing a sessionhash
    $post_cachable = ($vbulletin->options['cachemaxage'] > 0 and TIMENOW - $vbulletin->options['cachemaxage'] * 60 * 60 * 24 <= $thread['lastpost'] and $vbulletin->session->vars['sessionurl'] == '');
    $saveparsed = '';
    $save_parsed_sigs = '';
    ($hook = vBulletinHook::fetch_hook('showthread_post_start')) ? eval($hook) : false;
    ################################################################################
    ####################### SHOW THREAD IN LINEAR MODE #############################
    ################################################################################
    if ($threadedmode == 0) {
        // allow deleted posts to not be counted in number of posts displayed on the page;
        // prevents issue with page count on forum display being incorrect
        $ids = array();
        $lastpostid = 0;
        $hook_query_joins = $hook_query_where = '';
        ($hook = vBulletinHook::fetch_hook('showthread_query_postids')) ? eval($hook) : false;
        if (empty($deljoin) and !$show['approvepost']) {
开发者ID:0hyeah,项目名称:yurivn,代码行数:67,代码来源:get_thread.php


示例20: print_table_header

        	print_stylevar_row($vbphrase['netscape_4'],                  'textareacols_ns4');
        	print_stylevar_row($vbphrase['netscape_6'],                  'textareacols_ns6');
        */
        print_table_header($vbphrase['miscellaneous'], 3);
        print_stylevar_row($vbphrase['html_doctype'], 'htmldoctype');
        /*	// this is now held with the language settings
        			print_stylevar_row($vbphrase['html_content_type'],           'contenttype');
        		*/
        ($hook = vBulletinHook::fetch_hook('stylevar_edit_misc')) ? eval($hook) : false;
        print_table_break(' ');
    }
    // #############################################################################
    // MAIN CSS
    if ($vbulletin->GPC['dowhat'] == 'maincss' or $vbulletin->GPC['dowhat'] == 'css' or $vbulletin->GPC['dowhat'] == 'all') {
        construct_hidden_code('dowhat[css]', 1);
        if (is_browser('mozilla')) {
            ?>
			<script type="text/javascript">
			window.onresize = redo_fieldset;
			var target_fieldsets = new Array();
			var z = 0;
			function redo_fieldset()
			{
				for (m = 0; m < z; m++)
				{
					if (typeof(target_fieldsets[m]) != "undefined")
					{
						reflow_fieldset(target_fieldsets[m], false);
					}
				}
			}
开发者ID:benyamin20,项目名称:vbregistration,代码行数:31,代码来源:css.php



注:本文中的is_browser函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP is_buddypress函数代码示例发布时间:2022-05-15
下一篇:
PHP is_bool函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap