<?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>Rediscoverer &#187; WebDev</title>
	<atom:link href="http://rediscoverer.net/archives/category/webdev/feed" rel="self" type="application/rss+xml" />
	<link>http://rediscoverer.net</link>
	<description>... since almost everything is already out there.</description>
	<lastBuildDate>Sat, 28 Feb 2009 10:32:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Firefox HTML Validator plugin fix  (Ubuntu Feisty or Gutsy)</title>
		<link>http://rediscoverer.net/archives/36</link>
		<comments>http://rediscoverer.net/archives/36#comments</comments>
		<pubDate>Thu, 08 Nov 2007 12:39:16 +0000</pubDate>
		<dc:creator>Rolan</dc:creator>
				<category><![CDATA[Daily]]></category>
		<category><![CDATA[WebDev]]></category>
		<category><![CDATA[colorzilla]]></category>
		<category><![CDATA[feisty]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[gutsy]]></category>
		<category><![CDATA[html validator]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://rediscoverer.net/archives/36</guid>
		<description><![CDATA[If you have Ubuntu Feisty or Gutsy with the default Firefox installed (meaning you didn&#8217;t manually downloaded/installed your Firefox), you might have some problems making the HTML Validator plugin work even after you followed the fix for Linux. I&#8217;ve already encountered this problem when I was still using Ubuntu Feisty and then again this morning [...]]]></description>
			<content:encoded><![CDATA[<p>If you have Ubuntu Feisty or Gutsy with the default Firefox installed (meaning you didn&#8217;t manually downloaded/installed your Firefox), you might have some problems making the <a href="http://users.skynet.be/mgueury/mozilla/index.html"><span class="caps">HTML</span> Validator plugin</a> work even after you followed the <a href="http://users.skynet.be/mgueury/mozilla/faq.html#LINUX">fix for Linux</a>. I&#8217;ve already encountered this problem when I was still using Ubuntu Feisty and then again this morning after upgrading to Gutsy.</p>

<p>The fix is actually for another Firefox plugin: <a href="https://addons.mozilla.org/en-US/firefox/addon/271">Colorzilla</a>. I was having some problems making the <span class="caps">HTML</span> Validator work back then and decided to install Colorzilla first.  It also had some problems but after some Googling, I <a href="http://ubuntuforums.org/showpost.php?p=1432077&amp;postcount=6">found a fix</a> that worked. The latest Firefox binaries needed to be downloaded and its libxpcom shared objects (libxpcom*.so) overwrite the current ones found in /usr/lib/firefox.</p>

<p>Feeling that I couldn&#8217;t do much without the <span class="caps">HTML</span> Validator plugin, I gave it one more try. The thing worked!</p>

<p>After upgrading to Ubuntu Gutsy Gibbon, some of my Firefox plugins went crazy (HTML Validator, Colorzilla and <a href="https://addons.mozilla.org/en-US/firefox/addon/722">NoScript</a>). Then I remembered having the same problems and fixed it again.</p>

<p>Just wanted to post that- might be able to help someone.</p>]]></content:encoded>
			<wfw:commentRss>http://rediscoverer.net/archives/36/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>1st Philippine PHP Developer&#8217;s Conference</title>
		<link>http://rediscoverer.net/archives/33</link>
		<comments>http://rediscoverer.net/archives/33#comments</comments>
		<pubDate>Wed, 10 Oct 2007 03:00:58 +0000</pubDate>
		<dc:creator>Rolan</dc:creator>
				<category><![CDATA[Reminders]]></category>
		<category><![CDATA[WebDev]]></category>

		<guid isPermaLink="false">http://rediscoverer.net/archives/33</guid>
		<description><![CDATA[&#8220;Welcome to the 1st ever Philippine PHP Developer&#8217;s Conference that will be held this upcoming December 1, 2007 where sharing opensource solutions in the enterprise and schools is the main theme.This is in follow up with last April&#8217;s grand meetup which caught the attention of Philippines IT Industry and were looking forward of expanding it&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center"><a href='http://www.php.net/cal.php?id=2807&amp;cm=12&amp;cy=2007' title='PHP Everywhere'><img src='http://rediscoverer.net/wp-content/uploads/2007/10/phpmeet12-07.png' alt='PHP Everywhere' /></a></p>
<blockquote>&#8220;Welcome to the 1st ever Philippine <span class="caps">PHP</span> Developer&#8217;s Conference that will be held this upcoming December 1, 2007 where sharing opensource solutions in the enterprise and schools is the main theme.This is in follow up with last April&#8217;s grand meetup which caught the attention of Philippines IT Industry and were looking forward of expanding it&#8217;s presence thru this event.&#8221; </blockquote>

Still accepting event sponsors. For more info, please visit:<br />
<p style="text-align: center"><a href='http://www.phpugph.com/' title='PHP User-Group Philippines'><img src='http://rediscoverer.net/wp-content/uploads/2007/10/phpugph-logo.gif' alt='PHPUGPH Logo' /></a></p>]]></content:encoded>
			<wfw:commentRss>http://rediscoverer.net/archives/33/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Input Elements: disabled vs. readOnly</title>
		<link>http://rediscoverer.net/archives/32</link>
		<comments>http://rediscoverer.net/archives/32#comments</comments>
		<pubDate>Tue, 09 Oct 2007 13:56:36 +0000</pubDate>
		<dc:creator>Rolan</dc:creator>
				<category><![CDATA[Daily]]></category>
		<category><![CDATA[Reminders]]></category>
		<category><![CDATA[WebDev]]></category>

		<guid isPermaLink="false">http://rediscoverer.net/archives/32</guid>
		<description><![CDATA[Disabled and readOnly input elements both prevent its data from being changed (at least via the user). But a disabled input element&#8217;s data is not sent with other data when the form is submitted. Could&#8217;ve saved me that extra 30-minute debugging time.]]></description>
			<content:encoded><![CDATA[<p>Disabled and readOnly input elements both prevent its data from being changed (at least via the user).<br />
But a disabled input element&#8217;s data is not sent with other data when the form is submitted. Could&#8217;ve saved me that extra 30-minute debugging time.</p>]]></content:encoded>
			<wfw:commentRss>http://rediscoverer.net/archives/32/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Application Programming Interface</title>
		<link>http://rediscoverer.net/archives/26</link>
		<comments>http://rediscoverer.net/archives/26#comments</comments>
		<pubDate>Tue, 29 May 2007 13:45:09 +0000</pubDate>
		<dc:creator>Rolan</dc:creator>
				<category><![CDATA[Daily]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WebDev]]></category>

		<guid isPermaLink="false">http://rediscoverer.net/archives/26</guid>
		<description><![CDATA[I was just thinking how nice it would be if more open-source PHP applications offer some sort of API for their application. It would really be useful specially when the application is likely to be integrated with another. For example, I have phpBB2 and Coppermine Gallery. Yes, there&#8217;s already a Coppermine-phpBB bridge to tie the [...]]]></description>
			<content:encoded><![CDATA[<p>I was just thinking how nice it would be if more open-source <span class="caps">PHP </span>applications offer some sort of <acronym title="Application Programming Interface">API</acronym> for their application. It would really be useful specially when the application is likely to be integrated with another. </p>

<p>For example, I have <a href="http://phpbb.com">phpBB2</a> and <a href="http://coppermine-gallery.net">Coppermine Gallery</a>. Yes, there&#8217;s already a Coppermine-phpBB bridge to tie the forum users to the gallery. But other than that, I have no other means of communication between the two. What if I want to display a link to a user&#8217;s gallery in each of his post, along with the usual buttons (profile, ims, etc)? What if I wanted to display randomly picked images from a user&#8217;s gallery and display it in his/her profile?</p>

<p>Ways of accessing an application&#8217;s functionalities from outside might range from a simple, block copy-paste solution and/or directly talking at another&#8217;s <acronym title="database">DB</acronym> tables&#8230; to hellish insert-here-to-there hacks and conflicting variable hunts that span several files. Some people would find themselves reading and studying in detail how both applications to come up with a way to make them work together. In-depth knowledge is good. But sometimes you don&#8217;t have for that and might be an overkill in some cases. I don&#8217;t want to see how that cow got in there, I just want my hamburger.  </p>

<p>If both had an available <a href="http://en.wikipedia.org/wiki/API" title="Application Programming Interface"><span class="caps">API</span></a>, I don&#8217;t have to go through all that trouble. I would already know what it could do and know how to make it do things without dealing with unrelated stuff. And if I ever have to make it do something out of the ordinary, I will know where to look at.</p>

<p>Plugins just crossed my mind (it should&#8230; I&#8217;m using <a href="http://wordpress.org">WordPress</a>). Some apps come with their own plugin system, so you can extend the application and often times import some functionalities from outside the application&#8230; kinda like what an <span class="caps">API </span>does. But I don&#8217;t think they can replace <span class="caps">API</span>s. In fact, they need <span class="caps">API</span>s to exist. The application provides a some sort of a Plugin <span class="caps">API </span>for building plugins. Hmmm&#8230; using Plugin <span class="caps">API</span>s to build a plugin that communicates to another application via the <span class="caps">API </span>the other app provides. Sweet. I don&#8217;t have to deal with how the inside works. I just need something to connect them from the outside.</p>

<p>By the way, if anyone reading this knows some open-source projects (in <span class="caps">PHP</span>) that have an <span class="caps">API </span>available, please do comment. Already found one, <a href="http://www.simplemachines.org" title="Simple Machines Forum"><span class="caps">SMF</span></a>, a forum software. The <span class="caps">API </span>is just in its <a href="http://www.simplemachines.org/download/?tools">pre-release</a> though, but sure looks promising.</p>

<p>I&#8217;m sleepy and could no longer think clearly. I hope I made some sense in this post.</p>]]></content:encoded>
			<wfw:commentRss>http://rediscoverer.net/archives/26/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EXTRACT() not working on phpMyAdmin</title>
		<link>http://rediscoverer.net/archives/24</link>
		<comments>http://rediscoverer.net/archives/24#comments</comments>
		<pubDate>Sat, 03 Mar 2007 00:42:02 +0000</pubDate>
		<dc:creator>Rolan</dc:creator>
				<category><![CDATA[Daily]]></category>
		<category><![CDATA[Reminders]]></category>
		<category><![CDATA[WebDev]]></category>

		<guid isPermaLink="false">http://rediscoverer.net/archives/24</guid>
		<description><![CDATA[I was looking at the MySQL manual for Date and Time functions and stumbled upon a function that I might need for an &#8220;experiment&#8221; I&#8217;m doing. I used the function EXTRACT in my query, having my test run on phpMyAdmin, but it was giving me a syntax error warning. I thought that I might have [...]]]></description>
			<content:encoded><![CDATA[<p>I was looking at the MySQL manual for <a href="http://dev.mysql.com/doc/refman/4.1/en/date-and-time-functions.html">Date and Time functions</a> and stumbled upon a function that I might need for an &#8220;experiment&#8221; I&#8217;m doing. I used the function <span class="caps">EXTRACT </span>in my query, having my test run on <a href="http://phpmyadmin.net">phpMyAdmin</a>, but it was giving me a syntax error warning. I thought that I might have the wrong syntax for <span class="caps">EXTRACT </span>so I tried running a sample query, right straight from the manual.</p>

<div class="igBar"><span id="lmysql-2"><a href="#" onclick="javascript:showPlainTxt('mysql-2'); return false;"><span class="caps">PLAIN TEXT</span></a></span></div><div class="syntax_hilite"><span class="langName">MySQL:</span><br /><div id="mysql-2">
<div class="mysql"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333; font-weight: bold;"><span class="caps">SELECT</span></span> <span style="color: #993333; font-weight: bold;"><span class="caps">EXTRACT</span></span><span style="color: #66cc66;">&#40;</span><span style="color: #aa9933; font-weight: bold;"><span class="caps">YEAR</span></span> <span style="color: #993333; font-weight: bold;"><span class="caps">FROM</span></span> <span style="color: #ff0000;">&#8217;1999-07-02&#8242;</span><span style="color: #66cc66;">&#41;</span>; </div></li></ol></div>
</div></div><br />

<p>But it still gave me the same error warning. It should be working since its, after all, it was in the manual&#8230; otherwise it would be corrected or removed. I ran the same query, but this time the mysql command line. It worked. I executed the query in <span class="caps">PHP,  </span>it also worked. Well, I think phpMyAdmin is having some problems with this. I&#8217;m using phpMyAdmin &#8211; 2.8.1, on MySQL 5.0.21 that comes with <a href="http://www.apachefriends.org/en/xampp.html"><span class="caps">XAMPP</span></a> . Maybe I&#8217;ll try to ask somebody to test it in other versions.</p>]]></content:encoded>
			<wfw:commentRss>http://rediscoverer.net/archives/24/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CakePHP HTMLPurifier Component</title>
		<link>http://rediscoverer.net/archives/19</link>
		<comments>http://rediscoverer.net/archives/19#comments</comments>
		<pubDate>Tue, 12 Sep 2006 06:09:32 +0000</pubDate>
		<dc:creator>Rolan</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[WebDev]]></category>

		<guid isPermaLink="false">http://rediscoverer.net/archives/19</guid>
		<description><![CDATA[I needed to use HMTLPurifier on my CakePHP application. So I just saved it under the vendors folder inside the application folder. This how the directory strucure looked like. + myApplication &#124;-----+ config/ &#124;-----+ controllers/ &#124;-----+ models/ &#124;-----+ plugins/ &#124;-----+ tmp/ &#124;-----+ vendors/ &#124; &#124;----- HTMLPurifier/ &#124; &#124;----- HTMLPurifier.php &#124; &#124;-----+ views/ &#124;-----+ webroot/ &#124;-----+ [...]]]></description>
			<content:encoded><![CDATA[<p>I needed to use <span class="caps">HMTLP</span>urifier on my CakePHP application. So I just saved it under the vendors folder inside the application folder. This how the directory strucure looked like.</p>




<pre>
+ myApplication
     |-----+ config/
     |-----+ controllers/
     |-----+ models/
     |-----+ plugins/
     |-----+ tmp/
     |-----+ vendors/
     |       |----- HTMLPurifier/
     |       |----- HTMLPurifier.php
     |
     |-----+ views/
     |-----+ webroot/
     |-----+ .htaccess
     |-----+ index.php</pre>




<p>But before including the vendor component, I needed to add the to <span class="caps">HTMLP</span>urifier so Cake can find it. So, I added something to <span class="caps">HTMLP</span>urifier.php, somewhere before the require_once() statements:</p>




<div class="igBar"><span id="lphp-5"><a href="#" onclick="javascript:showPlainTxt('php-5'); return false;">PLAIN TEXT</a></span></div><div class="syntax_hilite"><span class="langName">PHP:</span><br /><div id="php-5">
<div class="php"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// START edit -dchx</span></div></li>
<li style="font-weight: bold;color:#26536A;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">//Add the path to the vendors folder where HTMLPurifier is located</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span><a href="http://www.php.net/function_exists"><span style="color:#000066;">function_exists</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">&#8216;ini_set&#8217;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div></li>
<li style="font-weight: bold;color:#26536A;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/ini_set"><span style="color:#000066;">ini_set</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">&#8216;include_path&#8217;</span>, <a href="http://www.php.net/ini_get"><span style="color:#000066;">ini_get</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">&#8216;include_path&#8217;</span><span style="color:#006600; font-weight:bold;">&#41;</span> . PATH_SEPARATOR . <a href="http://www.php.net/dirname"><span style="color:#000066;">dirname</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#000000; font-weight:bold;">__FILE__</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div></li>
<li style="font-weight: bold;color:#26536A;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// END edit -dchx</span></div></li>
<li style="font-weight: bold;color:#26536A;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">require_once</span> <span style="color:#FF0000;">&#8216;HTMLPurifier/ConfigDef.php&#8217;</span>;</div></li>
<li style="font-weight: bold;color:#26536A;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">require_once</span> <span style="color:#FF0000;">&#8216;HTMLPurifier/Config.php&#8217;</span>;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">require_once</span> <span style="color:#FF0000;">&#8216;HTMLPurifier/Lexer.php&#8217;</span>;</div></li>
<li style="font-weight: bold;color:#26536A;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">require_once</span> <span style="color:#FF0000;">&#8216;HTMLPurifier/HTMLDefinition.php&#8217;</span>;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">require_once</span> <span style="color:#FF0000;">&#8216;HTMLPurifier/Generator.php&#8217;</span>;</div></li>
<li style="font-weight: bold;color:#26536A;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">require_once</span> <span style="color:#FF0000;">&#8216;HTMLPurifier/Strategy/Core.php&#8217;</span>;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">require_once</span> <span style="color:#FF0000;">&#8216;HTMLPurifier/Encoder.php&#8217;</span>; </div></li></ol></div>
</div></div><br />




<p>Now I&#8217;m all set. I just need to to include the component using the CakePHP function uses().</p>

<p><strong><span class="caps">UPDATE</span></strong>: Some little update on this. When using <span class="caps">HTMLP</span>urifier inside CakePHP (or even in other apps), make sure that the character encoding of the output page is <span class="caps">UTF</span>-8. I encountered this little bug where a paragraph tag (p) containing only a non-breaking space was converted into another character. But I checked on my html page and the meta tag Content-type was set to <span class="caps">UTF</span>-8 (and of course I&#8217;m using <span class="caps">XHTML</span> 1.0 Transitional DocType). I fixed it by sending a <strong>content-type header</strong>. In CakePHP, you can do this inside the <i>beforeFilter()</i> function of your controller.</p>




<div class="igBar"><span id="lphp-6"><a href="#" onclick="javascript:showPlainTxt('php-6'); return false;">PLAIN TEXT</a></span></div><div class="syntax_hilite"><span class="langName">PHP:</span><br /><div id="php-6">
<div class="php"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">class</span> MyController extends AppController <span style="color:#006600; font-weight:bold;">&#123;</span></div></li>
<li style="font-weight: bold;color:#26536A;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">//&#8230; the usual</span></div></li>
<li style="font-weight: bold;color:#26536A;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">function</span> beforeFilter<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div></li>
<li style="font-weight: bold;color:#26536A;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#123;</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/header"><span style="color:#000066;">header</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">&#8216;Content-type:text/html;charset=UTF-8&#8242;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div></li>
<li style="font-weight: bold;color:#26536A;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> </div></li></ol></div>
</div></div><br />
]]></content:encoded>
			<wfw:commentRss>http://rediscoverer.net/archives/19/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>HTML Purifier</title>
		<link>http://rediscoverer.net/archives/18</link>
		<comments>http://rediscoverer.net/archives/18#comments</comments>
		<pubDate>Sat, 09 Sep 2006 09:09:22 +0000</pubDate>
		<dc:creator>Rolan</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[WebDev]]></category>

		<guid isPermaLink="false">http://rediscoverer.net/archives/18</guid>
		<description><![CDATA[I&#8217;m currently doing an article submission application. Wanting to give the users more power over their articles, I&#8217;ve planned on using a WYSIWYG text editor for the article submission form. Using that kind of editor, users can format their articles easily, even if they have little experience with html. I tried using TinyMCE, an Open-Source [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m currently doing an article submission application. Wanting to give the users more power over their articles, I&#8217;ve planned on using a <acronym title="What You See Is What You Get">WYSIWYG</acronym> text editor for the article submission form. Using that kind of editor, users can format their articles easily, even if they have little experience with html. I tried using <a href="http://tinymce.moxiecode.com/" title="TinyMCE Javascript Content Editor">TinyMCE</a>, an Open-Source <span class="caps">WYSIWYG </span>editor that runs using Javascript and I&#8217;m quite happy with the results. It provided some &#8220;MS Word&#8221;-like interface. It also has some mechanism that filters disallowed html tags like   and other potentially dangerous tags that could make the application vulnerable to <acronym title="Cross-Site Scripting">XSS</acronym> attacks.</p>

<p>But what if javascript was disabled by the user? Expecting that the input would be processed by TinyMCE, the application won&#8217;t be doing some input checking. If javascript is disabled, TinyMCE won&#8217;t be able to do its job. The disallowed html code will be freely included and the application will be left open to attacks. <span class="caps">PHP&#8217;</span>s Built-in input filtering functions isn&#8217;t much of use here, since all they do is strip the tags or convert special characters like &lt; and &gt; into their equivalent entities and will no longer be recognized as mark-up. I wanted some <span class="caps">PHP </span>functioality that can do the filtering for me.</p>

<p>So I consulted sir Google and after searching some possible solutions, I found <a href="http://hp.jpsband.org/" title="Filter you HTML the standards-compliant way"><span class="caps">HTML</span> Purifier</a> and gave it a test run. Yep, it worked. I tried it with TinyMCE on, and the html fomartting was still intact after purification. Now I tried it with TinyMCE on, but then disabled javascript and inserted some not-so-malicious code and the purifier caught it. Nice! If I have time, I&#8217;ll test it further. I just need to make the application fully functional before doing detailed testing and debugging.</p>]]></content:encoded>
			<wfw:commentRss>http://rediscoverer.net/archives/18/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A love song for Web Standards</title>
		<link>http://rediscoverer.net/archives/16</link>
		<comments>http://rediscoverer.net/archives/16#comments</comments>
		<pubDate>Fri, 08 Sep 2006 06:21:06 +0000</pubDate>
		<dc:creator>Rolan</dc:creator>
				<category><![CDATA[Daily]]></category>
		<category><![CDATA[Funny]]></category>
		<category><![CDATA[WebDev]]></category>

		<guid isPermaLink="false">http://rediscoverer.net/blog/archives/16</guid>
		<description><![CDATA[Rjene gave me a link to a love song about Web Standards. Read more about it at Boagworld.com . Very funny, specially the part with the tables nesting fifteen levels deep. )]]></description>
			<content:encoded><![CDATA[<p><a href="http://subersibo.quasifusion.com/wp" title="subersibo">Rjene</a> gave me a link to a <a href="http://www.esanity.co.uk/podcasts/HandsToBoag.mp3" title="Hands To Boag">love song about Web Standards</a>. Read more about it at <a href="http://www.boagworld.com/archives/2006/04/a_love_song_to_boagworld.html" title="Practical Advice for those managing websites">Boagworld.com</a> . Very funny, specially the part with the tables nesting fifteen levels deep. <img src='http://rediscoverer.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> )</p>]]></content:encoded>
			<wfw:commentRss>http://rediscoverer.net/archives/16/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
<enclosure url="http://www.esanity.co.uk/podcasts/HandsToBoag.mp3" length="4826383" type="audio/mpeg" />
		</item>
		<item>
		<title>Update screws  extensions</title>
		<link>http://rediscoverer.net/archives/13</link>
		<comments>http://rediscoverer.net/archives/13#comments</comments>
		<pubDate>Thu, 31 Aug 2006 08:41:00 +0000</pubDate>
		<dc:creator>Rolan</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Rant]]></category>
		<category><![CDATA[WebDev]]></category>

		<guid isPermaLink="false">http://rediscoverer.net/blog/archives/13</guid>
		<description><![CDATA[I was really interested with Joomla as an alternative for web publishing. It was really easy to understand and use (plus the admin panel rocks, imho). Then this update for Joomla came up, related to high-risk security vulnerabilities affecting all the past versions of Joomla. I have read the warnings about the update being incompatible [...]]]></description>
			<content:encoded><![CDATA[<p>I was really interested with <a href="http://joomla.org">Joomla</a> as an alternative for web publishing. It was really easy to understand and use (plus the admin panel rocks, imho). Then this update for Joomla came up, related to high-risk security vulnerabilities affecting all the past versions of Joomla. I have read the warnings about the update being incompatible with some extensions but I went on upgrading anyway. All was running smoothly when I stumbled upon the upload part in the admin panel. It was telling me I was not authorized the view/use th upload page (on the pop-up window). What the??? I am the super admin and the only user (I tested it on a localhost to make sure I don&#8217;t screw up the site on our test server). Then when I started using other extensions, they we&#8217;re giving me several warnings. Some of them I was available to work around, but most of them had something to do with Joomla&#8217;s inner workings so I didn&#8217;t messed with it (yet). Only two extension were left (barely) working.</p>

<p>Awww&#8230; man. Just when everything with Joomla looked promising. Well, I&#8217;ll be waiting for more updates and fixes regarding those extensions.</p>]]></content:encoded>
			<wfw:commentRss>http://rediscoverer.net/archives/13/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>3 Options</title>
		<link>http://rediscoverer.net/archives/14</link>
		<comments>http://rediscoverer.net/archives/14#comments</comments>
		<pubDate>Mon, 28 Aug 2006 13:34:13 +0000</pubDate>
		<dc:creator>Rolan</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[WebDev]]></category>

		<guid isPermaLink="false">http://rediscoverer.net/blog/archives/14</guid>
		<description><![CDATA[I&#8217;ve been handling this project for quite sometime now. It was a construction related forum, where homeowners seek advice from professionals. Our client wanted to add more services/features to the site. When the site was handed down to me there were already some additions. It had a classifieds section and a company directory, that were [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been handling this project for quite sometime now. It was a construction related forum, where homeowners seek advice from professionals. Our client wanted to add more services/features to the site. When the site was handed down to me there were already some additions. It had a classifieds section and a company directory, that were quite buggy and problematic. I had to take it down and rewrite it, salvaging any parts that I can. I also spiced it up a bit and turned it into a mash-up using <a href="http://developer.yahoo.com/maps" title="Yahoo Maps API">Yahoo! Maps</a> . I added a wiki on the site, hoping that users would help contribute and build a useful knowledge base. But I guess th folks there aren&#8217;t really ready for that. I was also assigned to create Jobs section, that would pull out related job feeds from another site and display some graphs/stats regarding the jobs. I did it, but got a little attention from the users (though some users got jobs from it). I also added a weather section, since weather was an important factor in their trade and a forecast would be quite helpful. They are also planning to have a product review/rating part, and an encyclopedia/dictionary to replace the wiki. They also want to add a gallery where the works of the contractors can be displayed/featured. They also asked me to install a newsletter application ( <a href="http://www.phplist.com" title="PHPlist"><span class="caps">PHP</span>list</a> ) to inform users/partners with lates news and site updates.</p>

<p>Almost all of the requested features are done and are ready to be integrated with the site. The problem is that things are quite unorganized/scattered. I have two versions each for the Classifieds and Directory section, running using <a href="http://cakephp.org" title="Rapid Application Development Framework for PHP">CakePHP</a> and another using an <acronym title="Object-Oriented Programming">OOP</acronym> approach. The weather section and the Jobs section where done using normal procedural programming. As for the gallery, there&#8217;s already a user gallery mod (by the way, we&#8217;re using <a href="http://phpbb.com" title="PhpBB">PhpBB</a> or the forums) for the forum, so we I don&#8217;t think we need to install <a href="http://coppermine-gallery.net" title="Coppermine Gallery">Coppermine</a> Gallery. The Review/Ratings and encyclopedia things are yet to be decided, since the folks are still busy with the new site design/layout. I really hate the frequent switch between programming environments ( procedural, <span class="caps">OOP,</span> CakePHP framework and PhpBB), and I tend to accidentally mix things up. It&#8217;s tiresome and maintenance nightmare. This urge me to look for options on how I can choose an approach and apply it consistently through out the project. I rounded them down to three: PhpBB super mod, CakePHP and by using a <acronym title="Content Management System">CMS</acronym> like <a href="http://xoops.org" title="XOOPS"><span class="caps">XOOPS</span></a> or <a href="http://joomla.org" title="Joomla">Joomla</a> .</p>

<p><span id="more-14"></span><br />
<em>PhpBB super mod</em> involves hacking and tweaking phpBB, inserting codes here and there, modifying some default behavior to suite the site&#8217;s need.<br />
<strong>Pros</strong>:<br />
* Guaranteed to work with the server&#8217;s current version of <span class="caps">PHP</span><br />
* No additional software required.<br />
* User and forum info already available using the native functions provided by phpBB (in case we need to integrate these info with our applications).</p>

<p><strong>Cons</strong>:<br />
* Upgrading the forums would be complicated, since you have to manually edit the changed files, one by one<br />
* Time consuming to code and adjust with the nature of phpBB.</p>

<p>Using <em>CakePhP</em> , I could divide the site into smaller applications. There would a separate CakePHP application for classified ads, product reviews etc. Minimal tweaks with phpBB.<br />
<strong>Pros</strong>:<br />
* The forum, being a separate application, can be easily upgraded.<br />
* Easier to debug, since each application would be independent from each other (except for the templates).<br />
* CakePHP being a <acronym title="Rapid Application Development">RAD</acronym> Framework, it would be faster to code and develop.</p>

<p><strong>Cons</strong>:<br />
* Needs CakePHP framework installed on the server (easy to do) but cannot supported by the live site. CakePHP needs <span class="caps">PHP </span>version 4.3.x while the live site runs on <span class="caps">PHP</span> 4.2.x. I advise upgrading to a recent version on <span class="caps">PHP4 </span>(or better yet <span class="caps">PHP5</span>).<br />
* I need to somehow adapt a session handling mechanism using CakePHP which is similar to phpBB, to be able access logged user&#8217;s info. I might also need to model phpBB&#8217;s user and forum data.</p>

<p>Since the site is developing from a simple forum site into more of a user community site, a content (or &#8220;community&#8221;, a much better term ) management system can do the job more effectively.<br />
<strong>Pros</strong>:<br />
* Better, more organized user and content management. User info is always kept throughout the site (and other applications running under it). Site administration is a breeze using its administration panel.<br />
* Some of the functionalities that the site currently needs is supported through the use of extensions. There are already usable extensions for classified ads, banner management, image gallery, richer user profiles, product ratings/review, newsletters and even its own forum.</p>

<p><strong>Cons</strong>:<br />
* A decent port is needed to tranfer data from phpBB to Joomla. I haven&#8217;t found any extensions that might accomplish this well.<br />
* You need to code (using Joomla&#8217;s <span class="caps">API</span>) your own plugin if you don&#8217;t find the extensions that suit the functionality you are looking for. It will take some time to learn coding your own extensions.<br />
* You need some tweaking to make the extensions do what you exactly want it to do and make it appear how you like it to appear.</p>

<p>Among these three, I favor using CakePHP. Since it deals the least with modifying phpBB data (which is currently the most important asset of the site), it&#8217;s the safest way to go. And probably the fastest <img src='http://rediscoverer.net/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> .</p>]]></content:encoded>
			<wfw:commentRss>http://rediscoverer.net/archives/14/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
