manning
01-08-2009, 12:30 PM
I am using the code below to create custom pages in my forum - I thought it was working great until I started testing for cross browser compatibility.
For the most part, the file works in IE, FF, and OPERA just fine, but when adding the conditional in red - OPERA will not display the page after logging in - it just redisplays the no permission/login page even though its logged me in.
Any idea why OPERA does this? I know its <2% of users, but I like to work on all browsers.
<?php
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'my-file'); // change this depending on your filename
// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array(
);
// get special data templates from the datastore
$specialtemplates = array(
);
// pre-cache templates used by all actions
$globaltemplates = array(
'My_Template',
);
// pre-cache templates used by specific actions
$actiontemplates = array(
);
// ######################### REQUIRE BACK-END ############################
require_once('global.php');
// ################################################## #####################
// ######################## START MAIN SCRIPT ############################
// ################################################## #####################
if (!in_array($vbulletin->userinfo[usergroupid], array(2,6,7)))
{
print_no_permission();
}
$navbits = array();
$navbits[$parent] = 'My Page';
$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('My_Template') . '");');
?>
For the most part, the file works in IE, FF, and OPERA just fine, but when adding the conditional in red - OPERA will not display the page after logging in - it just redisplays the no permission/login page even though its logged me in.
Any idea why OPERA does this? I know its <2% of users, but I like to work on all browsers.
<?php
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'my-file'); // change this depending on your filename
// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array(
);
// get special data templates from the datastore
$specialtemplates = array(
);
// pre-cache templates used by all actions
$globaltemplates = array(
'My_Template',
);
// pre-cache templates used by specific actions
$actiontemplates = array(
);
// ######################### REQUIRE BACK-END ############################
require_once('global.php');
// ################################################## #####################
// ######################## START MAIN SCRIPT ############################
// ################################################## #####################
if (!in_array($vbulletin->userinfo[usergroupid], array(2,6,7)))
{
print_no_permission();
}
$navbits = array();
$navbits[$parent] = 'My Page';
$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('My_Template') . '");');
?>