<?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>Fri, 13 Apr 2012 16:33:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>40 signs you really are a lousy PHP programmer</title>
		<link>http://reinholdweber.com/2012/04/13/40-signs-you-really-are-a-lousy-php-programmer/</link>
		<comments>http://reinholdweber.com/2012/04/13/40-signs-you-really-are-a-lousy-php-programmer/#comments</comments>
		<pubDate>Fri, 13 Apr 2012 07:31:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://reinholdweber.com/?p=19</guid>
		<description><![CDATA[Disclaimer: This collection was published a few years ago on my blog, it was met with heavy criticism about featuring micro-optimiziations which have little to no effect at all compared to other things you can do which was then and is still today very true As this was copied &#38; published on a few hundred [...]]]></description>
			<content:encoded><![CDATA[<p>Disclaimer: This collection was published a few years ago on my blog, it was met with heavy criticism about featuring micro-optimiziations which have little to no effect at all compared to other things you can do which was then and is still today very true <img src='http://reinholdweber.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>As this was copied &amp; published on a few hundred blogs in the aftermath here again the original list exactly as I published it many years ago.</p>
<p>I will follow up shortly with an article on more effective methods. Until then &#8230;</p>
<p>This is something I prefer to call my &#8220;programming list of shame&#8221;. Although having a formal university education with courses on software engineering, enterprise software architecture &amp; database design I have been guilty of every single one of those things at one time or another. This is completely subjective &amp; <a href="http://www.eclipse.org/" target="_blank">Eclipse</a> oriented.</p>
<p>You are a lousy PHP programmer if you</p>
<ol>
<li>don&#8217;t comment your code properly with something like <a href="http://www.phpdoc.org/">phpDoc</a></li>
<li>don&#8217;t see the need and/or benefits of a good programming IDE like <a href="http://www.zend.com/de/">Zend Studio</a> or <a href="http://www.zend.com/en/community/pdt" target="_blank">Eclipse PDT</a></li>
<li>have never used some form of version control like <a href="http://subclipse.tigris.org/" target="_blank">Subclipse</a></li>
<li>don&#8217;t adopt some <a href="http://pear.php.net/manual/en/standards.php" target="_blank">coding &amp; naming standards</a> and general conventions and stick to to them at least throughout the project</li>
<li>don&#8217;t use a consistent methodology</li>
<li>don&#8217;t escape and/or validate properly input or sql queries</li>
<li>don&#8217;t plan your application thoroughly before starting to code</li>
<li>don&#8217;t use test-driven development</li>
<li>don&#8217;t program &amp; test with error reporting on</li>
<li>don&#8217;t see the benefits of a debugger</li>
<li>don&#8217;t refactor your code</li>
<li>don&#8217;t keep the different layers seperated using something like <a href="http://toys.lerdorf.com/archives/38-The-no-framework-PHP-MVC-framework.html" target="_blank">MVC</a></li>
<li>don&#8217;t know what these stand for: <a href="http://en.wikipedia.org/wiki/KISS_principle" target="_blank">KISS</a>, <a href="http://en.wikipedia.org/wiki/Don%27t_repeat_yourself" target="_blank">DRY</a>, <a href="http://toys.lerdorf.com/archives/38-The-no-framework-PHP-MVC-framework.html" target="_blank">MVC</a>, <a href="http://www.php.net/manual/en/language.oop5.php" target="_blank">OOP</a>, <a href="http://en.wikipedia.org/wiki/Representational_State_Transfer" target="_blank">REST</a></li>
<li>don&#8217;t return content but echo or print it from your functions or classes</li>
<li>have never seen the advantage of unit tests or testing in general</li>
<li>return HTML, not data, strings, or objects.</li>
<li>hard code messages and configuration parameters</li>
<li>don&#8217;t optimize your sql queries</li>
<li>don&#8217;t use __autoload</li>
<li>don&#8217;t allow intelligent error handling</li>
<li>use $_GET instead of $_POST for any destructive actions</li>
<li>don&#8217;t know how to use regular expressions</li>
<li>you&#8217;ve never heard of sql injection or cross-site scripting</li>
<li>don&#8217;t allow simple configuration, can be parameters passed to a class’s constructor, set/get methods called later, or constants defined at a runtime.</li>
<li>don&#8217;t understand the benefits and limitations of Object Oriented Programming</li>
<li>misuse OOP / everything you write , no matter how small is OOP</li>
<li>you think reusable software equals/requires your code to be OOP</li>
<li>don&#8217;t choose intelligent defaults</li>
<li>don&#8217;t have one single configuration file</li>
<li>don&#8217;t want the file contents to be seen, but give it a .inc extension instead of .php</li>
<li>don&#8217;t use a database abstraction layer</li>
<li>don&#8217;t keep it DRY, Don&#8217;t repeat yourself. If you have to copy and paste or duplicate something your design may be off.</li>
<li>don&#8217;t make a function/class/method do just one thing and don&#8217;t make them interact.</li>
<li>don&#8217;t try to take advantage of OOP specific features like abstract/interface classes, inheritage polymorphism &amp; access modifiers.</li>
<li>don&#8217;t optimize your application design with established <a href="http://www.sitepoint.com/forums/showthread.php?t=248721" target="_blank">design patterns</a></li>
<li>don&#8217;t allow your user to define a base directory if you have multiple files and/or directories</li>
<li>pollute the global namespace, one option is to prefix the functions in your library with a common string</li>
<li>don&#8217;t allow a table prefix when using database tables</li>
<li>use a separate <a href="http://www.sitepoint.com/forums/showthread.php?t=67849" target="_blank">template engine</a></li>
<li>don&#8217;t take a look at established <a href="http://www.phpit.net/article/ten-different-php-frameworks/" target="_blank">php frameworks</a> for inspiration, most of them have advanced web dev concepts and good code</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://reinholdweber.com/2012/04/13/40-signs-you-really-are-a-lousy-php-programmer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP Evolution Philosophy</title>
		<link>http://reinholdweber.com/2012/04/11/php-evolution-philosophy/</link>
		<comments>http://reinholdweber.com/2012/04/11/php-evolution-philosophy/#comments</comments>
		<pubDate>Wed, 11 Apr 2012 17:25:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://reinholdweber.com/?p=124</guid>
		<description><![CDATA[I do not think much of a man who is not wiser today than he was yesterday. – Abraham Lincoln Sometimes, reflecting on mistakes from the past – you wish you knew then what you know now. Here are a few of my PHP developer truths, learned the hard way by being young, stubborn and [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>I do not think much of a man who is not wiser today than he was yesterday. – <cite>Abraham Lincoln</cite></p></blockquote>
<p>Sometimes, reflecting on mistakes from the past – you wish you knew then what you know now. Here are a few of my PHP developer truths, learned the hard way by being young, stubborn and most of the times an arrogant prick, refusing to accept that others may actually know better.</p>
<ol>
<li>If you don’t know OOP and OOP design patterns, you’re not playing the same game.</li>
<li>Code doesn’t exist unless it’s checked into a version control system. Use version control for everything you do. Any version control, SVN, Git, even CVS, master it and use it.</li>
<li>Choose an IDE or any text editor, learn to master it and stick to it. If you have found one you like and feel comfortable with, never waste time reading about the perfect IDE again. It’s not the tool but how you use it.</li>
<li>No matter how smart you think you are and no matter how readable you think your code is, commenting your code ought to be self-evident. Code alone only tells me what actually it does, not what it was supposed to do.</li>
<li>The users aren’t idiots, you are. All user input without exception should be treated as if it had the plague. Quarantine it, sanitize it and stri it to the bones. PHP has an excellent and comprehensive array of filtering functions.</li>
<li>Realizing something is “good enough” will be a major jump in your value as a programmer.</li>
<li>Premature optimization is not the root of all evil, lack of proper planning is the root of all evil.</li>
<li>Useful and clean high-level abstractions are significantly more important than performance.</li>
<li>Programming actually has little to do with language and everything to do with algorithm.</li>
<li>You should never test your own software, testing is about trying to uncover developer mistakes, find holes in their assumptions, and flaws in their logic, you simply cannot be objective about your own code.</li>
<li>90% of the project is completed in 10% of the time, unfortunately the remaining 10% is completed in 90% of the scheduled time.</li>
<li>Tools, Methodologies, Patterns, Frameworks, etc. are no substitute for a properly trained programmer.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://reinholdweber.com/2012/04/11/php-evolution-philosophy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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>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>40</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>

