<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Sun, 19 May 2013 00:00:54 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[456Bereastreet.com: Build your own PHP style sheet switcher]]></title>
      <guid>http://www.phpdeveloper.org/news/6134</guid>
      <link>http://www.phpdeveloper.org/news/6134</link>
      <description><![CDATA[<p>
At the 456 Berea St blog today, there's <a href="http://www.456bereastreet.com/archive/200608/build_your_own_php_style_sheet_switcher/">a popular new post</a> that demonstrates a simple (yet effective) method for switching out the style sheets on your site at the whim of the user.
</p>
<blockquote>
<p>
Want to have a style switcher that lets your site's visitors choose a different style sheet? Want it to work even if there is no JavaScript support? The trick is to use a server-side language like PHP, which is what I use for my style switcher.
</p>
<p>
Using PHP to let the user switch to a different CSS file is nothing new. But it is one of the things that I am often asked about, so I thought it would be good to have a write-up to refer people to in the future.
</p>
</blockquote>
<p>
The code for <a href="http://www.456bereastreet.com/archive/200608/build_your_own_php_style_sheet_switcher/">the switcher</a> is only about five lines long, implementation and all, but it's a nice, clean way to do it. It would break if the viewer didn't have cookies allowed on their system, though.
</p>]]></description>
      <pubDate>Thu, 24 Aug 2006 15:19:11 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Builder.com.au: Text-size switching with PHP and CSS]]></title>
      <guid>http://www.phpdeveloper.org/news/4534</guid>
      <link>http://www.phpdeveloper.org/news/4534</link>
      <description><![CDATA[From Builder.com.au today, there's <a href="http://www.builderau.com.au/program/soa/Text_size_switching_with_PHP_and_CSS/0,39024614,39225202,00.htm?feed=rss">this new tutorial</a> with a helpful guide on how to create a text-switching script with CSS and a little help from PHP.
<p>
<quote>
<i>
This tutorial will show you how to add such a text size switcher to your Web pages using PHP and CSS, thereby immediately making your Web site more accessible and scoring you useful brownie points from everyone over the age of 50. Keep reading, and find out how!
</i>
</quote>
<p>
<a href="http://www.builderau.com.au/program/soa/Text_size_switching_with_PHP_and_CSS/0,39024614,39225202,00.htm?feed=rss>The tutorial</a> assumes that you already have Apache/PHP installed, and creates a sample web page right off the bat. From there, they make and link in the CSS styling into the file. The PHP comes in when it's time to switch between the styles, swapping out the filenames according to a session variable...]]></description>
      <pubDate>Wed, 21 Dec 2005 07:12:17 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[24ways.org: Introducing UDASSS!]]></title>
      <guid>http://www.phpdeveloper.org/news/4526</guid>
      <link>http://www.phpdeveloper.org/news/4526</link>
      <description><![CDATA[On our sister site, <a href="http://www.ajaxdeveloper.org">AjaxDeveloper.org</a> today, there's <a href="http://ajaxdeveloper.org/news/615">a new post</a> that references an "Unobtrusive Degradable Ajax Style Sheet Switcher" powered on the backend by PHP - <a href="http://24ways.org/advent/introducing-udasss">UDASSS</a>.
<p>
<quote>
<i>
First of all, the idea is very simple. I wanted something just like what Paul Sowden put together in
<a href="http://www.alistapart.com/articles/alternate/">Alternative Style: Working With Alternate Style Sheets</a> from <a href="http://www.alistapart.com/">Alistapart Magazine</a> EXCEPT a few minor (not-so-minor actually) differences which I've listed briefly below:
<ul>
<li>Allow users to switch styles without JavaScript enabled (degradable)
<li>Preventing the <a href="http://www.bluerobot.com/web/css/fouc.asp">F.O.U.C.</a> before the window 'load' when getting preferred styles
<li>Keep the JavaScript entirely off our markup (no onclick's or onload's)
<li>Make it very very easy to implement (ok, Paul did that too)
</ul>
What I did to achieve this was used server-side cookies instead of JavaScript cookies. Hence, PHP. However this isn't a "PHP style switcher" '" which is where Ajax comes in. For the extreme technical folks, no, there is no xml involved here, or even a callback response. I only say Ajax because everyone knows what 'it' means. With that said, it's the Ajax that sets the cookies 'on the fly'. Got it? Awesome!
</i>
</quote>
<p>
The <a href="http://24ways.org/advent/introducing-udasss">rest of the post</a> is a tutorial on how to use it (simply), and a direct link to <a href="http://www.dustindiaz.com/downloads/udasss.zip">download it</a>.]]></description>
      <pubDate>Mon, 19 Dec 2005 07:27:01 -0600</pubDate>
    </item>
  </channel>
</rss>
