<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1019389" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1019389</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/trying-wrap-my-brain-around#comment-1115884</link>
    <description> &lt;p&gt;You could make a directory for each of your themes.. and then instead of loading theme1.css, theme2.css, you could load ./theme1/style.css, ./theme2/style.css, etc...&lt;/p&gt;
&lt;p&gt;Simple change...&lt;/p&gt;
 </description>
     <pubDate>Sat, 12 Oct 2002 20:37:29 +0000</pubDate>
 <dc:creator>zollet</dc:creator>
 <guid isPermaLink="false">comment 1115884 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/trying-wrap-my-brain-around#comment-1115873</link>
    <description> &lt;p&gt;Thanks for that Zollet although simplier to you, it&#039;s more confusing to me. I guess I have to stare at things a while! &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt; I will look at it this afternoon and break it apart.&lt;/p&gt;
&lt;p&gt;I tried to take out the escapes on the above code, that I did use, and received a parse error, I used single quotes as well. Any clues as to why that happened?&lt;/p&gt;
&lt;p&gt;Also, this is in my index.php to call in the themes.php&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;!-- The theme links --&amp;gt;&amp;lt;h2&amp;gt;Skin me&amp;lt;/h2&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;&amp;lt;A href=&amp;quot;&amp;lt;?= $_SERVER[&amp;#039;PHP_SELF&amp;#039;]; ?&amp;gt;?theme=theme1&amp;quot;&amp;gt;Fall&amp;lt;/a&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;&amp;lt;A href=&amp;quot;&amp;lt;?= $_SERVER[&amp;#039;PHP_SELF&amp;#039;]; ?&amp;gt;?theme=theme2&amp;quot;&amp;gt;America&amp;lt;/a&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;&amp;lt;A href=&amp;quot;&amp;lt;?= $_SERVER[&amp;#039;PHP_SELF&amp;#039;]; ?&amp;gt;?theme=theme3&amp;quot;&amp;gt;Butterflies*&amp;lt;/a&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;&amp;lt;A href=&amp;quot;&amp;lt;?= $_SERVER[&amp;#039;PHP_SELF&amp;#039;]; ?&amp;gt;?theme=theme4&amp;quot;&amp;gt;Halloween&amp;lt;/a&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt; &lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
&lt;p&gt;Is there a way to make it where I can put the themes in separate folders. The above code makes it impossible and I don&#039;t know how to edit it to make it work. I have everything in the blog directory and I hate that as it&#039;s hard to keep track of everything. &lt;/p&gt;
&lt;p&gt;Thanks for y&#039;all&#039;s help. &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Sara&lt;/p&gt;
 </description>
     <pubDate>Sat, 12 Oct 2002 12:18:00 +0000</pubDate>
 <dc:creator>DC_Sara</dc:creator>
 <guid isPermaLink="false">comment 1115873 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/trying-wrap-my-brain-around#comment-1115855</link>
    <description> &lt;p&gt;Your probably right.  I was just, eh... testing you. &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/wink.png&quot; title=&quot;Wink&quot; alt=&quot;Wink&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Sat, 12 Oct 2002 05:49:20 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1115855 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/trying-wrap-my-brain-around#comment-1115834</link>
    <description> &lt;blockquote class=&quot;bb-quote-body&quot;&gt;&lt;p&gt;Quote: &lt;em&gt;Originally posted by Mark Hensler &lt;/em&gt;&lt;br /&gt;
&lt;strong&gt;and then I add &quot;?theme=not_a_them&quot; to the URL... &lt;/strong&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Well, if a user wants to edit the URL just to mess with it then they know what they&#039;re doing, right? But you could add a little check that will make sure the format is &quot;theme#&quot; where # is a number. Again, this code is just to make it easier so you can add themes without having to edit the code every time but if it&#039;s very important that the users can&#039;t edit the URL to a theme that doesn&#039;t exist then switch() is the way to go.&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #FF8000&quot;&gt;//set the default theme&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;if(!&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;preg_match&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;/^theme\\d+$/\&quot;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$theme&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;)) {&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$theme&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = \&quot;theme3\&quot;;&lt;br /&gt;}&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;And Mark, I&#039;m not trying to say your code is bad or anything like that at all, in fact it is very good but I thought for a user that doesn&#039;t know much about programming and how to edit/add to it, this way might be better (easier)...&lt;/p&gt;
 </description>
     <pubDate>Fri, 11 Oct 2002 22:53:25 +0000</pubDate>
 <dc:creator>zollet</dc:creator>
 <guid isPermaLink="false">comment 1115834 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/trying-wrap-my-brain-around#comment-1115833</link>
    <description> &lt;p&gt;and then I add &quot;?theme=not_a_them&quot; to the URL...&lt;/p&gt;
 </description>
     <pubDate>Fri, 11 Oct 2002 22:46:20 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1115833 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/trying-wrap-my-brain-around#comment-1115832</link>
    <description> &lt;p&gt;Just to make it a little easier so that you don&#039;t have to add more code for every single theme...&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #FF8000&quot;&gt;//set the default theme&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;if(!isset(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$theme&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)) {&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$theme &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= \&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;theme3\&quot;;&lt;br /&gt;}&lt;br /&gt;//whatever &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$theme&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; is, that CSS and logo are loaded.&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$stylesheet&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$theme&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; . \&quot;.css\&quot;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$headerimg&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = \&quot;&amp;lt;div id=\\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;logo&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;&amp;gt;&amp;lt;img src=\\&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot; . &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$theme&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; . \&quot;.gif\\&quot; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;alt&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;=\\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;logo\\&quot; &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;/&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;&amp;gt;\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;;&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
 </description>
     <pubDate>Fri, 11 Oct 2002 22:45:16 +0000</pubDate>
 <dc:creator>zollet</dc:creator>
 <guid isPermaLink="false">comment 1115832 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/trying-wrap-my-brain-around#comment-1115815</link>
    <description> &lt;p&gt;I just tested it and it&#039;s wonderful. THANK YOU MARK! &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt; I have been pounding my head on the wall for a while with this hurdle. Now, I have learned something as well. &lt;/p&gt;
&lt;p&gt;You can see the test blog here: &lt;a href=&quot;http://www.blogland.com/b2/&quot; class=&quot;bb-url&quot;&gt;http://www.blogland.com/b2/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt; Sara&lt;/p&gt;
 </description>
     <pubDate>Fri, 11 Oct 2002 16:28:23 +0000</pubDate>
 <dc:creator>DC_Sara</dc:creator>
 <guid isPermaLink="false">comment 1115815 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/trying-wrap-my-brain-around#comment-1115814</link>
    <description> &lt;p&gt;Thanks Mark, I will try this! &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Sara&lt;/p&gt;
 </description>
     <pubDate>Fri, 11 Oct 2002 16:16:24 +0000</pubDate>
 <dc:creator>DC_Sara</dc:creator>
 <guid isPermaLink="false">comment 1115814 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/trying-wrap-my-brain-around#comment-1115813</link>
    <description> &lt;p&gt;I think this may be easier..&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;switch (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$theme&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; case &lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;theme1&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$stylesheet &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= \&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;theme1.css\&quot;; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$headerimg&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = \&quot;&amp;lt;div id=\&quot;logo\&quot;&amp;gt;Image for theme one goes here&amp;lt;/div&amp;gt;\&quot;; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; case &#039;theme2&#039;:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$stylesheet&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = \&quot;theme2.css\&quot;; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$headerimg&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = \&quot;&amp;lt;div id=\&quot;logo\&quot;&amp;gt;Image for theme 2 goes here&amp;lt;/div&amp;gt;\&quot;;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; case &#039;theme3&#039;:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$stylesheet&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = \&quot;theme3.css\&quot;; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$headerimg&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = \&quot;&amp;lt;div id=\&quot;logo\&quot;&amp;gt;&amp;lt;img src=\&quot;theme3.gif\&quot; alt=\&quot;logo\&quot; /&amp;gt;&amp;lt;/div&amp;gt;\&quot;; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; default:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$stylesheet&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = \&quot;theme3.css\&quot;; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$headerimg&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = \&quot;&amp;lt;div id=\&quot;logo\&quot;&amp;gt;&amp;lt;img src=\&quot;theme3.gif\&quot; alt=\&quot;logo\&quot; /&amp;gt;&amp;lt;/div&amp;gt;\&quot;; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;Just add more cases before the default line..  If you wanted to add a theme called &#039;blueberry&#039;, you&#039;d add these lines:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;case &lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;blueberry&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$stylesheet &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= \&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;blueberry.css\&quot;; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$headerimg&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = \&quot;&amp;lt;div id=\&quot;logo\&quot;&amp;gt;&amp;lt;img src=\&quot;blueberry.gif\&quot; alt=\&quot;logo\&quot; /&amp;gt;&amp;lt;/div&amp;gt;\&quot;; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
 </description>
     <pubDate>Fri, 11 Oct 2002 16:11:28 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1115813 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
