Stylesheets and ext...
 
Notifications
Clear all

Stylesheets and extra_header.php

8 Posts
3 Users
0 Reactions
2,608 Views
(@darklight)
Posts: 170
Estimable Member
Topic starter
 

I'm trying to use extra_header.php to add some additional styles to my site. I've completed the new stylesheets, uploaded them and gotten them to show in firefox, but when I try switching to any of the new ones, nothing happens. If I rename them style.css the work perfectly. If anyone knows what I'm doing wrong, I'd appreciate a little help please...

Here's my extra_header.php

<?php
echo "<link rel="alternate stylesheet" type="text/css" title="default" href=""$skindir/default.css">"
<link rel="alternate stylesheet" type="text/css" title="blue" href=""$skindir/bluestyle.css">"
<link rel="alternate stylesheet" type="text/css" title="creamy" href=""$skindir/creamstyle.css">"
<link rel="alternate stylesheet" type="text/css" title="glass" href=""$skindir/glass.css">"
<link rel="alternate stylesheet" type="text/css" title="rain" href=""$skindir/rain.css">"
<link rel="alternate stylesheet" type="text/css" title="gray sand" href=""$skindir/graysand.css">"
<link rel="alternate stylesheet" type="text/css" title="gray" href=""$skindir/graystyle.css">"
<link rel="alternate stylesheet" type="text/css" title="off white" href=""$skindir/offwhite.css">"
<link rel="alternate stylesheet" type="text/css" title="pink" href=""$skindir/pinkstyle.css">"
<link rel="alternate stylesheet" type="text/css" title="smooth gray" href=""$skindir/smoothgray.css">";"
?>

And yes, I'm going to cut down on the number, but I want to see the top three best liked by my visitors. This is on my main site. The info is in my Sig...


 
Posted : 02/06/2009 3:42 am
(@darklight)
Posts: 170
Estimable Member
Topic starter
 

I just added to the header.php. I wanted to use extra_header.php so that I wouldn't have to do it over after an upgrade...


 
Posted : 02/06/2009 9:13 am
 Elle
(@jenny)
Posts: 594
Honorable Member
 

You're calling it twice, btw. o_o


archive: dramione.org
site: accio.nu

Available for skin/mod commission! πŸ™‚

 
Posted : 02/06/2009 9:53 am
(@darklight)
Posts: 170
Estimable Member
Topic starter
 

I deleted extra_header.php first...


 
Posted : 02/06/2009 10:51 am
(@becca)
Posts: 553
Honorable Member
 

I don't think the echo () tag is going to work. That's for calling text. I think what you would need to be using is the include() tag:
http://us2.php.net/function.include
http://www.w3schools.com/PHP/php_includes.asp
http://www.tizag.com/phpT/include.php


 
Posted : 02/06/2009 1:05 pm
(@darklight)
Posts: 170
Estimable Member
Topic starter
 

I'll give it a shot and let you know how it goes. And thanks for helping me out with this Becca and Jenny! I'll try it as soon as I get home!


 
Posted : 02/06/2009 2:58 pm
 Elle
(@jenny)
Posts: 594
Honorable Member
 

I deleted extra_header.php first...

Weird... The <link> blocks are repeated. Where, I'm guessing, you've edited header.php and where extra_header.php is called. I imagine an error might be because you have two doctypes, and two <body> and <head> tags... If you view your source and CTRL-F "<!-- USERUID 0 0 -->" You'll see what I mean. o_o


archive: dramione.org
site: accio.nu

Available for skin/mod commission! πŸ™‚

 
Posted : 02/06/2009 7:53 pm
(@darklight)
Posts: 170
Estimable Member
Topic starter
 

I see what you mean there. The first one there is because I'm using the header from my forum at the top of the page and the second one is the normal efiction info. As for the duplicate entries, (<link rel=) I had two instances of that code in my header.php for some reason...  Don't ask me how I managed that 'cause I couldn't tell you. Anyway, I deleted the extra, so that should be taken care of. Thanks again for the warning, Jenny!

I'd still like to get this working with the extra_header.php file so I'll be trying a few things with that. I'd also like to have the user's chosen style stick as they navigate through the site. I've come across a basic tutorial on how to do this java script, but I have no idea how I should use it when combined with efiction, so that's yet another project. Again, any insight into any of these issues will be greatly appreciated!


 
Posted : 02/06/2009 8:21 pm
Share: