<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Reinhold Weber &#187; php</title>
	<atom:link href="http://reinholdweber.com/category/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://reinholdweber.com</link>
	<description>Confessions of a web developer</description>
	<lastBuildDate>Thu, 03 Nov 2011 20:43:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Ode to PHP</title>
		<link>http://reinholdweber.com/2011/07/25/ode-to-php/</link>
		<comments>http://reinholdweber.com/2011/07/25/ode-to-php/#comments</comments>
		<pubDate>Mon, 25 Jul 2011 20:57:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[programming quotes]]></category>

		<guid isPermaLink="false">http://reinholdweber.com/?p=88</guid>
		<description><![CDATA[There are only two kinds of languages: the ones people complain about and the ones nobody uses Bjarne Stroustrup]]></description>
			<content:encoded><![CDATA[<blockquote><p>There are only two kinds of languages: the ones people complain about and the ones nobody uses</p>
<p><a href="http://en.wikipedia.org/wiki/Stroustrup" rel="nofollow">Bjarne Stroustrup</a></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://reinholdweber.com/2011/07/25/ode-to-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The thing about theming Magento</title>
		<link>http://reinholdweber.com/2011/05/31/the-thing-about-theming-magento/</link>
		<comments>http://reinholdweber.com/2011/05/31/the-thing-about-theming-magento/#comments</comments>
		<pubDate>Tue, 31 May 2011 18:26:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[magento]]></category>
		<category><![CDATA[themes]]></category>

		<guid isPermaLink="false">http://reinholdweber.com/?p=72</guid>
		<description><![CDATA[Note to self &#8211; If you want to survive major version cms upgrades, always use theme inheritance and overwrite defaults of the default theme that comes with Magento. I wish I knew &#8230; See also &#8211; Designer&#8217;s guide to Magento]]></description>
			<content:encoded><![CDATA[<p>Note to self &#8211; If you want to survive major version cms upgrades, always use theme inheritance and overwrite defaults of the default theme that comes with Magento. I wish I knew &#8230;<br />
See also &#8211; <a href="http://www.magentocommerce.com/design_guide/articles/working-with-magento-themes#head-hierarchy-of-themes" target="_blank">Designer&#8217;s guide to Magento</a></p>
]]></content:encoded>
			<wfw:commentRss>http://reinholdweber.com/2011/05/31/the-thing-about-theming-magento/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The one thing you need to know about building CMS themes</title>
		<link>http://reinholdweber.com/2010/11/10/the-one-thing-you-need-to-know-about-building-cms-themes/</link>
		<comments>http://reinholdweber.com/2010/11/10/the-one-thing-you-need-to-know-about-building-cms-themes/#comments</comments>
		<pubDate>Wed, 10 Nov 2010 19:58:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[drupal]]></category>
		<category><![CDATA[joomla]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://reinholdweber.com/?p=52</guid>
		<description><![CDATA[Does it support intelligent body classes? It will make your theming life so much easier, it&#8217;s absolutely ridiculous &#8230; Read about the WordPress version and the benefits of using this concept for theming purposes here: http://codex.wordpress.org/Template_Tags/body_class WordPress (2.8+): &#60;body &#60;?php body_class&#40;&#41;; ?&#62;&#62; Drupal (originally from Zen Theme, since Drupal 6 in core): &#60;body class=&#34;&#60;?php print [...]]]></description>
			<content:encoded><![CDATA[<p>Does it support intelligent body classes?<br />
It will make your theming life so much easier, it&#8217;s absolutely ridiculous &#8230;</p>
<p>Read about the WordPress version and the benefits of using this concept for theming purposes here: <a href="http://codex.wordpress.org/Template_Tags/body_class">http://codex.wordpress.org/Template_Tags/body_class</a></p>
<p>WordPress (2.8+):</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;body <span style="color: #000000; font-weight: bold;">&lt;?php</span> body_class<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&gt;</pre></div></div>

<p>Drupal (originally from Zen Theme, since Drupal 6 in core):</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;body class=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">print</span> <span style="color: #000088;">$body_classes</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;</pre></div></div>

<p>Joomla:</p>
<p>Not available by default, must be built manually in template. The Joomla 1.6 version of the default Milkyway template uses something remotely similar for color and background parameters and template width.</p>
<p>Magento:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;body <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getBodyClass</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>?<span style="color: #0000ff;">'class=&quot;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getBodyClass</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot;'</span><span style="color: #339933;">:</span><span style="color: #0000ff;">''</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&gt;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://reinholdweber.com/2010/11/10/the-one-thing-you-need-to-know-about-building-cms-themes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Trends on Web Frameworks- interesting</title>
		<link>http://reinholdweber.com/2010/09/08/google-trends-on-web-frameworks-interesting/</link>
		<comments>http://reinholdweber.com/2010/09/08/google-trends-on-web-frameworks-interesting/#comments</comments>
		<pubDate>Wed, 08 Sep 2010 20:47:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://reinholdweber.com/?p=28</guid>
		<description><![CDATA[Do I need to say more &#8230; ?]]></description>
			<content:encoded><![CDATA[<p>Do I need to say more &#8230; ?</p>
<p><a href="http://reinholdweber.com/wp-content/uploads/2010/09/Bildschirmfoto-2010-09-08-um-22.42.062.png"><img class="alignleft size-full wp-image-31" title="Bildschirmfoto 2010-09-08 um 22.42.06" src="http://reinholdweber.com/wp-content/uploads/2010/09/Bildschirmfoto-2010-09-08-um-22.42.062.png" alt="Google Trends Chart Web Frameworks" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://reinholdweber.com/2010/09/08/google-trends-on-web-frameworks-interesting/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Symfony 2 Preview &#8211; It has never been so easy</title>
		<link>http://reinholdweber.com/2010/06/29/symfony-2-preview-it-has-never-been-so-easy/</link>
		<comments>http://reinholdweber.com/2010/06/29/symfony-2-preview-it-has-never-been-so-easy/#comments</comments>
		<pubDate>Tue, 29 Jun 2010 19:53:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://reinholdweber.com/?p=22</guid>
		<description><![CDATA[The Symfony PHP Framework has, in the past, alienated a lot of developers solely because it was quite a hassle to setup on shared hosting or a local server environment. What&#8217;s new in Symfony 2.0? Requires PHP5.3.2+ Doctrine 2 (Active Record is replaced by Entity Pattern, completely rewritten codebase for PHP5.3) PHPUnit for testing, lime [...]]]></description>
			<content:encoded><![CDATA[<p>The Symfony PHP Framework has, in the past, alienated a lot of developers solely because it was quite a hassle to setup on shared hosting or a local server environment.</p>
<p>What&#8217;s new in Symfony 2.0?</p>
<ul>
<li>Requires PHP5.3.2+</li>
<li>Doctrine 2 (Active Record is replaced by Entity Pattern, completely rewritten codebase for PHP5.3)</li>
<li>PHPUnit for testing, lime is out for good</li>
<li>Logging and caching with Zend Framework</li>
<li>Access to remote APIs (web services, feeds, etc.)</li>
<li>Support for Lucene indexes</li>
<li>PDf generation</li>
<li>Queueing</li>
<li>Cloud computing (storage, DBs, message queues)</li>
<li>Forms2, the new form framework</li>
<li>Web Debug Toolbar</li>
</ul>
<p>You can setup the symfony 2.0 sandbox on a local server in 7 steps under a local MAMPP environment on a Mac.</p>
<p>The symfony sandbox is a Symfony project where all the required libraries and some simple controllers are already included and where the basic configuration is already done.</p>
<ol>
<li>Download the sandbox</li>
<li>Unpack sandbox in your <em>htdocs</em> folder</li>
<li>Check your local server environment with <em>http://localhost:8888/sandbox/web/check.php</em></li>
<li><em></em>Check a first webpage in the development environment at <em>http://localhost:8888/sandbox/web/index_dev.php/</em></li>
<li><em></em>The sandbox comes with a simple  &#8220;Hello&#8221; app at <em>http://localhost:8888/sandbox/web/index_dev.php/hello/Reinhold%20Weber</em></li>
<li><em></em>Explore the web developer toolbar at the bottom (only available in the dev environment under <em>index_dev</em>)</li>
<li>Configure a virtual host in <em>conf/apache/httpd.conf</em> which points to the <em>sandbox/web/</em> directory</li>
</ol>
<p>Welcome to Symfony2.0, available in late 2010 &#8211; enjoy the ride. More on the new Symfony version soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://reinholdweber.com/2010/06/29/symfony-2-preview-it-has-never-been-so-easy/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Write a simple Joomla 1.6 module from scratch</title>
		<link>http://reinholdweber.com/2010/06/28/write-a-simple-joomla-1-6-module-from-scratch/</link>
		<comments>http://reinholdweber.com/2010/06/28/write-a-simple-joomla-1-6-module-from-scratch/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 19:31:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[joomla]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://reinholdweber.com/?p=19</guid>
		<description><![CDATA[Create you first Joomla 1.6 module completely from scratch. Joomla, as of version 1.5 which was a complete rewrite is based on the MVC design pattern which makes creating modules extremely easy and structured. Joomla 1.6 changes a few things, the basics however remain the same. Create a folder called mod_helloworld in modules Create a [...]]]></description>
			<content:encoded><![CDATA[<p>Create you first Joomla 1.6 module completely from scratch.</p>
<p>Joomla, as of version 1.5 which was a complete rewrite is based on the MVC design pattern which makes creating modules extremely easy and structured. Joomla 1.6 changes a few things, the basics however remain the same.</p>
<ol>
<li>Create a folder called mod_helloworld in modules</li>
<li>Create a mod_helloworld.php file</li>
<li>Create a mod_helloworld.xml file</li>
<li>Create a helper.php file</li>
<li>Create a template file tmpl/default.php</li>
<li>Discover new modules by going to &#8220;Extension Manager&#8221; -> &#8220;Discover&#8221;</li>
</ol>
<p>The code for <em>mod_helloworld.php</em></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #990000;">defined</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'_JEXEC'</span><span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// no direct access allowed</span>
&nbsp;
<span style="color: #b1b100;">require_once</span> <span style="color: #990000;">dirname</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">__FILE__</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>DS<span style="color: #339933;">.</span><span style="color: #0000ff;">'helper.php'</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// get helper files</span>
&nbsp;
<span style="color: #000088;">$hello</span> <span style="color: #339933;">=</span> modHelloWorldHelper<span style="color: #339933;">::</span><span style="color: #004000;">getHello</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$params</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">require</span> JModuleHelper<span style="color: #339933;">::</span><span style="color: #004000;">getLayoutPath</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'mod_helloworld'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>The <em>helper.php</em> file</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
	<span style="color: #000000; font-weight: bold;">class</span> modHelloWorldHelper
	<span style="color: #009900;">&#123;</span>
	    <span style="color: #009933; font-style: italic;">/**
	     * Retrieves the hello message
	     *
	     * @param array $params An object containing the module parameters
	     * @access public
	     */</span>    
	    <span style="color: #000000; font-weight: bold;">function</span> getHello<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$params</span> <span style="color: #009900;">&#41;</span>
	    <span style="color: #009900;">&#123;</span>
	        <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">'Hello, World!'</span><span style="color: #339933;">;</span>
	    <span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Include the template file for the default view</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #990000;">defined</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'_JEXEC'</span><span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$hello</span><span style="color: #339933;">;</span> 
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>The <em>helloworld.xml</em> file</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;">	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;utf-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;extension</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;module&quot;</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.6.0&quot;</span> <span style="color: #000066;">client</span>=<span style="color: #ff0000;">&quot;site&quot;</span> <span style="color: #000066;">method</span>=<span style="color: #ff0000;">&quot;upgrade&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
	    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Hello World!<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;author<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Reinhold Weber<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/author<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>1.6.0<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Reinholds simple Hello World module.<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;files<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			 <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;filename</span> <span style="color: #000066;">module</span>=<span style="color: #ff0000;">&quot;mod_helloworld&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>mod_helloworld.php<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/filename<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;filename<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>mod_helloworld.xml<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/filename<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;filename<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>index.html<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/filename<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;filename<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>helper.php<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/filename<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;filename<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>tmpl/default.php<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/filename<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;filename<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>tmpl/index.html<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/filename<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/files<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;params<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/params<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/extension<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Create both <em>index.html</em> files to prevent direct directory browsing</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;html&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://reinholdweber.com/2010/06/28/write-a-simple-joomla-1-6-module-from-scratch/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
		<item>
		<title>Create your first simple Drupal 7 module</title>
		<link>http://reinholdweber.com/2010/06/28/create-your-first-simple-drupal-7-module/</link>
		<comments>http://reinholdweber.com/2010/06/28/create-your-first-simple-drupal-7-module/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 17:50:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[drupal]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://reinholdweber.com/?p=14</guid>
		<description><![CDATA[Create your first Drupal 7 module with the following steps. Create a folder called helloworld in sites/all/modules/custom Create a helloworld.info file Create a template file page-helloworld.tpl.php in your theme directory Enable your module at http://domain.com/admin/build/modules Visit http://domain.com/helloworld This belongs into your helloworld.info file ; $Id$ &#160; name = helloworld description = Reinholds Hello World module [...]]]></description>
			<content:encoded><![CDATA[<p>Create your first Drupal 7 module with the following steps.</p>
<ol>
<li>Create a folder called helloworld in sites/all/modules/custom</li>
<li>Create a helloworld.info file</li>
<li>Create a template file page-helloworld.tpl.php in your theme directory</li>
<li>Enable your module at http://domain.com/admin/build/modules</li>
<li>Visit http://domain.com/helloworld</li>
</ol>
<p>This belongs into your <em>helloworld.info</em> file</p>

<div class="wp_syntax"><div class="code"><pre class="ini" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">; $Id$</span>
&nbsp;
<span style="color: #000099;">name</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> helloworld</span>
<span style="color: #000099;">description</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> Reinholds Hello World module</span>
<span style="color: #000099;">package</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> Reinholds modules</span>
<span style="color: #000099;">core</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> 7.x</span>
&nbsp;
files<span style="">&#91;</span><span style="">&#93;</span> <span style="color: #000066; font-weight:bold;">=</span> helloworld.module</pre></div></div>

<p>The <em>helloworld.module</em> file</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
	<span style="color: #000000; font-weight: bold;">function</span> helloworld_menu<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	  <span style="color: #000088;">$items</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	  <span style="color: #000088;">$items</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'helloworld'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
	    <span style="color: #0000ff;">'title'</span>            <span style="color: #339933;">=&gt;</span> t<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Hello world'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
	    <span style="color: #0000ff;">'page callback'</span>    <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'helloworld_output'</span><span style="color: #339933;">,</span>
	    <span style="color: #0000ff;">'access arguments'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'access content'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
	  <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	  <span style="color: #b1b100;">return</span> <span style="color: #000088;">$items</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">/*
	* Display output
	*/</span>
	<span style="color: #000000; font-weight: bold;">function</span> helloworld_output<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	  <span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Content-type: text/plain; charset=UTF-8'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	  <span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Content-Disposition: inline'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	  <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">'helloworld'</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>The theme template file <em>page-helloworld.tpl.php</em></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #b1b100;">print</span> <span style="color: #000088;">$content</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://reinholdweber.com/2010/06/28/create-your-first-simple-drupal-7-module/feed/</wfw:commentRss>
		<slash:comments>36</slash:comments>
		</item>
		<item>
		<title>Drupal 7 Themes &#8211; Browser specific CSS</title>
		<link>http://reinholdweber.com/2010/06/28/drupal-7-themes-browser-specific-css/</link>
		<comments>http://reinholdweber.com/2010/06/28/drupal-7-themes-browser-specific-css/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 17:08:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[drupal]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://reinholdweber.com/?p=10</guid>
		<description><![CDATA[In Drupal 6 you had to target IE specific CSS files by adding lines to your page.tpl.php or use an additional module which allows you to target browsers inside your theme.info file. In Drupal 7 however, the recommended way is by using the use drupal_add_css() function in your template.php file. function mytheme_preprocess_html&#40;&#38;$vars&#41; &#123; drupal_add_css&#40;path_to_theme&#40;&#41; . [...]]]></description>
			<content:encoded><![CDATA[<p>In Drupal 6 you had to target IE specific CSS files by adding lines to your page.tpl.php or use an <a href="http://drupal.org/project/conditional_styles">additional module</a> which allows you to target browsers inside your theme.info file.</p>
<p>In Drupal 7 however, the recommended way is by using the use <em>drupal_add_css()</em> function in your template.php file.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> mytheme_preprocess_html<span style="color: #009900;">&#40;</span><span style="color: #339933;">&amp;</span><span style="color: #000088;">$vars</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  drupal_add_css<span style="color: #009900;">&#40;</span>path_to_theme<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/fix-ie.css'</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'weight'</span> <span style="color: #339933;">=&gt;</span> CSS_THEME<span style="color: #339933;">,</span> <span style="color: #0000ff;">'browsers'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'IE'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'lt IE 7'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'!IE'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">FALSE</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'preprocess'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">FALSE</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://reinholdweber.com/2010/06/28/drupal-7-themes-browser-specific-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

