View Full Version : Skinning help please..
dudepet39 03-28-2005, 09:14 PM Hello, I just started skinning or just started to actually try skinning. And I am following the tutorial here, http://www.kiss-my-kitty.com/tutorials/php_skinning.php. And I guess it did not work..SO here is the VERY helpful error message I recieved..:rolleyes: :
Warning: main(.php): failed to open stream: No such file or directory in /home2/nitronex/public_html/testskinning.php on line 2
Warning: main(.php): failed to open stream: No such file or directory in /home2/nitronex/public_html/testskinning.php on line 2
Warning: main(): Failed opening '.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home2/nitronex/public_html/testskinning.php on line 2
Test! This is a simple test page to make sure your skin works!
Warning: main(.php): failed to open stream: No such file or directory in /home2/nitronex/public_html/testskinning.php on line 7
Warning: main(.php): failed to open stream: No such file or directory in /home2/nitronex/public_html/testskinning.php on line 7
Warning: main(): Failed opening '.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home2/nitronex/public_html/testskinning.php on line 7
I dont know what I could of done wrong...I dont know whats wrong..pleeaasee help..thanks : D.
I had that too and it took me weeks before I figured it out. Make sure your layout is well coded !!! And make sure there are no extra enters before your cookiecheckfile etc. If that still doesn't work, give me the urls of your page and quote the codes... Is your path good? Ask your host when you're not sure !
Monkey Bizzle 03-28-2005, 09:24 PM did you make a folder called "skins" on your server? You have to have that folder and in it should be your cookie check file and then folders named "1", "2", etc... for however many skins you have... Also, does your host support PHP?
dudepet39 03-28-2005, 09:30 PM Does the cookiecheck.php have to be in ALL the ACTUAL SKINS FOLDERS? Like..does the cookiecheck.php have to be in the skins folders also, 1, 2 and so on?? I might of done that wrong..and yes I created a skins folder in my main directory with the skins folders, 1. And yes my host does support PHP..
Well... You've got the folder skins, and you've got subfolders in it, like 1,2,3... Don't put it in your subfolder, but in skins. Is the amount of skins the same as said in the cookiecheck?
dudepet39 03-28-2005, 09:36 PM Yep, one skin...:(
Yep, one skin...:(
Could you quote the codes in the folder please? And you're sure the public_html thing is right?
dudepet39 03-28-2005, 09:45 PM Ok this is what is in the cookiecheck.php in the MAIN /skins/ folder (thats all I have it it, tell me if this is right or not : P):
<?
$total_skins = 1;
$default_skin = 1;
if (isset($_REQUEST['newskin'])) {
$newskin=(int)$_REQUEST['newskin'];
if ( ($newskin<1) OR ($newskin>$total_skins) )
$newskin=$default_skin;
} elseif (isset($_REQUEST['skin'])) {
$newskin=(int)$skin;
if ( ($skin<1) OR ($skin>$total_skins) )
$newskin=$default_skin;
} else $newskin=$default_skin;
$skin=$newskin;
setcookie ('skin', "", time() - 3600);
setcookie('skin',$newskin,time()+(86400*365),'/');
setcookie('skin',$newskin,time()+(86400*365),'/','.nitronexplosion.net');
$skin=$newskin;
$headervar = "/home2/nitronex/public_html/skins/$newskin/header2";
$footervar = "/home2/nitronex/public_html/skins/$newskin/footer2";
$extension = ".php";
?>
And heres whats in my header2.php Note: I had to put 2 after header and footer because I allready had a header.php.
header2.php:
<html>
<head>
<title>Site</title>
</head>
<body>
And footer2.php
</body>
</html>
And this is a testskinning.php page to see if it worked (where the error was):
<?php include ("/home2/nitronex/public_html/skins/cookiecheck.php");?>
<? include($header2var.$extension); ?>
Test!
This is a simple test page to make sure your skin works!
<? include($footer2var.$extension); ?>
http://www.nitronexplosion.net/testskinning.php theres a link where the actual error was..
Seems okay... Try renaming them to header and footer instead of header2 etc. It's just to try it out. Rename your current header to something else for a while. The home2 seems weird but if that is right, it's right...
dudepet39 03-28-2005, 10:01 PM But..then I would have to change the header.php to header2.php on ALL PAGES..and I'm not going to do that..lol. I will try the "home" thing..:D.
Monkey Bizzle 03-28-2005, 10:14 PM But..then I would have to change the header.php to header2.php on ALL PAGES..and I'm not going to do that..lol. I will try the "home" thing..:D. no you don't... the code that you should have on all of your pages is...
wait a second... that's what your error is!!!
you have
<? include($header2var.$exte nsion); ?>
but it SHOULD be
<? include($headervar.$extension); ?>
that code pulls from your cookie check file the header variable that you put in (header2) so you don't have to actually change it to say header2... try changing that line of code to what I said.
you will also have to fix the footer include as well.
dudepet39 03-28-2005, 10:15 PM Ok, sorry for the double post but I tried what Lien said...about the HOME thing..and..that didn't seem to work..
Monkey Bizzle 03-28-2005, 10:16 PM okay, now try what i said!
dudepet39 03-28-2005, 10:17 PM I did change it..right here..
$headervar = "/home/nitronex/public_html/skins/$newskin/header2";
$footervar = "/home/nitronex/public_html/skins/$newskin/footer2";
$extension = ".php";
?>
I did change the variables to header2 and footer2..
Monkey Bizzle 03-28-2005, 10:20 PM you obviously didn't read my post... nowhere in there did I mention changing that part of the cookie check file... I said the code on your actual pages needs to be changed. why don't you read my post again, a little more carefully.
dudepet39 03-28-2005, 10:20 PM OHHH...........!!!!!!! LMBO. I seee iitt!! LOL. Its the headervar, footervarpart...OOHH..LOL.
I think....thats right..what I saw...LOL. :P
dudepet39 03-28-2005, 10:23 PM But I did change it..
<?php include ("/home2/nitronex/public_html/skins/cookiecheck.php");?>
<? include($header2var.$extension); ?>
Test!
This is a simple test page to make sure your skin works!
<? include($footer2var.$extension); ?>
I can't USE JUST HEADER BECAUSE I ALLREADY HAVE IT FOR SOMETHING ELSE!! LOL.
No, change it to headervar.... because before your url in your cookiecheck it says HEADERVAR... too !!!
$headervar = "/home2/nitronex/public_html/skins/$newskin/header2";
$headervar.$extension refers to this headervar in the cookiecheckfile !
dudepet39 03-28-2005, 10:32 PM OK..I DONT QUITE GET IT.....
OK..lol.
Heres is what it CURRENTLY in all my files..
cookiecheck.php
<?
$total_skins = 1;
$default_skin = 1;
if (isset($_REQUEST['newskin'])) {
$newskin=(int)$_REQUEST['newskin'];
if ( ($newskin<1) OR ($newskin>$total_skins) )
$newskin=$default_skin;
} elseif (isset($_REQUEST['skin'])) {
$newskin=(int)$skin;
if ( ($skin<1) OR ($skin>$total_skins) )
$newskin=$default_skin;
} else $newskin=$default_skin;
$skin=$newskin;
setcookie ('skin', "", time() - 3600);
setcookie('skin',$newskin,time()+(86400*365),'/');
setcookie('skin',$newskin,time()+(86400*365),'/','.nitronexplosion.net');
$skin=$newskin;
$headervar = "/home2/nitronex/public_html/skins/$newskin/header2";
$footervar = "/home2/nitronex/public_html/skins/$newskin/footer2";
$extension = ".php";
?>
And the testskinning.php page
<?php include ("/home2/nitronex/public_html/skins/cookiecheck.php");?>
<? include($headervar.$extension); ?>
Test!
This is a simple test page to make sure your skin works!
<? include($footervar.$extension); ?>
header2.php
<html>
<head>
<title>Site</title>
</head>
<body>
footer2.php
</body>
</html>
You've done what we meant. And I hope there's no space between exten sion in your real file, if there is, remove the space
dudepet39 03-28-2005, 10:42 PM Nope...no space..:(. Now what?
Gah, I have to go asleep (1.45 am here, so yeah)... I'll check this back tomorrow, but currently, I don't have a clue !
dudepet39 03-28-2005, 10:47 PM Ok, goodnight..: ).
Okay, I'm back. What I should do is save this, but save it in another map outside your site on your computer. Then start all over, because you probably made this really little mistake you can barely see. Watch out for spelling mistakes, do it really carefully and you might try a tutorial on another site (e.g. www.star-girl.org, then go to tutorials, website related, advanced and then 'skinning your site'. I've used those tutorials both too to learn how to skin) If it happens again, contact me...
|