<?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"
	>

<channel>
	<title>Mindloop BVBA</title>
	<atom:link href="http://mindloop.be/feed/" rel="self" type="application/rss+xml" />
	<link>http://mindloop.be</link>
	<description>Webdesign and webdevelopment</description>
	<pubDate>Mon, 20 Jul 2009 08:37:23 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.5</generator>
	<language>en</language>
			<item>
		<title>is now collaborating with strictlyPHP on the stallionlocator dekhengsten databank</title>
		<link>http://mindloop.be/is-now-collaborating-with-strictlyphp-on-the-stallionlocator-dekhengsten-databank/</link>
		<comments>http://mindloop.be/is-now-collaborating-with-strictlyphp-on-the-stallionlocator-dekhengsten-databank/#comments</comments>
		<pubDate>Mon, 20 Jul 2009 08:36:46 +0000</pubDate>
		<dc:creator>Andy Mathijs</dc:creator>
		
		<category><![CDATA[Asides]]></category>

		<guid isPermaLink="false">http://mindloop.be/?p=113</guid>
		<description><![CDATA[is now collaborating with strictlyPHP on the stallionlocator dekhengsten databank
]]></description>
			<content:encoded><![CDATA[<p>is now collaborating with strictlyPHP on the stallionlocator <a href="http://www.stallionlocator.com/nl">dekhengsten</a> databank</p>
]]></content:encoded>
			<wfw:commentRss>http://mindloop.be/is-now-collaborating-with-strictlyphp-on-the-stallionlocator-dekhengsten-databank/feed/</wfw:commentRss>
		</item>
		<item>
		<title></title>
		<link>http://mindloop.be/91/</link>
		<comments>http://mindloop.be/91/#comments</comments>
		<pubDate>Mon, 01 Dec 2008 16:51:24 +0000</pubDate>
		<dc:creator>Andy Mathijs</dc:creator>
		
		<category><![CDATA[Asides]]></category>

		<guid isPermaLink="false">http://mindloop.be/?p=91</guid>
		<description><![CDATA[Mindloop went with the &#8220;release early&#8221; strategy for the new site.
]]></description>
			<content:encoded><![CDATA[<p>Mindloop went with the &#8220;release early&#8221; strategy for the new site.</p>
]]></content:encoded>
			<wfw:commentRss>http://mindloop.be/91/feed/</wfw:commentRss>
		</item>
		<item>
		<title>PHP Logo</title>
		<link>http://mindloop.be/php-logo/</link>
		<comments>http://mindloop.be/php-logo/#comments</comments>
		<pubDate>Fri, 28 Nov 2008 22:35:54 +0000</pubDate>
		<dc:creator>Andy Mathijs</dc:creator>
		
		<category><![CDATA[Asides]]></category>

		<guid isPermaLink="false">http://mindloop.loc/?p=71</guid>
		<description><![CDATA[Mindloop is trying to use the PHP logo but it&#8217;s just way too ugly
]]></description>
			<content:encoded><![CDATA[<p>Mindloop is trying to use the PHP logo but it&#8217;s just way too ugly</p>
]]></content:encoded>
			<wfw:commentRss>http://mindloop.be/php-logo/feed/</wfw:commentRss>
		</item>
		<item>
		<title>FastSlicer.com</title>
		<link>http://mindloop.be/fastslicercom/</link>
		<comments>http://mindloop.be/fastslicercom/#comments</comments>
		<pubDate>Fri, 28 Nov 2008 21:46:34 +0000</pubDate>
		<dc:creator>Andy Mathijs</dc:creator>
		
		<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://mindloop.loc/?p=63</guid>
		<description><![CDATA[FastSlicer.com
FastSlicer.com biedt zijn klanten , voornamelijk designers, aan om photoshop of andere grafische afbeeldingen naar xhtml en css on te vormen.
Mindloop verzorgde het design en uitwerking van hun site.
]]></description>
			<content:encoded><![CDATA[<div class="captionleft"><img src="/wp-content/uploads/2008/11/fast.jpg" alt="alt text" />FastSlicer.com</div>
<p>FastSlicer.com biedt zijn klanten , voornamelijk designers, aan om photoshop of andere grafische afbeeldingen naar xhtml en css on te vormen.</p>
<p>Mindloop verzorgde het design en uitwerking van <a href="http://www.fastslicer.com/">hun site</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://mindloop.be/fastslicercom/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Mindloop is testing the boundaries of wordpress&#8230;</title>
		<link>http://mindloop.be/mindloop-is-testing-the-boundaries-of-wordpress/</link>
		<comments>http://mindloop.be/mindloop-is-testing-the-boundaries-of-wordpress/#comments</comments>
		<pubDate>Fri, 28 Nov 2008 21:36:12 +0000</pubDate>
		<dc:creator>Andy Mathijs</dc:creator>
		
		<category><![CDATA[Asides]]></category>

		<guid isPermaLink="false">http://mindloop.loc/?p=61</guid>
		<description><![CDATA[Mindloop is testing the boundaries of wordpress&#8230;
]]></description>
			<content:encoded><![CDATA[<p>Mindloop is testing the boundaries of wordpress&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://mindloop.be/mindloop-is-testing-the-boundaries-of-wordpress/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Zebra tables</title>
		<link>http://mindloop.be/zebra-tables/</link>
		<comments>http://mindloop.be/zebra-tables/#comments</comments>
		<pubDate>Fri, 28 Nov 2008 21:19:01 +0000</pubDate>
		<dc:creator>Andy Mathijs</dc:creator>
		
		<category><![CDATA[Featured]]></category>

		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://mindloop.loc/?p=58</guid>
		<description><![CDATA[
Last week I was checking out the code of an open source project that used 10 lines of code just to generate a &#8220;odd&#8221; / &#8220;even&#8221; string to use as the html class for a table row. This is how I do it in one line:

&#60;?php 
for&#40;$i=0;$i&#60;10;$i++&#41; &#123; 
    $row = &#40;!isset&#40;$row&#41; [...]]]></description>
			<content:encoded><![CDATA[<p>
Last week I was checking out the code of an open source project that used 10 lines of code just to generate a &#8220;odd&#8221; / &#8220;even&#8221; string to use as the html class for a table row. This is how I do it in one line:</p>

<div class="wp_syntax"><div class="code"><pre class="php php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> 
<span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color:#800080;">0</span>;<span style="color: #000088;">$i</span><span style="color: #339933;">&lt;</span><span style="color: #cc66cc;">10</span>;<span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
    <span style="color: #000088;">$row</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#41;</span> || <span style="color: #000088;">$row</span><span style="color: #339933;">===</span><span style="">'even'</span><span style="color: #009900;">&#41;</span>?<span style="">'odd'</span><span style="color: #339933;">:</span><span style="">'even'</span>; <span style="color: #666666; font-style: italic;">//line that generates the classname </span>
    <span style="color: #990000;">echo</span> <span style="color: #000088;">$row</span>; 
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>The only easier way that I&#8217;m aware of would be to use the <a href="http://codeigniter.com/user_guide/helpers/string_helper.html">codeigniter alternator</a>.</p>

<div class="wp_syntax"><div class="code"><pre class="php php" style="font-family:monospace;"> <span style="color: #990000;">echo</span> alternator<span style="color: #009900;">&#40;</span><span style="">'string one'</span><span style="color: #339933;">,</span> <span style="">'string two'</span><span style="color: #009900;">&#41;</span>;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://mindloop.be/zebra-tables/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Caching an array to disk</title>
		<link>http://mindloop.be/caching-an-array-to-disk/</link>
		<comments>http://mindloop.be/caching-an-array-to-disk/#comments</comments>
		<pubDate>Fri, 28 Nov 2008 21:11:00 +0000</pubDate>
		<dc:creator>Andy Mathijs</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://mindloop.loc/?p=56</guid>
		<description><![CDATA[I discovered the var_export function in PHP about a year ago. It is able to return a string that represents the passed variable. The returned string is parsable by PHP.
One way to use this function would be to cache an array to a file.
In example:

export.php
&#60;?php
//will write the array to disk
$ar = array&#40;'test','testing'&#41;;
$content = var_export&#40;$ar,true&#41;;
file_put_contents&#40;'cache.php',&#34;&#60;?php\n\$cache=$content;&#34;&#41;;
?&#62;
&#160;
import.php
&#60;?php
//will output [...]]]></description>
			<content:encoded><![CDATA[<p>I discovered the <a href="http://www.php.net/var_export">var_export</a> function in PHP about a year ago. It is able to return a string that represents the passed variable. The returned string is parsable by PHP.</p>
<p>One way to use this function would be to cache an array to a file.</p>
<p>In example:</p>

<div class="wp_syntax"><div class="code"><pre class="php php" style="font-family:monospace;">export.php
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #666666; font-style: italic;">//will write the array to disk</span>
<span style="color: #000088;">$ar</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="">'test'</span><span style="color: #339933;">,</span><span style="">'testing'</span><span style="color: #009900;">&#41;</span>;
<span style="color: #000088;">$content</span> <span style="color: #339933;">=</span> <span style="color: #990000;">var_export</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ar</span><span style="color: #339933;">,</span><span style="color: #000000; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span>;
file_put_contents<span style="color: #009900;">&#40;</span><span style="">'cache.php'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;&lt;?php<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\$</span>cache=$content;&quot;</span><span style="color: #009900;">&#41;</span>;
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
import.php
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #666666; font-style: italic;">//will output the cached array</span>
<span style="color: #b1b100;">include</span> <span style="">'cache.php'</span>;
<span style="color: #990000;">var_dump</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$cache</span> <span style="color: #009900;">&#41;</span>;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://mindloop.be/caching-an-array-to-disk/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Htmlpurifier and the CodeIgniter framework</title>
		<link>http://mindloop.be/htmlpurifier-and-the-codeigniter-framework/</link>
		<comments>http://mindloop.be/htmlpurifier-and-the-codeigniter-framework/#comments</comments>
		<pubDate>Fri, 28 Nov 2008 15:45:41 +0000</pubDate>
		<dc:creator>Andy Mathijs</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[html]]></category>

		<category><![CDATA[library]]></category>

		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://mindloop.loc/?p=39</guid>
		<description><![CDATA[Intro
HtmlPurifier is a standards-compliant HTML filter library written in PHP. HTML Purifier will not only remove all malicious code (better known as XSS) with a thoroughly audited, secure yet permissive whitelist, it will also make sure your documents are standards compliant.
Although Codeigniter comes with it&#8217;s own XSS filtering method $this-&#62;input-&#62;xss_clean() I prefer the use of [...]]]></description>
			<content:encoded><![CDATA[<h2>Intro</h2>
<p>HtmlPurifier is a standards-compliant HTML filter library written in PHP. HTML Purifier will not only remove all malicious <a href="http://www.wmpub.com">code</a> (better known as XSS) with a thoroughly audited, secure yet permissive whitelist, it will also make sure your documents are standards compliant.</p>
<p>Although Codeigniter comes with it&#8217;s own XSS filtering method <span class="php-code">$this-&gt;input-&gt;xss_clean()</span> I prefer the use of the HtmlPurifier because of 2 reasons :<br />
1) HTMLpurifier will make sure that user input is converted to 	valid xhtml<br />
2) HTMLpurifier is tested against every element on the notorious 	<a href="http://ha.ckers.org/xss.html">XSS cheat sheet</a></p>
<h2 class="western">Installing htmlPurifier in codeigniter</h2>
<p>Since codeigniter is PHP4 and PHP5 compatible we&#8217;ll start out by downloading the php4 compatible version of htmlPurifier (<a href="http://htmlpurifier.org/download.html">http://htmlpurifier.org/download.html</a>)</p>
<p>Once you&#8217;ve downloaded and extracted the archive you&#8217;ll just have to copy the contents of the /htmlpurifier-2.0.1/library folder into your codeigniter /system/application/libraries folder.</p>
<p>HtmlPurifier comes with an HTMLPurifier.auto.php file that automagically changes your include path to include the neccessary folder. We&#8217;ll delete this file and make one small change to HTMLPurifier.php.</p>
<p>Just add</p>

<div class="wp_syntax"><div class="code"><pre class="php php" style="font-family:monospace;"><span style="color: #990000;">set_include_path</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">dirname</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">__FILE__</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> PATH_SEPARATOR <span style="color: #339933;">.</span> <span style="color: #990000;">get_include_path</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>;</pre></div></div>

<p>just below the</p>

<div class="wp_syntax"><div class="code"><pre class="php php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span></pre></div></div>

<p>line in HTMLPurifier.php and we&#8217;re ready to go.</p>
<h2>Small demo</h2>
<p>Add this testcontroller and check out the results :</p>

<div class="wp_syntax"><div class="code"><pre class="php php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">defined</span><span style="color: #009900;">&#40;</span><span style="">'BASEPATH'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #990000;">exit</span><span style="color: #009900;">&#40;</span><span style="">'No direct script access allowed'</span><span style="color: #009900;">&#41;</span>;
<span style="color: #000000; font-weight: bold;">class</span> Test <span style="color: #000000; font-weight: bold;">extends</span> Controller <span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">function</span> Test<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        parent<span style="color: #339933;">::</span><span style="color: #004000;">Controller</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>;
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">function</span> index<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">load</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">library</span><span style="color: #009900;">&#40;</span><span style="">'HTMLPurifier'</span><span style="color: #009900;">&#41;</span>;
        <span style="color: #000088;">$dirty_html</span> <span style="color: #339933;">=</span> <span style="">'&lt;a href=&quot;javascript:alert(<span style="">\'</span>test<span style="">\'</span>)&quot;&gt;ds&lt;/a&gt;&lt;p&gt;test&lt;br /&gt;&lt;img src=&quot;noalt.jpg&quot;&gt;'</span>;
        <span style="color: #000088;">$config</span> <span style="color: #339933;">=</span> HTMLPurifier_Config<span style="color: #339933;">::</span><span style="color: #004000;">createDefault</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>;
        <span style="color: #000088;">$clean_html</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">htmlpurifier</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">purify</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$dirty_html</span> <span style="color: #339933;">,</span> <span style="color: #000088;">$config</span> <span style="color: #009900;">&#41;</span>;
        <span style="color: #990000;">echo</span> <span style="color: #000088;">$clean_html</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><span class="article_seperator"><br />
</span></p>
]]></content:encoded>
			<wfw:commentRss>http://mindloop.be/htmlpurifier-and-the-codeigniter-framework/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Mindloop is converting the old site to Wordpress</title>
		<link>http://mindloop.be/is-facebooking/</link>
		<comments>http://mindloop.be/is-facebooking/#comments</comments>
		<pubDate>Fri, 28 Nov 2008 14:17:26 +0000</pubDate>
		<dc:creator>Andy Mathijs</dc:creator>
		
		<category><![CDATA[Asides]]></category>

		<guid isPermaLink="false">http://mindloop.loc/?p=17</guid>
		<description><![CDATA[Mindloop is converting the old site to Wordpress and loving it!
]]></description>
			<content:encoded><![CDATA[<p>Mindloop is converting the old site to Wordpress and loving it!</p>
]]></content:encoded>
			<wfw:commentRss>http://mindloop.be/is-facebooking/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
