I'm getting my blog skinned and the skins/index.php works fine, but when it loads skins/index2.php and you click on "main page", the old skin just comes back. For some reason, the new skin isn't "sticking".
I've looked over the tutorials and files again and I don't see what I missed. Does anyone have any clue what i should be looking for?
This is the code I'm using for skins/index2.php:
QUOTE
CODE
<?php
//if you have more than 15 skins, you'll want to change all of the instances of 15 to a higher number
if (isset($newskin)) {
$newskin=(int)$newskin;
if ($newskin<1) $newskin=1;
if ($newskin>15) $newskin=1;
} elseif (isset($skin)) {
$newskin=(int)$skin;
if ($skin<1) $newskin=1;
if ($skin>15) $newskin=1;
} else {
//if you want your skin to default to something other than the number one skin, change this number.
$newskin=1;
}
$skin=$newskin;
setcookie('skin',$newskin,time()+(86400*365),'/');
setcookie('skin',$newskin,time()+(86400*365),'/','.<$MTBlogHost$>');
setcookie('skin',$newskin,time()+(86400*365),'/','<$MTBlogHost$>');
$skin=$newskin;
?>
<html>
<head>
<title>Test your new skin out!</title>
<?php
$headervar = "<$MTBlogSitePath$>skins/header";
$extension = ".php";
include ($headervar.$skin.$extension);
?>
<h1>Like it?</h1>
<p>
Your skin number has been reset to <?php echo "$skin.";?> If you like it, journey on to the <a href="<$MTBlogURL$>">main page</a> of this site and play with it a bit. If it's not quite what you want, you can always <a href="<$MTBlogURL$>skins/index.php">go back</a> and select another.
</p>
<br><br>
<div align="center" class="blogfoot">The setup of skins for <$MTBlogName$> was made possible by a tutorial by <a href="http://www.domesticat.net/" target="_blank">Domesticat</a> with MT help by <a href="http://love-productions.com" target="_blank">love-productions</a>. </div>
<?php
$footervar = "<$MTBlogSitePath$>skins/footer";
$extension = ".php";
include ($footervar.$skin.$extension);
?>
//if you have more than 15 skins, you'll want to change all of the instances of 15 to a higher number
if (isset($newskin)) {
$newskin=(int)$newskin;
if ($newskin<1) $newskin=1;
if ($newskin>15) $newskin=1;
} elseif (isset($skin)) {
$newskin=(int)$skin;
if ($skin<1) $newskin=1;
if ($skin>15) $newskin=1;
} else {
//if you want your skin to default to something other than the number one skin, change this number.
$newskin=1;
}
$skin=$newskin;
setcookie('skin',$newskin,time()+(86400*365),'/');
setcookie('skin',$newskin,time()+(86400*365),'/','.<$MTBlogHost$>');
setcookie('skin',$newskin,time()+(86400*365),'/','<$MTBlogHost$>');
$skin=$newskin;
?>
<html>
<head>
<title>Test your new skin out!</title>
<?php
$headervar = "<$MTBlogSitePath$>skins/header";
$extension = ".php";
include ($headervar.$skin.$extension);
?>
<h1>Like it?</h1>
<p>
Your skin number has been reset to <?php echo "$skin.";?> If you like it, journey on to the <a href="<$MTBlogURL$>">main page</a> of this site and play with it a bit. If it's not quite what you want, you can always <a href="<$MTBlogURL$>skins/index.php">go back</a> and select another.
</p>
<br><br>
<div align="center" class="blogfoot">The setup of skins for <$MTBlogName$> was made possible by a tutorial by <a href="http://www.domesticat.net/" target="_blank">Domesticat</a> with MT help by <a href="http://love-productions.com" target="_blank">love-productions</a>. </div>
<?php
$footervar = "<$MTBlogSitePath$>skins/footer";
$extension = ".php";
include ($footervar.$skin.$extension);
?>
The cookie is getting written to my hard drive but the skin I chose still doesn't stick.
Any ideas would be appreciated, I'm not sure what to include here as I am muddling through this skinning stuff. Ask for whatever you need to help me