<?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>Niels' Homepage &#187; Projects</title>
	<atom:link href="http://www.heirbaut.nl/category/projects/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.heirbaut.nl</link>
	<description>Everything I want to put on the web</description>
	<lastBuildDate>Sun, 13 Feb 2011 18:21:01 +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>Forcing a Yii application to authenticate</title>
		<link>http://www.heirbaut.nl/2010/02/23/forcing-a-yii-application-to-authenticate/</link>
		<comments>http://www.heirbaut.nl/2010/02/23/forcing-a-yii-application-to-authenticate/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 19:44:08 +0000</pubDate>
		<dc:creator>Niels</dc:creator>
				<category><![CDATA[Otime]]></category>

		<guid isPermaLink="false">http://www.heirbaut.nl/?p=190</guid>
		<description><![CDATA[I wanted my Yii based application to force users to authenticate. After studying the forums, the manuals and searching the web the solution came to me just as I was about to go to bed. It is dead simple: just make sure that the only action a default user can perform is actionLogin(). See the [...]]]></description>
			<content:encoded><![CDATA[<p> 	I wanted my <a href="http://www.yiiframework.com">Yii</a> based application to force users to authenticate. After studying the forums, the manuals and searching the web the solution came to me just as I was about to go to bed. It is dead simple: just make sure that the only action a default user can perform is <code>actionLogin()</code>. See the code below on how to accomplish this:</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>
&nbsp;
<span style="color: #000000; font-weight: bold;">class</span> SiteController <span style="color: #000000; font-weight: bold;">extends</span> Controller
<span style="color: #009900;">&#123;</span>
    <span style="color: #009933; font-style: italic;">/**
     * @return array action filters
     */</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> filters<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">return</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
            <span style="color: #0000ff;">'accessControl'</span><span style="color: #339933;">,</span> <span style="color: #666666; font-style: italic;">// perform access control for CRUD operations</span>
        <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #009933; font-style: italic;">/**
     * Specifies the access control rules.
     * This method is used by the 'accessControl' filter.
     * @return array access control rules
     */</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> accessRules<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">return</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
            <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'allow'</span><span style="color: #339933;">,</span>  <span style="color: #666666; font-style: italic;">// allow all users to perform 'login'</span>
                <span style="color: #0000ff;">'actions'</span><span style="color: #339933;">=&gt;</span>array<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'login'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
                <span style="color: #0000ff;">'users'</span><span style="color: #339933;">=&gt;</span>array<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'*'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
            <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
            <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'allow'</span><span style="color: #339933;">,</span> <span style="color: #666666; font-style: italic;">// allow authenticated user to perform any action</span>
                <span style="color: #0000ff;">'users'</span><span style="color: #339933;">=&gt;</span>array<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'@'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
            <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
            <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'deny'</span><span style="color: #339933;">,</span>  <span style="color: #666666; font-style: italic;">// deny all users</span>
                <span style="color: #0000ff;">'users'</span><span style="color: #339933;">=&gt;</span>array<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'*'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
            <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
        <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// The rest of the SiteController implementation</span>
&nbsp;
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>I am not sure if this is the best possible solution, but since it is simple and elegant I am inclined to think it is.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.heirbaut.nl/2010/02/23/forcing-a-yii-application-to-authenticate/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>AScopy 1.0.0 has arrived</title>
		<link>http://www.heirbaut.nl/2006/12/03/ascopy-100-has-arrived/</link>
		<comments>http://www.heirbaut.nl/2006/12/03/ascopy-100-has-arrived/#comments</comments>
		<pubDate>Sun, 03 Dec 2006 18:07:32 +0000</pubDate>
		<dc:creator>Niels</dc:creator>
				<category><![CDATA[AScopy]]></category>

		<guid isPermaLink="false">http://www.heirbaut.nl/?p=66</guid>
		<description><![CDATA[And it is with at least a bit of pride to announce this release. There are two major updates in this release: The decision has been made to drop the DocBook based documentation in favor of a regular man page. Man pages are still the standard and enough converters are freely available to convert the [...]]]></description>
			<content:encoded><![CDATA[<p> 	And it is with at least a bit of pride to announce this release. There are two major updates in this release:</p>
<ol>
<li>The decision has been made to drop the DocBook based documentation in favor of a regular man page. Man pages are still the standard and enough converters are freely available to convert the documentation to any possible format.</li>
<li>AScopy now recognizes when a file is new but a copy of a file already present or when a file has been moved. A move of a file will look like a copy of a known file and then the removal of that file, but at least the file can be handled locally on the remote site and does not have to be transported over the network.</li>
</ol>
<p>The new version can be downloaded <a href="http://prdownloads.sourceforge.net/ascopy/ascopy-0.9.3.tar.gz?download">here</a>.</p>
<p>For the next version I will probably add the possibility to use different transportation mechanisms like FTP and WebDAV.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.heirbaut.nl/2006/12/03/ascopy-100-has-arrived/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RUP Template Project announcement</title>
		<link>http://www.heirbaut.nl/2006/11/19/rup-template-project-announcement/</link>
		<comments>http://www.heirbaut.nl/2006/11/19/rup-template-project-announcement/#comments</comments>
		<pubDate>Sun, 19 Nov 2006 20:43:41 +0000</pubDate>
		<dc:creator>Niels</dc:creator>
				<category><![CDATA[RUP templates]]></category>

		<guid isPermaLink="false">http://www.heirbaut.nl/?p=65</guid>
		<description><![CDATA[It has been a while since the last time a post has been added to this site. Apart from the fact that I have been very busy lately, I also started a new project. Because it seems that one of the most popular items on this side is the Vision Document template for the Rational [...]]]></description>
			<content:encoded><![CDATA[<p> 	It has been a while since the last time a post has been added to this site. Apart from the fact that I have been very busy lately, I also started a new project. Because it seems that one of the most popular items on this side is the Vision Document template for the Rational Unified Process in DocBook format.</p>
<p>So I decided to make a DocBook formatted template for all RUP documents and give the RUP Template Project its own section on this site.</p>
<p>So far only 7 out of the 44(!) templates have been done, but I will try to add one each day (on average). Because of my enthusiasm I decided to release early and often, which means that both the section of the site and the contents of the templates might be a bit &#8216;rough around the edges&#8217;. For now the templates will have to be downloaded individually, but I will provide a gzipped tarball soon.</p>
<p>You can find the RUP Template Project <a href="http://www.heirbaut.nl/projects/rupdoc/">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.heirbaut.nl/2006/11/19/rup-template-project-announcement/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New AScopy release 0.9.3</title>
		<link>http://www.heirbaut.nl/2006/09/06/new-ascopy-release-093/</link>
		<comments>http://www.heirbaut.nl/2006/09/06/new-ascopy-release-093/#comments</comments>
		<pubDate>Wed, 06 Sep 2006 20:16:52 +0000</pubDate>
		<dc:creator>Niels</dc:creator>
				<category><![CDATA[AScopy]]></category>

		<guid isPermaLink="false">http://www.heirbaut.nl/?p=64</guid>
		<description><![CDATA[It always takes longer than you think. In the FAQ list for the AScopy home page I stated that for a version 1.0.0 to arrive AScopy should be (among other things) be able to exclude files and directories. This means that I can safely update a site for which I still have files open, e.g. [...]]]></description>
			<content:encoded><![CDATA[<p> 	It always takes longer than you think. In the <a href="http://ascopy.sourceforge.net/faq.shtml">FAQ</a> list for the <a href="http://ascopy.sourceforge.net">AScopy home page</a> I stated that for a version 1.0.0 to arrive AScopy should be (among other things) be able to exclude files and directories. This means that I can safely update a site for which I still have files open, e.g. using ViM.</p>
<p>Normally that would cause AScopy to detect the ViM swap-files as new files, but now they can be excluded in the <code>.ascopyrc</code> file like this:</p>
<pre><code>exclude .*.swp
</code></pre>
<p>And that is all there is to it. The new version can be downloaded <a href="http://prdownloads.sourceforge.net/ascopy/ascopy-0.9.3.tar.gz?download">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.heirbaut.nl/2006/09/06/new-ascopy-release-093/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Release of NanoBlogger Gallery plugin 0.6.0</title>
		<link>http://www.heirbaut.nl/2006/08/29/release-of-nanoblogger-gallery-plugin-060/</link>
		<comments>http://www.heirbaut.nl/2006/08/29/release-of-nanoblogger-gallery-plugin-060/#comments</comments>
		<pubDate>Tue, 29 Aug 2006 19:45:51 +0000</pubDate>
		<dc:creator>Niels</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[Gallery plugin]]></category>

		<guid isPermaLink="false">http://www.heirbaut.nl/?p=63</guid>
		<description><![CDATA[There is a new release of the NanoBlogger Gallery plugin. The previous version had a problem when run in Bash versions below 3.1. There are some differences when initializing arrays from a &#8216;string&#8217; using $IFS. In Bash 3.1 you can do this: 1 2 3 4 5 6 7 8 #!/bin/bash &#160; a=&#34;1.2.3&#34; IFS='.' declare [...]]]></description>
			<content:encoded><![CDATA[<p> 	There is a new release of the NanoBlogger Gallery plugin. The previous version had a problem when run in Bash versions below 3.1. There are some differences when initializing arrays from a &#8216;string&#8217; using <code>$IFS</code>.</p>
<p>In Bash 3.1 you can do this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
&nbsp;
<span style="color: #007800;">a</span>=<span style="color: #ff0000;">&quot;1.2.3&quot;</span>
<span style="color: #007800;">IFS</span>=<span style="color: #ff0000;">'.'</span>
<span style="color: #7a0874; font-weight: bold;">declare</span> <span style="color: #660033;">-a</span> <span style="color: #007800;">arr</span>=<span style="color: #7a0874; font-weight: bold;">&#40;</span> <span style="color: #007800;">$a</span> <span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">${#arr[@]}</span>&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Outputs 3 in version 3.1 and 1 in version 3.0</span></pre></td></tr></table></div>

<p>But if you instead do this then it works in both versions:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
&nbsp;
<span style="color: #007800;">a</span>=<span style="color: #ff0000;">&quot;1.2.3&quot;</span>
<span style="color: #007800;">IFS</span>=<span style="color: #ff0000;">'.'</span>
<span style="color: #7a0874; font-weight: bold;">declare</span> <span style="color: #660033;">-a</span> arr
<span style="color: #7a0874; font-weight: bold;">eval</span> <span style="color: #ff0000;">&quot;arr=( <span style="color: #007800;">$a</span> )&quot;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">${#arr[@]}</span>&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Outputs 3 in version 3.1 and 3.0</span></pre></td></tr></table></div>

<p>So hopefully the Gallery plug-in is better prepared for the real world :). Thanks to <a href="http://courses.capcollege.bc.ca/faculty/cgratham/blog/index.html">Chris Gratham</a> for helping me out with this.</p>
<p>The new version can be downloaded <a href="http://www.heirbaut.nl/downloads/gallery/gallery-0.6.0.tar.gz">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.heirbaut.nl/2006/08/29/release-of-nanoblogger-gallery-plugin-060/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New AScopy release 0.9.2</title>
		<link>http://www.heirbaut.nl/2006/08/25/new-ascopy-release-092/</link>
		<comments>http://www.heirbaut.nl/2006/08/25/new-ascopy-release-092/#comments</comments>
		<pubDate>Fri, 25 Aug 2006 21:52:30 +0000</pubDate>
		<dc:creator>Niels</dc:creator>
				<category><![CDATA[AScopy]]></category>

		<guid isPermaLink="false">http://www.heirbaut.nl/?p=62</guid>
		<description><![CDATA[A new version of AScopy has been released: 0.9.2. This is a major bug fix release as the previous version did not remove directories in the correct order, i.e. deleting them before they were empty. You can download the new version here.]]></description>
			<content:encoded><![CDATA[<p> 	A new version of AScopy has been released: 0.9.2. This is a major bug fix release as the previous version did not remove directories in the correct order, i.e. deleting them before they were empty.</p>
<p>You can download the new version <a href="http://prdownloads.sourceforge.net/ascopy/ascopy-0.9.2.tar.gz?download">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.heirbaut.nl/2006/08/25/new-ascopy-release-092/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Release of Gallery plug-in 0.5.0</title>
		<link>http://www.heirbaut.nl/2006/08/25/release-of-gallery-plug-in-050/</link>
		<comments>http://www.heirbaut.nl/2006/08/25/release-of-gallery-plug-in-050/#comments</comments>
		<pubDate>Fri, 25 Aug 2006 07:32:13 +0000</pubDate>
		<dc:creator>Niels</dc:creator>
				<category><![CDATA[Gallery plugin]]></category>

		<guid isPermaLink="false">http://www.heirbaut.nl/?p=61</guid>
		<description><![CDATA[Version 0.5.0 of the NanoBlogger Gallery plug-in has just been released. It does not offer any extra features and is just a bug fix release to make the plug-in work with all versions of NanoBlogger from 3.0 and up. It has been tested on the for the following releases: 3.0 3.1 3.2 3.2.3 3.3 RC5 [...]]]></description>
			<content:encoded><![CDATA[<p> 	Version 0.5.0 of the NanoBlogger Gallery plug-in has just been released. It does not offer any extra features and is just a bug fix release to make the plug-in work with all versions of NanoBlogger from 3.0 and up.</p>
<p>It has been tested on the for the following releases:</p>
<ul>
<li>3.0</li>
<li>3.1</li>
<li>3.2</li>
<li>3.2.3</li>
<li>3.3 RC5</li>
</ul>
<p>The major problem that needed to be fixed is that the plug-in uses standard NanoBlogger calls as often as possible. This means that the standard entry format can be used and even that (from version 3.3) the format field can be used to put markup into the entry.</p>
<p>Unfortunately the NanoBlogger API has changed a bit between versions. The call to <code>read_metadata</code> does not fill the same return variable in the versions mentioned above:</p>
<ul>
<li><code>$NB_Metadata</code> for version 3.0 and 3.1</li>
<li><code>$META_DATA</code> for versions 3.2 and 3.2.3</li>
<li><code>$METADATA</code> for version 3.3</li>
</ul>
<p>There was already a function in the plug-in to determine for two given version numbers which was the newer one because the parameters to <code>read_metadata</code> also needed to have <code>$METADATA_CLOSETAG</code> specified from version 3.3 and up if the entry&#8217;s body is requested. So the plug-in already had to choose between two different calls based on the NanoBlogger version.</p>
<p>But everything seems to be fixed for now. The new plug-in can be downloaded <a href="http://www.heirbaut.nl/downloads/gallery/gallery-0.5.0.tar.gz">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.heirbaut.nl/2006/08/25/release-of-gallery-plug-in-050/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Official release of AScopy 0.9.1</title>
		<link>http://www.heirbaut.nl/2006/07/23/official-release-of-ascopy-091/</link>
		<comments>http://www.heirbaut.nl/2006/07/23/official-release-of-ascopy-091/#comments</comments>
		<pubDate>Sun, 23 Jul 2006 14:35:05 +0000</pubDate>
		<dc:creator>Niels</dc:creator>
				<category><![CDATA[AScopy]]></category>

		<guid isPermaLink="false">http://www.heirbaut.nl/?p=58</guid>
		<description><![CDATA[It is official the 0.9.1 release of AScopy. This site and its project site itself has been maintained with it for the last few weeks and everything goes so well that I am confident that this release can be publicly used. If you ever want to set up an open source project like this then [...]]]></description>
			<content:encoded><![CDATA[<p> 	It is official the 0.9.1 release of <a href="http://ascopy.sf.net">AScopy</a>. This site and its project site itself has been maintained with it for the last few weeks and everything goes so well that I am confident that this release can be publicly used.</p>
<p>If you ever want to set up an open source project like this then be prepared to put a lot of time in the initial set up. Stuff like getting <a href="http://www.sf.net">SourceForge</a> and <a href="http://freshmeat.net">FreshMeat</a> working correctly for your project is a lot of work.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.heirbaut.nl/2006/07/23/official-release-of-ascopy-091/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RUP Vision document template in DocBook format</title>
		<link>http://www.heirbaut.nl/2006/07/13/rup-vision-document-template-in-docbook-format/</link>
		<comments>http://www.heirbaut.nl/2006/07/13/rup-vision-document-template-in-docbook-format/#comments</comments>
		<pubDate>Thu, 13 Jul 2006 19:41:30 +0000</pubDate>
		<dc:creator>Niels</dc:creator>
				<category><![CDATA[RUP templates]]></category>

		<guid isPermaLink="false">http://www.heirbaut.nl/?p=55</guid>
		<description><![CDATA[As mentioned in a previous post I started creating RUP templates in the DocBook format. The template for the Vision document is finally in a usable state and can be downloaded here. The contents are still a bit rough around the edges, but should be self-explanatory. I hope they are as useful to you as [...]]]></description>
			<content:encoded><![CDATA[<p> 	As mentioned in a <a href="http://www.heirbaut.nl/2006/06/04/wow-that-has-been-a-long-time/">previous post</a> I started creating RUP templates in the DocBook format. The template for the Vision document is finally in a usable state and can be downloaded <a href="http://www.heirbaut.nl/downloads/rup/dbrup.tar.gz">here</a>. The contents are still a bit rough around the edges, but should be self-explanatory.</p>
<p>I hope they are as useful to you as they are to me. If there are any questions or remarks then please contact me.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.heirbaut.nl/2006/07/13/rup-vision-document-template-in-docbook-format/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Added a link</title>
		<link>http://www.heirbaut.nl/2006/07/02/added-a-link/</link>
		<comments>http://www.heirbaut.nl/2006/07/02/added-a-link/#comments</comments>
		<pubDate>Sun, 02 Jul 2006 14:43:28 +0000</pubDate>
		<dc:creator>Niels</dc:creator>
				<category><![CDATA[AScopy]]></category>
		<category><![CDATA[Website]]></category>

		<guid isPermaLink="false">http://www.heirbaut.nl/?p=52</guid>
		<description><![CDATA[A link to the AScopy web site has been added to the links menu.]]></description>
			<content:encoded><![CDATA[<p> 	A link to the <a href="http://ascopy.sf.net">AScopy web site</a> has been added to the links menu.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.heirbaut.nl/2006/07/02/added-a-link/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

