本文整理汇总了PHP中fetch_stylevars函数的典型用法代码示例。如果您正苦于以下问题:PHP fetch_stylevars函数的具体用法?PHP fetch_stylevars怎么用?PHP fetch_stylevars使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了fetch_stylevars函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: fetch_options_overrides
if ($vbulletin->userinfo['cssprefs'] != '')
{
$vbulletin->options['cpstylefolder'] = $vbulletin->userinfo['cssprefs'];
}
// ###################### Get date / time info #######################
// override date/time settings if specified
fetch_options_overrides($vbulletin->userinfo);
fetch_time_data();
// ############################################ LANGUAGE STUFF ####################################
// initialize $vbphrase and set language constants
$vbphrase = init_language();
$_tmp = NULL;
fetch_stylevars($_tmp, $vbulletin->userinfo);
$permissions = cache_permissions($vbulletin->userinfo, true);
$vbulletin->userinfo['permissions'] =& $permissions;
$cpsession = array();
$vbulletin->input->clean_array_gpc('c', array(
COOKIE_PREFIX . 'cpsession' => TYPE_STR,
));
if (!empty($vbulletin->GPC[COOKIE_PREFIX . 'cpsession']))
{
$cpsession = $db->query_first("
SELECT * FROM " . TABLE_PREFIX . "cpsession
WHERE userid = " . $vbulletin->userinfo['userid'] . "
AND hash = '" . $db->escape_string($vbulletin->GPC[COOKIE_PREFIX . 'cpsession']) . "'
开发者ID:hungnv0789,项目名称:vhtm,代码行数:30,代码来源:global.php
示例2: switch_css_style
/**
* Switch the style for rendering
* This really should be part of the bootstrap code except:
* 1) We don't actually load the bootstrap in the admincp
* 2) There is a lot to the style load that isn't easy to redo (header/footer templates for example)
*
* This handles the stylevars and template lists -- including reloading the template cache.
* This is enough to handle the css template rendering, but probably won't work for anything
* more complicated.
*/
function switch_css_style($styleid, $templates)
{
global $vbulletin;
$styletemp = $vbulletin->db->query_first ("
SELECT *
FROM " . TABLE_PREFIX . "style
WHERE styleid = " . intval($styleid)
);
if (!$styletemp)
{
return false;
}
global $style;
$style = $styletemp;
$vbulletin->stylevars = unserialize($style['newstylevars']);
fetch_stylevars($style, $vbulletin->userinfo);
global $templateassoc;
//clear the template cache, otherwise we might get old templates
$vbulletin->templatecache = array();
$templateassoc = null;
cache_templates($templates, $style['templatelist']);
}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:36,代码来源:adminfunctions_template.php
示例3: init_language
// ############################################ LANGUAGE STUFF ####################################
// initialize $vbphrase and set language constants
$vbphrase = init_language();
// ###################### Start templates & styles #######################
// allow archive to use a non-english language
$styleid = intval($vbulletin->options['styleid']);
($hook = vBulletinHook::fetch_hook('style_fetch')) ? eval($hook) : false;
$style = $db->query_first_slave("
SELECT * FROM " . TABLE_PREFIX . "style
WHERE styleid = $styleid
");
fetch_stylevars($style, $vbulletin->userinfo);
if ((strtoupper(substr(PHP_OS, 0, 3)) == 'WIN' AND stristr($_SERVER['SERVER_SOFTWARE'], 'apache') === false) OR (strpos(SAPI_NAME, 'cgi') !== false AND @!ini_get('cgi.fix_pathinfo')))
{
define('SLASH_METHOD', false);
}
else
{
define('SLASH_METHOD', true);
}
if (SLASH_METHOD)
{
$archive_info = $_SERVER['REQUEST_URI'] ? $_SERVER['REQUEST_URI'] : $_SERVER['PHP_SELF'];
}
else
开发者ID:hungnv0789,项目名称:vhtm,代码行数:30,代码来源:global.php
示例4: intval
if ($styleid == 0)
{
continue;
}
$count++;
if ($count > 1)
{
echo ',';
}
echo " $count";
$vbulletin->templatecache =& $stylelist["$styleid"]['templatelist'];
// The fact that we use $userinfo here means that if you were to use any language specific stylevars in these templates (which we don't do by default), they would be of this user's language
// The only remedy for this is to create even more scenarios in the post parsed table with left -> right, right -> left and the imageoverride folder :eek:
$vbulletin->stylevars = $stylelist["$styleid"]['newstylevars'];
fetch_stylevars($stylelist["$styleid"], $vbulletin->userinfo);
$parsedtext = $bbcode_parser->parse($post['pagetext'], $post['forumid'], $post['allowsmilie'], false, '', false, true);
$saveparsed .= ", ($post[postid],
" . intval($post['lastpost']) . ",
" . intval($bbcode_parser->cached['has_images']) . ",
'" . $db->escape_string($bbcode_parser->cached['text']) . "',
" . intval($styleid) . ",
" . intval(LANGUAGEID) . "
)";
}
echo "<br />\n";
}
if (strlen($saveparsed) > 500000)
{
开发者ID:hungnv0789,项目名称:vhtm,代码行数:31,代码来源:misc.php
示例5: array
if ($_REQUEST['do'] == 'buildpostcache') {
$bbcodelist = array();
$bbcodes = $db->query_read("\n\t\tSELECT templateid, template\n\t\tFROM " . TABLE_PREFIX . "template\n\t\tWHERE title IN ('bbcode_quote', 'bbcode_php', 'bbcode_code', 'bbcode_html')\n\t");
while ($bbcode = $db->fetch_array($bbcodes)) {
$bbcodelist["{$bbcode['templateid']}"] = $bbcode['template'];
}
$stylelist = array();
//$uniquelist = array();
$styles = $db->query_read("\n\t\tSELECT * FROM " . TABLE_PREFIX . "style\n\t");
while ($style = $db->fetch_array($styles)) {
$tlist = unserialize($style['templatelist']);
$stylelist["{$style['styleid']}"]['templatelist'] = array('bbcode_code' => &$bbcodelist["{$tlist['bbcode_code']}"], 'bbcode_quote' => &$bbcodelist["{$tlist['bbcode_quote']}"], 'bbcode_php' => &$bbcodelist["{$tlist['bbcode_php']}"], 'bbcode_html' => &$bbcodelist["{$tlist['bbcode_html']}"]);
$stylelist["{$style['styleid']}"]['idlist'] = array('bbcode_code' => intval($tlist['bbcode_code_styleid']), 'bbcode_quote' => intval($tlist['bbcode_quote_styleid']), 'bbcode_php' => intval($tlist['bbcode_php_styleid']), 'bbcode_html' => intval($tlist['bbcode_html_styleid']));
// The fact that we use $userinfo here means that if you were to use any language specific stylevars in these templates (which we don't do by default), they would be of this user's language
// The only remedy for this is to create even more scenarios in the post parsed table with left -> right, right -> left and the imageoverride folder :eek:
$stylelist["{$style['styleid']}"]['stylevar'] = fetch_stylevars($style, $vbulletin->userinfo);
/*$unique = "{$tlist['bbcode_code_styleid']}|{$tlist['bbcode_quote_styleid']}|{$tlist['bbcode_php_styleid']}|{$tlist['bbcode_html_styleid']}";
if (empty($uniquelist["$unique"]))
{
$uniquelist["$unique"] = $style['styleid'];
}*/
}
$stylelist["0"] =& $stylelist["{$vbulletin->options['styleid']}"];
require_once DIR . '/includes/class_bbcode.php';
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
if (empty($vbulletin->GPC['perpage'])) {
$vbulletin->GPC['perpage'] = 1000;
}
if ($vbulletin->GPC['startat'] == 0) {
$db->query_write("TRUNCATE TABLE " . TABLE_PREFIX . "postparsed");
$firstpost = $db->query_first("SELECT MIN(postid) AS min FROM " . TABLE_PREFIX . "post");
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:misc.php
示例6: switchCssStyle
/**
* Switch the style for rendering
* This really should be part of the bootstrap code except:
* 1) We don't actually load the bootstrap in the admincp
* 2) There is a lot to the style load that isn't easy to redo (header/footer templates for example)
*
* This handles the stylevars and template lists -- including reloading the template cache.
* This is enough to handle the css template rendering, but probably won't work for anything
* more complicated.
*/
function switchCssStyle($styleid, $templates)
{
global $vbulletin;
$style = $this->fetchStyleByID($styleid);
if (empty($style)) {
return false;
}
$this->cacheStyles();
$vbulletin->stylevars = unserialize($style['newstylevars']);
fetch_stylevars($style, vB::getCurrentSession()->fetch_userinfo());
//clear the template cache, otherwise we might get old templates
vB_Library::instance('template')->cacheTemplates($templates, $style['templatelist'], false, true);
}
开发者ID:cedwards-reisys,项目名称:nexus-web,代码行数:23,代码来源:style.php
示例7: load_style
/**
* Loads style information (selected style and style vars)
*/
public function load_style()
{
if ($this->called('style') and !(defined('UNIT_TESTING') and UNIT_TESTING === true)) {
return;
}
$this->called['style'] = true;
global $style;
$style = $this->fetch_style_record($this->force_styleid);
define('STYLEID', $style['styleid']);
global $vbulletin;
$vbulletin->stylevars = unserialize($style['newstylevars']);
fetch_stylevars($style, $vbulletin->userinfo);
}
开发者ID:cedwards-reisys,项目名称:nexus-web,代码行数:16,代码来源:class_bootstrap.php
示例8: load_style
/**
* Loads style information (selected style and style vars)
*/
public function load_style()
{
if ($this->called('style') and !(defined('UNIT_TESTING') and UNIT_TESTING === true)) {
return;
}
$this->called['style'] = true;
global $style, $vbulletin;
$style = $this->fetch_style_record($this->force_styleid);
define('STYLEID', $style['styleid']);
define('STYLE_TYPE', $style['type']);
define('IS_MOBILE_STYLE', isset($vbulletin->stylecache['mobile'][$style['styleid']]) ? 1 : 0);
$vbulletin->stylevars = unserialize($style['newstylevars']);
fetch_stylevars($style, $vbulletin->userinfo);
}
开发者ID:0hyeah,项目名称:yurivn,代码行数:17,代码来源:class_bootstrap.php
注:本文中的fetch_stylevars函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论