You are here: Re: showing alternative style sheets « HTML « IT news, forums, messages
Re: showing alternative style sheets

Posted by Mark Parnell on 07/31/06 06:06

Deciding to do something for the good of humanity, dorayme
<doraymeRidThis@optusnet.com.au> declared in alt.html:

> PHP (probably) with an include on the html pages (probably) and a
> link or two to allow people to see the same html set of pages in
> a variety of colours.
>
> Anyone actually done the elagant thing, not strangers, but here
> among us?

I've done something along those lines before, though not on something
available to the world wild web. OTTOMH basically something like this:

<a href="http://example.com/page?theme=blue">Blue</a>
<a href="http://example.com/page?theme=green">Green</a>
<a href="http://example.com/page?theme=red">Red</a>

<?php
if file_exists($_GET['theme'].'.css')
{
print('<link rel="stylesheet" href="'.$_GET['theme'].'.css">');
}
else
{
print('<link rel="stylesheet" href="default.css">');
}
?>

Probably needs to be a little more sophisticated than that, but should
get you started.

--
Mark Parnell
My Usenet is improved; yours could be too:
http://blinkynet.net/comp/uip5.html

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация