<?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>Mark Wiesemann</title>
	<atom:link href="http://www.markwiesemann.eu/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.markwiesemann.eu</link>
	<description></description>
	<lastBuildDate>Mon, 19 Jan 2009 20:26:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Using the tableless renderer together with HTML_QuickForm_Controller</title>
		<link>http://www.markwiesemann.eu/2007/12/23/using-the-tableless-renderer-together-with-html_quickform_controller/</link>
		<comments>http://www.markwiesemann.eu/2007/12/23/using-the-tableless-renderer-together-with-html_quickform_controller/#comments</comments>
		<pubDate>Sun, 23 Dec 2007 16:32:39 +0000</pubDate>
		<dc:creator>Mark Wiesemann</dc:creator>
				<category><![CDATA[Tableless renderer]]></category>

		<guid isPermaLink="false">http://www.markwiesemann.eu/2007/12/23/using-the-tableless-renderer-together-with-html_quickform_controller/</guid>
		<description><![CDATA[My post &#8220;Combining DHTMLRules, tableless layout and multiple page forms with HTML_QuickForm&#8221; led to several inqueries about why the layout with the shown code snippets still uses tables. The answer is: One needs to tell HTML_QuickForm_Controller (QFC) about the usage of another renderer. To achieve this, three basic steps are needed: Step 1: Include the [...]]]></description>
			<content:encoded><![CDATA[<p>My post &#8220;<a href="http://www.markwiesemann.eu/2007/03/29/combining-dhtmlrules-tableless-layout-and-multiple-page-forms-with-html_quickform/#comment-4942">Combining DHTMLRules, tableless layout and multiple page forms with HTML_QuickForm</a>&#8221; led to several inqueries about why the layout with the shown code snippets still uses tables. The answer is: One needs to tell HTML_QuickForm_Controller (QFC) about the usage of another renderer.<br />
<span id="more-28"></span><br />
To achieve this, three basic steps are needed:</p>
<p>Step 1: Include the code of the tableless renderer.</p>
<pre class="brush: php;">
require_once 'HTML/QuickForm/Renderer/Tableless.php';
</pre>
<p>Step 2: Create a new class that extends from the HTML_QuickForm_Action_Display class, and overload the _renderForm() method. This method basically does the same as the code examples for the single page forms do. The only difference is the usage of $page instead of $form (a page in QFC extends the HTML_QuickForm class).</p>
<pre class="brush: php;">
class Tableless_Display extends HTML_QuickForm_Action_Display
{
    function _renderForm(&amp;$page)
    {
        $renderer =&amp; new HTML_QuickForm_Renderer_Tableless();
        $page-&gt;accept($renderer);
        echo $renderer-&gt;toHtml();
    }
}
</pre>
<p>Step 3: Tell QFC to use the new class instead of the default HTML_QuickForm_Action_Display class for displaying the form. ($wizard is a HTML_QuickForm_Controller instance in this example.)</p>
<pre class="brush: php;">
$wizard-&gt;addAction('display', new Tableless_Display());
</pre>
<p>After these three steps, you should have a tableless layout together with DHTML rules.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.markwiesemann.eu/2007/12/23/using-the-tableless-renderer-together-with-html_quickform_controller/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fix for problems with Log 404 plugin (version 1.2.1) for WordPress</title>
		<link>http://www.markwiesemann.eu/2007/03/31/fix-for-problems-with-log-404-plugin-for-wordpress-121/</link>
		<comments>http://www.markwiesemann.eu/2007/03/31/fix-for-problems-with-log-404-plugin-for-wordpress-121/#comments</comments>
		<pubDate>Sat, 31 Mar 2007 14:10:53 +0000</pubDate>
		<dc:creator>Mark Wiesemann</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.markwiesemann.eu/2007/03/31/fix-for-problems-with-log-404-plugin-for-wordpress-121/</guid>
		<description><![CDATA[Matt Read has written a nice plugin, named Log 404, that logs the last one hundred 404 errors. Unfortunately, release 1.2.1 from April 22th, 2006, has two problems: a small typo (&#8220;exsist&#8221; instead of &#8220;exist&#8221;) the log isn&#8217;t displayed in WP&#8217;s admin area (at least not with Firefox 2.0) Here are my solutions to these [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://mattread.com/">Matt Read</a> has written a nice plugin, named <a href="http://mattread.com/projects/wp-plugins/log-404/">Log 404</a>, that logs the last one hundred 404 errors. Unfortunately, release 1.2.1 from April 22th, 2006, has two problems:</p>
<ol>
<li>a small typo (&#8220;exsist&#8221; instead of &#8220;exist&#8221;)</li>
<li>the log isn&#8217;t displayed in WP&#8217;s admin area (at least not with Firefox 2.0)</li>
</ol>
<p><span id="more-27"></span>Here are my solutions to these problems:</p>
<ol>
<li>Replace the word &#8220;exsist&#8221; with the word &#8220;exist&#8221; in line 49.</li>
<li>Replace &#8220;overflow:auto;&#8221; with &#8220;padding-top: 30px;&#8221; at the end of line 81.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.markwiesemann.eu/2007/03/31/fix-for-problems-with-log-404-plugin-for-wordpress-121/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Combining DHTMLRules, tableless layout and multiple page forms with HTML_QuickForm</title>
		<link>http://www.markwiesemann.eu/2007/03/29/combining-dhtmlrules-tableless-layout-and-multiple-page-forms-with-html_quickform/</link>
		<comments>http://www.markwiesemann.eu/2007/03/29/combining-dhtmlrules-tableless-layout-and-multiple-page-forms-with-html_quickform/#comments</comments>
		<pubDate>Thu, 29 Mar 2007 16:51:45 +0000</pubDate>
		<dc:creator>Mark Wiesemann</dc:creator>
				<category><![CDATA[PEAR]]></category>
		<category><![CDATA[Tableless renderer]]></category>

		<guid isPermaLink="false">http://www.markwiesemann.eu/2007/03/29/combining-dhtmlrules-tableless-layout-and-multiple-page-forms-with-html_quickform/</guid>
		<description><![CDATA[With the new 0.3.0 release of HTML_QuickForm_DHTMLRulesTableless it is now possible to build forms with HTML_QuickForm that have the following features: tableless layout (no &#60;table&#62; tags, very good accessibility) DHTMLRules (form elements errors are shown on top of each element) more than one page To achieve such forms, four PEAR package are needed: HTML_QuickForm HTML_QuickForm_Controller [...]]]></description>
			<content:encoded><![CDATA[<p>With the new <a href="http://pear.php.net/package/HTML_QuickForm_DHTMLRulesTableless/download/0.3.0">0.3.0 release</a> of <a href="http://pear.php.net/package/HTML_QuickForm_DHTMLRulesTableless">HTML_QuickForm_DHTMLRulesTableless</a> it is now possible to build forms with HTML_QuickForm that have the following features:</p>
<ul>
<li>tableless layout (no &lt;table&gt; tags, very good accessibility)</li>
<li>DHTMLRules (form elements errors are shown on top of each element)</li>
<li>more than one page</li>
</ul>
<p><span id="more-26"></span><br />
To achieve such forms, four PEAR package are needed:</p>
<ul>
<li><a href="http://pear.php.net/package/HTML_QuickForm">HTML_QuickForm</a></li>
<li><a href="http://pear.php.net/package/HTML_QuickForm_Controller">HTML_QuickForm_Controller</a></li>
<li><a href="http://pear.php.net/package/HTML_QuickForm_Renderer_Tableless">HTML_QuickForm_Renderer_Tableless</a></li>
<li><a href="http://pear.php.net/package/HTML_QuickForm_DHTMLRulesTableless">HTML_QuickForm_DHTMLRulesTableless</a></li>
</ul>
<p>Information about building forms with HTML_QuickForm, about building multiple page forms with HTML_QuickForm_Controller, about using the tableless renderer, and about using the DHTMLRulesTableless class on forms built with HTML_QuickForms can be found in the <a href="http://pear.php.net/manual/">PEAR manual</a>. The only thing that I&#8217;ll explain here is the usage of DHTMLRulesTableless class with HTML_QuickForm_Controller.</p>
<p>In general, a form page is added like in the following code snippet:</p>
<pre class="brush: php;">
class Page1 extends HTML_QuickForm_Page
{
    // ...
}
$form =&amp; new HTML_QuickForm_Controller();
$page1 =&amp; new Page1('page1');
$form-&gt;addPage($page1);
</pre>
<p>To use now the DHTMLRulesTableless class, you need to add and to change one line:</p>
<pre class="brush: php;">
require_once 'HTML/QuickForm/PageDHTMLRulesTableless.php';
class Page1 extends HTML_QuickForm_PageDHTMLRulesTableless
{
    // ...
}
$form =&amp; new HTML_QuickForm_Controller();
$page1 =&amp; new Page1('page1');
$form-&gt;addPage($page1);
</pre>
<p>That means that you only need to do two things:</p>
<ul>
<li>you need to include HTML/QuickForm/PageDHTMLRulesTableless.php</li>
<li>instead of extending from HTML_QuickForm_Page, your page classes need to extend from HTML_QuickForm_PageDHTMLRulesTableless</li>
</ul>
<p>The new HTML_QuickForm_PageDHTMLRulesTableless class is mostly a simple copy of the HTML_QuickForm_DHTMLRulesTableless class, but it extends HTML_QuickForm_Page and not HTML_QuickForm. This code duplication couldn&#8217;t be avoided because of a bad design of the Page class of HTML_QuickForm_Controller. After HTML_QuickForm2 is ready, a new Controller package is planned, and <a href="http://pear.php.net/user/avb">Alexey Borzov</a> already announced that his new package will have a better design to avoid the need of such code duplications.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.markwiesemann.eu/2007/03/29/combining-dhtmlrules-tableless-layout-and-multiple-page-forms-with-html_quickform/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Generator for DB_Table</title>
		<link>http://www.markwiesemann.eu/2007/03/27/generator-for-db_table/</link>
		<comments>http://www.markwiesemann.eu/2007/03/27/generator-for-db_table/#comments</comments>
		<pubDate>Tue, 27 Mar 2007 20:03:49 +0000</pubDate>
		<dc:creator>Mark Wiesemann</dc:creator>
				<category><![CDATA[DB_Table]]></category>
		<category><![CDATA[PEAR]]></category>

		<guid isPermaLink="false">http://www.markwiesemann.eu/2007/03/27/generator-for-db_table/</guid>
		<description><![CDATA[As announced on February 18th, a generator for DB_Table is available now. David C. Morse has put some work into this new generator script which was based on the script that PEAR::DB_DataObject offers. Some more details about the generator, cited from the changelog: This class generates code required as an interface to an existing database [...]]]></description>
			<content:encoded><![CDATA[<p>As announced on <a href="http://www.markwiesemann.eu/2007/02/18/db_table-150rc1-is-available/">February 18th</a>, a generator for <a href="http://pear.php.net/package/DB_Table/">DB_Table</a> is available now. <a href="http://www.cems.umn.edu/directory/facdetail.php?facid=morse012">David C. Morse</a> has put some work into this new generator script which was based on the script that <a href="http://pear.php.net/package/DB_DataObject">PEAR::DB_DataObject</a> offers.<br />
<span id="more-25"></span><br />
Some more details about the generator, cited from the changelog:</p>
<blockquote><p>This class generates code required as an interface to an existing database by reverse engineering the database. It generates a DB_Table subclass definition for each table, and a script that instantiates one instance of each DB_Table subclass, and a parent DB_Table_Database object. See the documentation block for the new class for usage instructions, and the tests/generator/tests.php script for an example.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.markwiesemann.eu/2007/03/27/generator-for-db_table/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>DB_Table 1.5.0RC1 is available</title>
		<link>http://www.markwiesemann.eu/2007/02/18/db_table-150rc1-is-available/</link>
		<comments>http://www.markwiesemann.eu/2007/02/18/db_table-150rc1-is-available/#comments</comments>
		<pubDate>Sun, 18 Feb 2007 22:25:26 +0000</pubDate>
		<dc:creator>Mark Wiesemann</dc:creator>
				<category><![CDATA[DB_Table]]></category>
		<category><![CDATA[PEAR]]></category>

		<guid isPermaLink="false">http://www.markwiesemann.eu/2007/02/18/db_table-150rc1-is-available/</guid>
		<description><![CDATA[Since last week, a new major release of DB_Table is available. Almost all the great work for the new release was done by David C. Morse who is now the co-lead of DB_Table. Welcome, David! So what&#8217;s new in release 1.5.0? The changelog says: New DB_Table_Database class added to package. The new class provides a [...]]]></description>
			<content:encoded><![CDATA[<p>Since last week, a new major release of <a href="http://pear.php.net/package/DB_Table/">DB_Table</a> is available. Almost all the great work for the new release was done by <a href="http://www.cems.umn.edu/directory/facdetail.php?facid=morse012">David C. Morse</a> who is now the co-lead of DB_Table. Welcome, David!</p>
<p>So what&#8217;s new in release 1.5.0? The changelog says:<br />
<span id="more-24"></span></p>
<blockquote>
<ul>
<li>New DB_Table_Database class added to package. The new class provides a model of foreign key relationships between tables in a database, and features that depend on knowledge of these relationships. User documentation for this class is provided in docs/database/manual.html.</li>
<li>Added auto-increment feature to DB_Table insert() method. The value of a new $auto_inc_col property is the name of an auto-increment column (if any) or null.</li>
<li>Added toXML() method to DB_Table, which emits the table schema in the MDB2 XML DTD, with an extension to describe foreign key references. This method is called by the toXML() method of DB_Table_Database, which emits an XML schema string for an entire database.</li>
</ul>
</blockquote>
<p>All existing users of DB_Table (and also interested people, of course) are encouraged to install the new release by <code>pear install DB_Table-beta</code> and to report via the <a href="http://pear.php.net/package/DB_Table/bugs">bug tracker</a> any occuring problem. But as we have a lot of unit tests for the new features, we hope that only very minor problems will occur.</p>
<p>Finally, a short comment on the near future of DB_Table: We are planning to work on two things in the next weeks and months. The first and most important thing is to convert the documentation from <a href="http://wiki.ciaweb.net/yawiki/index.php?area=DB_Table">Paul M. Jones&#8217; wiki</a> into the PEAR manual and to update all pages to reflect the functionality of the current release. This will need a lot of work and help is always welcome. (<a href="/imprint/">Contact me</a> for more details if you&#8217;re interested.) The second task is two write a script that generates a DB_Table class file from an existing table. This will make things a lot easier for both new and existing users of DB_Table. David already started to work on such a generator.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.markwiesemann.eu/2007/02/18/db_table-150rc1-is-available/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>2x Zend Certified Engineer</title>
		<link>http://www.markwiesemann.eu/2007/01/11/2x-zend-certified-engineer/</link>
		<comments>http://www.markwiesemann.eu/2007/01/11/2x-zend-certified-engineer/#comments</comments>
		<pubDate>Thu, 11 Jan 2007 16:15:46 +0000</pubDate>
		<dc:creator>Mark Wiesemann</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.markwiesemann.eu/2007/01/11/2x-zend-certified-engineer/</guid>
		<description><![CDATA[Yesterday I have (successfully) taken the &#8220;Zend PHP 5 Certification&#8221; examination. Before I go into details about the exam and my preparation for it, I&#8217;d like to sum up the examination for PHP 4. On August 31th, 2006, I have passed the PHP 4 examination. While the exam itself was rather easy, I was pretty [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I have (successfully) taken the &#8220;Zend PHP 5 Certification&#8221; examination. Before I go into details about the exam and my preparation for it, I&#8217;d like to sum up the examination for PHP 4.</p>
<p><a rel="lightbox" class="imagelink" href="http://www.markwiesemann.eu/wp-content/uploads/2007/01/zce-php-4-012.jpg" title="Zend Certified Engineer (PHP 4)"><img id="image20" src="http://www.markwiesemann.eu/wp-content/uploads/2007/01/zce-php-4-012-150x150.jpg" alt="Zend Certified Engineer (PHP 4)" align="left" hspace="5" vspace="2" /></a>On August 31th, 2006, I have passed the PHP 4 examination. While the exam itself was rather easy, I was pretty annoyed after the exam. I had chosen to do the exam in German language on the VUE registration form. This wasn&#8217;t a good idea of mine: The translation was very bad. On one of the questions I couldn&#8217;t even guess what the original English question might have been. And there was also a real error in the exam: I don&#8217;t remember the exact question, but I was a question about the understanding of regular expressions. Unfortunately, all possible answers were wrong (they all matched only one character, but the string from the question). My solution was then do chose the answer that seemed to be meant as the right answer (because the other answers had additional &#8220;errors&#8221;).</p>
<p><span id="more-23"></span></p>
<p>After writing to Zend Germany about these issues, they wrote me that they will take my comments into account for the new PHP 5 certification. Although the PHP 4 certification ends on the 31th of March 2007, I&#8217;d like to warn all German speaking people to not choose to take the PHP 4 exam in German&#8211;you would regret it maybe. <img src='http://www.markwiesemann.eu/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>About four months later, on the 5th of January 2007, I&#8217;ve got my framed certificate from Zend (it was sent out on December 28th from Cupertino, California). The envelope also contained a short letter with an &#8220;advertisement&#8221; for free business cards (BTW: the login information provided in the letter was invalid), and a sticker with the ZCE logo.</p>
<p><img id="image22" src="http://www.markwiesemann.eu/wp-content/uploads/2007/01/php5_zce_logo.gif" alt="Zend Certified Engineer (PHP 5)" align="left" hspace="5" vspace="2" />Now back to the PHP 5 exam. I&#8217;ve used <a href="http://zceguide.com/">php|architect&#8217;s Zend PHP 5 Certification Study Guide</a> written by <a href="http://www.pixelated-dreams.com/">Davey Shafik</a> together with <a href="http://benramsey.com/">Ben Ramsey</a>, and also the <a href="https://www.phparch.com/shop_product.php?itemid=132">mock testing offer</a> on phparch.com.</p>
<p>My preparation was rather short: I&#8217;ve read the book once (starting on Saturday), did the mock test (on Sunday evening), signed up for the exam (on Monday; BTW: only the English language exam is currently available, so no surprises with translations are possible currently), and passed the exam two days later (on Wednesday). The mock test had two surprises: It contained only 65 instead of the announced 70 questions, while the test time was still 90 minutes. I&#8217;m not sure, but I remember a similar &#8220;surprise&#8221; from the real PHP 4 exam. The second surprise were a lot of small errors (mostly typos). But the questions and answer options were still readable. Nethertheless, one question was really wrong. I don&#8217;t remember neither the exact question nor the topic, but I was able to pass the mock test with many &#8220;Excellent&#8221; results and one &#8220;Good&#8221; result for one of the sub-topics.</p>
<p>Another &#8220;surprise&#8221; was the Study Guide. It contains a lot of errors, mostly typos and duplicated words like &#8220;each each&#8221;, but at least also two really wrong things. The frequency of errors seems to get higher in the second half of the chapters. I wouldn&#8217;t have expected that much errors, especially because the covers claims that the book was &#8220;reviewed by core PHP developer <a href="http://www.derickrethans.nl/">Derick Rethans</a>&#8220;. This is not meant as an attack against Derick, but both he and the authors of the book should have recognized a least some of the errors. Many of them are really obvious. Nethertheless, the structure and the contents helped me to get an idea of the topics of the real exam.</p>
<p>The real exam itself was more challenging than the PHP 4 exam. It contained some more topics, and also some more &#8220;tricky&#8221; questions (i.e. questions that can&#8217;t be answered without thinking more than 30 or more seconds). Zend seems to have taken <a href="http://schlitt.info/applications/blog/index.php?/archives/402-1-of-1000.html">Tobias Schlitt&#8217;s complaints</a> about the PHP 4 exams into account (he is also now a member of the <a href="http://www.zend.com/education/zend_php_certification/php_5_certification/education_advisory_board">Education Advisory Board</a>). Apart from two or three minor typos (like &#8220;folowing&#8221;), there was again a real error (surprise!). I won&#8217;t go into details about the question itself, but to choose the two right answers out of four answer options, I had to select one wrong and one right answer. <img src='http://www.markwiesemann.eu/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  The problem was &#8220;function_construct&#8221; in the answer. I guess that Zend didn&#8217;t want to do the two typos here, as the other two possible options did not really make sense.</p>
<p>Almost finally for this entry, an interesting comparison on the pricing. Zend Germany currently wants to have EUR 148,75 for the exam (including 19% German VAT). With manipulating the URL or by changing the preferred language in my browser to English, I saw the price in US dollar: USD 148,75 (again including the 19% VAT). This results in EUR 115,76 (including another 1% for non-EUR transaction from my credit card company). The same thing applies to the mock testing fee: It&#8217;s available for both EUR 11,90 and USD 11,90 (both incl. VAT). The USD price corresponds to EUR 9,25 (incl. 1% non-EUR charge). It should be obvious whether I have paid in EUR or USD &#8230;</p>
<p>To sum this post up: Zend has taken the criticism about the old exam into account and provides a not too easy and not too difficult exam to test people about their PHP 5 knowledge. Both ways of preparation, the Study Guide and the mock testing offer, are nice possibilities for preparation. Good luck for everybody who wants to take the exam in the future!</p>
<p><strong>Update July 3th 2007:</strong> Today, about six months after the exam, I got a letter from Zend. This time the certificate wasn&#8217;t framed. A short letter and a sticker were also included in the envelope. The business card offer seem to have been skipped (it isn&#8217;t advertised in the new letter, and the old credentials still don&#8217;t work).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.markwiesemann.eu/2007/01/11/2x-zend-certified-engineer/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>Howto: Adding explanations next to form fields with Tableless QuickForm renderer</title>
		<link>http://www.markwiesemann.eu/2006/12/27/howto-adding-explainations-next-to-form-fields-with-tableless-quickform-renderer/</link>
		<comments>http://www.markwiesemann.eu/2006/12/27/howto-adding-explainations-next-to-form-fields-with-tableless-quickform-renderer/#comments</comments>
		<pubDate>Wed, 27 Dec 2006 13:31:27 +0000</pubDate>
		<dc:creator>Mark Wiesemann</dc:creator>
				<category><![CDATA[PEAR]]></category>
		<category><![CDATA[Tableless renderer]]></category>

		<guid isPermaLink="false">http://www.markwiesemann.eu/2006/12/27/howto-adding-explainations-next-to-form-fields-with-tableless-quickform-renderer/</guid>
		<description><![CDATA[Today, a user of HTML_QuickForm_Renderer_Tableless asked how he can add explanations next to form fields. An example of such an explaination or additional information is shown in the following screenshot: To be able to add another text to an element, we will use a rather unknown feature of HTML_QuickForm. QuickForm supports multiple labels for elements. [...]]]></description>
			<content:encoded><![CDATA[<p>Today, a user of <a href="http://pear.php.net/package/HTML_QuickForm_Renderer_Tableless">HTML_QuickForm_Renderer_Tableless</a> asked how he can add explanations next to form fields. An example of such an explaination or additional information is shown in the following screenshot:<br />
<img id="image18" src="http://www.markwiesemann.eu/wp-content/uploads/2006/12/twolabel.png" alt="Usage of two labels with HTML_QuickForm_Renderer_Tableless" /></p>
<p><span id="more-20"></span></p>
<p>To be able to add another text to an element, we will use a rather unknown feature of <a href="http://pear.php.net/package/HTML_QuickForm">HTML_QuickForm</a>. QuickForm supports multiple labels for elements. Instead of using a string of the <code>$label</code> parameter, one can specify an array of strings with labels. For example, instead of</p>
<pre class="brush: php;">
$form-&gt;addElement('text', 'email', 'Your email:');
</pre>
<p>we can also write</p>
<pre class="brush: php;">
$form-&gt;addElement('text', 'email',
    array('Your email:',
          'Please check your email address twice.'));
</pre>
<p>The second step is to modify the template for form elements. The default element template is defined as follows:</p>
<pre class="brush: php;">
$elementTemplate =
&quot;\n\t\t\t&lt;li&gt;&lt;label class=\&quot;element\&quot;&gt;&lt;!-- BEGIN required
--&gt;&lt;span class=\&quot;required\&quot;&gt;*&lt;/span&gt;&lt;!-- END required --&gt;
{label}&lt;/label&gt;&lt;div class=\&quot;element&lt;!-- BEGIN error --&gt;
error&lt;!-- END error --&gt;\&quot;&gt;&lt;!-- BEGIN error --&gt;&lt;span
class=\&quot;error\&quot;&gt;{error}&lt;/span&gt;&lt;br /&gt;&lt;!-- END error --&gt;
{element}&lt;/div&gt;&lt;/li&gt;&quot;;
</pre>
<p>By adding</p>
<pre class="brush: php;">
&lt;!-- BEGIN label_2 --&gt;&lt;br /&gt;&lt;span style=\&quot;font-size: 80%;\&quot;&gt;
{label_2}&lt;/span&gt;&lt;!-- END label_2 --&gt;
</pre>
<p>after <code>{element}</code> we will now make the second label visible. Our new element template is now defined as follows:</p>
<pre class="brush: php;">
$elementTemplateTwoLabel =
&quot;\n\t\t\t&lt;li&gt;&lt;label class=\&quot;element\&quot;&gt;&lt;!-- BEGIN required
--&gt;&lt;span class=\&quot;required\&quot;&gt;*&lt;/span&gt;&lt;!-- END required --&gt;
{label}&lt;/label&gt;&lt;div class=\&quot;element&lt;!-- BEGIN error --&gt;
error&lt;!-- END error --&gt;\&quot;&gt;&lt;!-- BEGIN error --&gt;&lt;span
class=\&quot;error\&quot;&gt;{error}&lt;/span&gt;&lt;br /&gt;&lt;!-- END error --&gt;
{element}&lt;!-- BEGIN label_2 --&gt;&lt;br /&gt;&lt;span style=
\&quot;font-size: 80%;\&quot;&gt;{label_2}&lt;/span&gt;&lt;!-- END label_2 --&gt;
&lt;/div&gt;&lt;/li&gt;&quot;;
</pre>
<p>The third and last step is to change the element template in the renderer:</p>
<pre class="brush: php;">
$renderer-&gt;setElementTemplate($elementTemplateTwoLabel);
</pre>
<p>If you need the second label only for a single element, you can also specify the element name as the second parameter:</p>
<pre class="brush: php;">
$renderer-&gt;setElementTemplate($elementTemplateTwoLabel,
                              'elementName');
</pre>
<p>After reloading your modified script, you should get a similar output to the screensheet shown above.</p>
<p>Note: All linebreaks in the code snippets shown above are not required (in the templates they are even discouraged), they are just used to make the code readable.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.markwiesemann.eu/2006/12/27/howto-adding-explainations-next-to-form-fields-with-tableless-quickform-renderer/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Structures_DataGrid 0.8.0 released</title>
		<link>http://www.markwiesemann.eu/2006/12/16/structures_datagrid-080-released/</link>
		<comments>http://www.markwiesemann.eu/2006/12/16/structures_datagrid-080-released/#comments</comments>
		<pubDate>Sat, 16 Dec 2006 17:31:01 +0000</pubDate>
		<dc:creator>Mark Wiesemann</dc:creator>
				<category><![CDATA[PEAR]]></category>
		<category><![CDATA[Structures_DataGrid]]></category>

		<guid isPermaLink="false">http://www.markwiesemann.eu/2006/12/16/structures_datagrid-080-released/</guid>
		<description><![CDATA[Today Olivier and I have &#8220;flooded&#8221; PEAR with new releases of Structures_DataGrid and its 19 subpackages. The reason for releasing all packages was a license change from PHP License 2.0 to New BSD license which is more flexible and compatible to other open source licenses. The new major feature of the new release is streaming [...]]]></description>
			<content:encoded><![CDATA[<p>Today <a href="http://www.samalyse.com/">Olivier</a> and I have &#8220;flooded&#8221; PEAR with new releases of <a href="http://pear.php.net/package/Structures_DataGrid">Structures_DataGrid</a> and its 19 subpackages. The reason for releasing all packages was a license change from PHP License 2.0 to New BSD license which is more flexible and compatible to other open source licenses.</p>
<p>The new major feature of the new release is streaming support. Until this release, it was impossible to use Structures_DataGrid for converting a huge database table into, for example, a CSV file. We offer now the possibility to fetch the data in chunks of, by default, 500 records from the database and to write these records into the CSV file, followed by the next chunk of 500 records, and so on.</p>
<p><span id="more-10"></span></p>
<p>Streaming can be enabled by calling <code>$datagrid->enableStreaming();</code> and it is supported by all database DataSource drivers and the CSV and XML renderers. Support for the XML DataSource driver and maybe also other renderers is planned.</p>
<p>Another new feature is the format() method of the column object that offers some auto-formatters for columns in order to avoid that each and every user of Structures_DataGrid needs to implement basic formatter functions themselves. Please note that this new format() method is experimental and might be changed in the future.</p>
<p>Here are some examples of the usage:</p>
<pre class="brush: php;">
// Format UNIX timestamps as english dates:
$column-&gt;format('dateFromTimestamp', 'm/d/y');

// Format numbers with 3 decimals and no thousands
// separator:
$column-&gt;format('number', 3, '.', '');

// Format an HTML link using a printf expression with
// url-encoding:
$column-&gt;format('printfURL',
  '&lt;a href=&quot;edit.php?key=%s&quot;&gt;Edit&lt;/a&gt;');
</pre>
<p>For the future of Structures_DataGrid we are planning two new DataSource drivers (for PDO and <a href="http://www.phpdoctrine.com">Doctrine</a>, after its code was PEARified and accepted), two new Renderers (HTMLEditForm and HTMLFilterForm), and also some new features for the core package.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.markwiesemann.eu/2006/12/16/structures_datagrid-080-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Tableless renderer releases</title>
		<link>http://www.markwiesemann.eu/2006/12/04/new-tableless-renderer-releases/</link>
		<comments>http://www.markwiesemann.eu/2006/12/04/new-tableless-renderer-releases/#comments</comments>
		<pubDate>Mon, 04 Dec 2006 22:08:51 +0000</pubDate>
		<dc:creator>Mark Wiesemann</dc:creator>
				<category><![CDATA[PEAR]]></category>
		<category><![CDATA[Tableless renderer]]></category>

		<guid isPermaLink="false">http://www.markwiesemann.eu/2006/12/12/new-tableless-renderer-releases/</guid>
		<description><![CDATA[New releases of both HTML_QuickForm_Renderer_Tableless (0.4.3) and HTML_QuickForm_DHTMLRulesTableless (0.2.3) are available. The renderer had only a little stylesheet change to achieve layout compatibility with Windows Internet Explorer 7. The DHTMLRules got support for multiple error messages (needed for groups), and there were some bug fixes. In the tableless renderer I have removed the &#8220;height: 1px;&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>New releases of both <a href="http://pear.php.net/package/HTML_QuickForm_Renderer_Tableless">HTML_QuickForm_Renderer_Tableless</a> (0.4.3) and <a href="http://pear.php.net/package/HTML_QuickForm_DHTMLRulesTableless">HTML_QuickForm_DHTMLRulesTableless</a> (0.2.3) are available. The renderer had only a little stylesheet change to achieve layout compatibility with Windows Internet Explorer 7. The DHTMLRules got support for multiple error messages (needed for groups), and there were some bug fixes.</p>
<p><span id="more-16"></span></p>
<p>In the tableless renderer I have removed the &#8220;height: 1px;&#8221; style from the &#8220;form fieldset li&#8221; block in the stylesheet to achieve layout compatibility with Windows Internet Explorer 7. This breaks layout compatibility with Firefox 1.x browsers, while Firefox 2.0 still works as expected. The <a href="http://pear.php.net/manual/en/package.html.html-quickform-renderer-tableless.faq.php">FAQ</a> in the PEAR manual contains solutions for getting Firefox 1.x compatibility back.</p>
<p>Besides two small changes, namely the adoption of the stylesheet changes from the renderer and changed escaping of the &lt;script&gt; tag for better compatibility with older browsers, the DHTMLRulesTableless got some bigger changes on the error style assignment and error message displaying.</p>
<p>In some cases the error style (i.e. the red border in the default stylesheet) and the error message were still shown even if the element was made valid; this was due to a bad concept for the lines of code that should decide whether the error style and message can be removed or not.</p>
<p>The last releases showed for every row of the form only the last error message. But, for groups of elements, there can be more than one error message at a time; now, all of these messages will be shown.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.markwiesemann.eu/2006/12/04/new-tableless-renderer-releases/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DB_Table 1.4.0 released</title>
		<link>http://www.markwiesemann.eu/2006/11/09/db_table-140-released/</link>
		<comments>http://www.markwiesemann.eu/2006/11/09/db_table-140-released/#comments</comments>
		<pubDate>Thu, 09 Nov 2006 22:10:59 +0000</pubDate>
		<dc:creator>Mark Wiesemann</dc:creator>
				<category><![CDATA[DB_Table]]></category>
		<category><![CDATA[PEAR]]></category>

		<guid isPermaLink="false">http://www.markwiesemann.eu/2006/11/09/db_table-140-released/</guid>
		<description><![CDATA[I have released DB_Table 1.4.0 today. Besides small fixes, there is a new feature about static form elements, and the handling of file form elements was optimized. Static form elements like &#8216;header&#8217;, &#8216;static&#8217;, &#8216;submit&#8217; or &#8216;reset&#8217; can now easily be added to forms generated by DB_Table: you just need define an array called $frm in [...]]]></description>
			<content:encoded><![CDATA[<p>I have released <a href="http://pear.php.net/package/DB_Table">DB_Table</a> 1.4.0 today. Besides small fixes, there is a new feature about static form elements, and the handling of file form elements was optimized.</p>
<p><span id="more-11"></span></p>
<p>Static form elements like &#8216;header&#8217;, &#8216;static&#8217;, &#8216;submit&#8217; or &#8216;reset&#8217; can now easily be added to forms generated by DB_Table: you just need define an array called $frm in your extended class (let&#8217;s assume that you have instantiated this class in <code>$obj</code>), create a form object (e.g. via <code>$form =&#038; $obj->getForm(), ...)</code> and then call <code>$obj->addStaticFormElements($form);</code>.</p>
<p>The <code>$frm</code> array has a very similar format like the column definition format. The key is the field name and the value is an array with details about the element. There is a special key called &#8216;before&#8217; in the details array. If it is not given, or is empty (or null) the element will be appended at the end. If it is given, the element is added before the element specified via &#8216;before&#8217;. An example how the <code>$frm</code> array could look like:</p>
<pre class="brush: php;">
var $frm = array(
    'headline' =&gt; array(
        'before'        =&gt; 'name',
        'qf_type'       =&gt; 'header',
        'qf_setvalue'   =&gt; 'Headline'),
    'submit'   =&gt; array(
        'before'        =&gt; null,
        'qf_type'       =&gt; 'submit',
        'qf_setvalue'   =&gt; 'Save data')
);
</pre>
<p>This example assumes that there is an element called &#8216;name&#8217; in the form. The header element will be placed before this &#8216;name&#8217; element, and the submit button will be placed at the end of the form.</p>
<p>For columns with <code>'qf_type' == 'file'</code> there were some optimizations: If the column is marked as required, the &#8216;uploadedfile&#8217; QF rule is now set instead of the &#8216;required&#8217; QF rule. In addition, the &#8216;numeric&#8217; and &#8216;maxlength&#8217; QF rules are not set anymore (of course, the corresponding checks will still be done before inserting/updating data into the database).</p>
<p>Finally, I have added support for &#8216;hierselect&#8217; and &#8216;jscalendar&#8217; QuickForm elements.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.markwiesemann.eu/2006/11/09/db_table-140-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
