Hey.
On my site, I got coded a CSS Style changer. The code is as following:
<?php
//Simple CSS changer thingy for trevorchan
//by Smurph
//cookie value and filename must be the same! (cookie value must lack .css at the end)
require('config.php');
function css_menu_getcookie()
{
if ($_COOKIE['menucss'])
{
return '<LINK REL=StyleSheet HREF=\"'. $tc_webpath . '/css/' . $_COOKIE['menucss'] . '.css\" TYPE="text/css">\n';
}
else
{
return '<LINK REL=StyleSheet HREF=\"'. $tc_webpath . '/css/' . $tc_defaultmenucss . '.css\" TYPE="text/css">\n';
}
//returns the full path to the selected css script (I.E. http://www.pchan.org/css/futaba.css) within a HTML LINK tag
}
function css_board_getcookie()
{
if ($_COOKIE['boardcss'])
{
return '<LINK REL=StyleSheet HREF=\"'. $tc_webpath . '/css/' . $_COOKIE['boardcss'] . '.css\" TYPE="text/css">\n';
}
else
{
return '<LINK REL=StyleSheet HREF=\"'. $tc_webpath . '/css/' . $tc_defaultboardcss . '.css\" TYPE="text/css">\n';
}
//returns the full path to the selected css script (I.E. http://www.pchan.org/css/futaba.css) within a HTML LINK tag
}
if ($_GET['menucss']) setcookie('menucss', $_GET['menucss'], 60 * 60 * 24 * 60 + time());
if ($_GET['boardcss']) setcookie('boardcss', $_GET['boardcss'], 60 * 60 * 24 * 60 + time());
?>
I have my values set in config.php:
$tc_defaultmenucss= 'pchanm';
$tc_defaultboardcss= 'pchan';
In menu.php, I have the code to call the CSS, which is as follows:
<?php
require('config.php');
require($tc_config['rootdir'].'/inc/functions.php');
require('css.php');
ob_start()
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><?php echo $chan_name; ?> Navigation</title>
<?php css_menu_getcookie(); ?>
However, the CSS doesn't show on the navigation. Anyone know why? No errors show, there's just no CSS.