Help - Search - Members - Calendar
Full Version: Changing Skins
Movable Type Community Forum > Additional Resources > Tips and Tricks
Bink
I have searched the forums and found for this URL a detailed description of how to change stylesheets.


However when I rebuild the new index pages under "skins" I get the following error message in MT.

CODE
Writing to '/skins/index.php.new' failed: Opening local file '/skins/index.php.new' failed: No such file or directory


1. The skins folder is set to 777.
2. All files are set to 644 (as on my main page of the blog).
3. I am able to rebuild header.php and footer.php (644 persmission) without a problem.
4. All pages on my site end in php and MT is configured for them to end in php.

When I go to my-url.com/skins/index.php this displays:
CODE
Warning: main(/skins/cookiecheck.php): failed to open stream: No such file or directory in /home/cunning/public_html/skins/index.php on line 1

Warning: main(): Failed opening '/skins/cookiecheck.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/cunning/public_html/skins/index.php on line 1

Warning: main(1): failed to open stream: No such file or directory in /home/cunning/public_html/skins/index.php on line 5

Warning: main(): Failed opening '1' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/cunning/public_html/skins/index.php on line 5
1: Description goes here Make this one your skin.
2: Description goes here Make this one your skin.

Warning: main(1): failed to open stream: No such file or directory in /home/cunning/public_html/skins/index.php on line 16

Warning: main(): Failed opening '1' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/cunning/public_html/skins/index.php on line 16


I'm sure there is something obvious I am missing. I have looked over all of the code and can't seem to find where the error lies.

I appreciate any assistance.

Thanks.
kadyellebee
You might double check the file output info -- it looks like you are using /skins/index.php with the / in the front. My blog is set up with skins/index.php without the / in the front.

You may also need to modify the skins/index so that all of the include statements have your full path to the files -- the warnings aren't showing up the full path, so that could be contributing to the problem!

Kristine
Bink
I'm able to rebuild now without error. That is an improvement (Thanks). However, you stated to revamp the "include" statement. I have tried a variety of options and nothing seems to work. This is the latest view of my skins/index.php file:

CODE
<?php include('skins/cookiecheck.php'); ?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<? include($headervar.$skin.$extension); ?>

<table>
<tr>
<td valign="top" class="tableText">1: Skin the Girl<a href="skins/index2.php?newskin=1">Make this one your skin</a>.</td>
</tr>
</table>

<? include($footervar.$skin.$extension); ?>

</body>
</html>


Which include line should be changed and how should this code be written? Thanks in advance.
kadyellebee
I'd have to see the page with the error to know what your error messages are doing for sure. smile.gif

Try changing the first include statement:
CODE
<?php include('/home/cunning/public_html/skins/cookiecheck.php'); ?>

And then double check that your cookiecheck.php file has the correct (full) path to your skins as well.

Kristine
Bink
Yea, I tried that already. Then I tried it again. It does not work.

This is my website. The files I have for this cookie are below:

CODE
/home/cunning/public_html/skins/index.php
/home/cunning/public_html/skins/index2.php
/home/cunning/public_html/skins/footer.php
/home/cunning/public_html/skins/header.php
/home/cunning/public_html/skins/cookiecheck.php


I only have one skin for now.

Please help. Thanks smile.gif
kadyellebee
Even though you only have one skin, you might try using filenames that have the number 1 in them -- header1.php and footer1.php -- that's how the skinning tutorial is set up, to look for a number.
smile.gif
Kristine
Bink
Okay smile.gif That helped. I appreciate it! (hugs) BUT biggrin.gif I do have few more questions.

1. the index.php file is the skin view. (The skins I have available.) Right?

When a user selects a skin does it increment this way:
CODE
/skins/index1.php
/skins/index2.php
etc.


Currently my /skins/index2.php looks like this

I thought I was to put my MT entries code in
CODE
/skins/index.php
.

What should the page name be for the skin change and full entries?

What am I doing incorrectly?

I think this should be the last of my questions. Thank you so much for helping me Kristine.
kadyellebee
It looks like stuff is working on the skins/index.php and skins/index2.php smile.gif Those two look correct; with skins/index.php showing the list of skins available (just one right now) and then skins/index2.php setting the cookie and confirming the choice.


But, you don't need to create a separate index page for each skin. The header and footer surround your current index page, and any archives. So the Main Index Template which probably publishes to http://cunningprose.com/index.php is where you'd make your changes to the MTEntries code with a header on top and a footer on the bottom.

I haven't gone through the ScriptyGoddess information to see if its the same as what Amy at Domesticat has, but on first glance, it appears to be. So maybe my info for that tutorial will help you?

Kristine
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.