<?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; joomla</title>
	<atom:link href="http://reinholdweber.com/category/joomla/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>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>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>
	</channel>
</rss>

