<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		
		<title>T3node - TYPO3 blog by Steffen Müller</title>
		<link>http://www.t3node.com/</link>
		<description>Blog about TYPO3, LAMP, HTML, CSS and other web topics</description>
		<language>en</language>
		<image>
			<title>T3node - TYPO3 blog by Steffen Müller</title>
			<url>http://www.t3node.com/fileadmin/template/rssicon.gif</url>
			<link>http://www.t3node.com/</link>
			<width>32</width>
			<height>32</height>
			<description>Blog about TYPO3, LAMP, HTML, CSS and other web topics</description>
		</image>
		<generator>TYPO3 - get.content.right</generator>
		<docs>http://blogs.law.harvard.edu/tech/rss</docs>
		
		
		
		<lastBuildDate>Thu, 04 Feb 2010 10:25:00 +0100</lastBuildDate>
		
		
		<item>
			<title>Security in TypoScript: Applying stdWrap functions like htmlSpecialChars to data in dataWrap</title>
			<link>http://www.t3node.com/blog/security-in-typoscript-applying-stdwrap-functions-like-htmlspecialchars-to-data-in-datawrap/</link>
			<description>A frequently used feature of TypoScript is stdWrap. It provides many functions and wrappers to parse your data. It serves as a multipurpose parsing suite with helpers of any kind. dataWrap is one of the most powerful among them, but it's also one of the most tricky ones. Read on for a little demonstration on how to add security to your TypoScript by applying the stdWrap function &quot;htmlSpecialChars&quot; to data in dataWrap...</description>
			<content:encoded><![CDATA[<h3>Introduction</h3>
<p>Last night I was having a security session on a community website. Some content was controlled by TypoScript and I did some penetration tests on Cross-Site Scripting (XSS).</p>
<p>The website allows anyone to register and enter data to be shown on the website. The threat was that a possible attacker could create an account and enter malicious data.</p>
<p>There were two possibilities to protect the website from being XSSed:</p><ul><li>1. validate and filter the user data before it gets saved,</li><li>2. escape and filter the user data before it gets displayed on the website.</li></ul><h3>Adding XSS protection in TypoScript</h3>
<p>Let's have a look at the second step where TypoScript comes into the match. For testing purpose I put the following malicious data into the DB fields:</p>
<pre>&lt;script&gt;alert('fieldname')&lt;/script&gt;</pre>
<p>Whenever the data is not escaped before being displayed, an alert window pops up reporting the fieldname.</p>
<p>The website makes heavy use of dataWrap to show the data in the frontend. The cool thing with dataWrap is, that it allows to shrink your TypoScript code by putting multiple getText requests into a one liner. Have a look at the first example:</p>
<h4>Example 1</h4>
<pre>page.10 = TEXT<br />page.10 {<br />  dataWrap = Hello {field:title} {field:firstname} {field:lastname}<br />}</pre>
<p>The output of a regular dataset here would be: <i>Hello Dr. Franken Stein</i>. But when testing a malicious dataset with &lt;script&gt;alert('fieldname')&lt;/script&gt; I ran into XSS with popups all around.</p>
<p>So the next step was to remove all bad code from the result set. I decided to use htmlSpecialChars:</p>
<h4>Example 2</h4>
<pre>page.10 = TEXT<br />page.10 {<br />  dataWrap = Hello {field:title} {field:firstname} {field:lastname}<br />  htmlSpecialChars = 1<br />}</pre>
<p>My expectation was that the complete string would be parsed through htmlspecialchars(). If there was malicious data in the name fields, it would get escaped. But testing the stuff revealed the same behaviour as in example 1: The field data was not escaped with htmlspecialchars and I ended up with javascript alerts popping around on my screen. Next, I tried a different approach:</p>
<h4>Example 3</h4>
<pre>page.10 = TEXT<br />page.10.value = Hello<br />page.20 = TEXT<br />page.20 {<br />  field = title<br />  htmlSpecialChars = 1<br />}<br />page.30 {<br />  field = firstname<br />  htmlSpecialChars = 1<br />}<br />page.40 {<br />  field = lastname<br />  htmlSpecialChars = 1<br />}</pre>
<p>This time, testing was successful: All HTML data was escaped and no popups: The result was again <i>Hello Dr. Franken Stein</i> and <i>Hello &lt;script&gt;alert('title')&lt;/script&gt; &lt;script&gt;alert('firstname')&lt;/script&gt; &lt;script&gt;alert('lastname')&lt;/script&gt;</i> as plain text with escaped characters.</p>
<p>The drawback was that the code was bloated. I tried to shrink it by switching back from field to dataWrap. And this time I tried a different approach to apply htmlSpecialChars:</p>
<h4>Example 4</h4>
<pre>page.10 = COA<br />page.10.stdWrap.htmlSpecialChars = 1<br />page.10.10 = TEXT<br />page.10.10.dataWrap = Hello {field:title} {field:firstname} {field:lastname}</pre>
<p>... and Bingo: No popups, all fields were correctly parsed through htmlspecialchar().</p>
<h3>Summary</h3>
<p>Although example 2 appeared logical to me, it did not work. The reason was that the getText sections in dataWrap were not being touched by surrounding stdWrap functions. As example 4 showed, the solution was to use COA as a container for the data. That made it possible to wrap the complete string with htmlSpecialChars.</p>
<p>What's the lesson learned of this case?</p>
<p>Never trust your intuitive expectation of how code works when it comes to security issues. Better test twice than overlook a leak. <b>Test driven development is the way to go.</b></p>]]></content:encoded>
			
			
			<pubDate>Thu, 04 Feb 2010 10:25:00 +0100</pubDate>
			
		</item>
		
		<item>
			<title>Little case study on using static file cache to increase performance of TYPO3</title>
			<link>http://www.t3node.com/blog/little-case-study-on-using-static-file-cache-to-increase-performance-of-typo3/</link>
			<description>The average number of requests on www.t3node.com is growing more and more. Since the website is hosted on a tiny virtual machine shared with others, the overall server performance is bad. Today I decided to serve pages from file cache to reduce the load. This little case study describes the problem by example and gives some key data for illustration.</description>
			<content:encoded><![CDATA[<h3>Introduction</h3>
<p>There are several other websites hosted on the server and TYPO3 is not the only one eating performance. At peak periods, the server load&nbsp;is very high and pages are served with much delay. Not only visitors suffer from slow websites, but there are rumors that&nbsp;google may take performance into ranking account (so called speed rank).</p>
<h3>Solution</h3>
<p>Since this website is driven by TYPO3, I decided to install the <a href="http://typo3.org/extensions/repository/view/nc_staticfilecache/current/" title="static file cache extension in TER on typo3.org" class="external-link" >static file cache extension (nc_static_file_cache)</a>.This extension puts pages from the page cache to files in the filesystem. Whenever a page is requested, it gets served from the file system without involving TYPO3.</p>
<h3>Test results (1)</h3>
<p>To test the performance gain, I used ApacheBench (ab) on the start page:</p>
<pre>spock@enterprise:/tmp$ ab -c 10 -n 1000 http ://www.t3node.com/</pre>
<p>The result was disappointing <b>8 req/s.</b></p>
<p>After some investigation I realized that most of my pages did not profit from this cache. The  info module of the static file cache extension reported, that they could not be statically served because they contain&nbsp;uncached USER_INT objects. Inspections with the admpanel revealed two extensions which use USER_INT:</p><ul><li><a href="http://typo3.org/extensions/repository/view/nc_ttnews_mostpopular/current/" title="News: most popular extension in TER on typo3.org" class="external-link" >'News:&nbsp;most popular' extension (nc_ttnews_mostpopular)</a>, which was used to count and display hits of the blog articles.</li><li><a href="http://typo3.org/extensions/repository/view/tp_twitter/current/" title="Twitter RSS feed extension in TER on typo3.org" class="external-link" >Twitter RSS feed extension (tp_twitter)</a>, which was used to show my latest three tweets.</li></ul><h3>Fixing the issues</h3>
<p>I decided to remove the 'most popular' extension, since I never really liked the approach to save statistic data in the database table of the entity. I am going to look for something similar, maybe using some JavaScript counter or Apache access_log  in combination with <a href="http://typo3.org/extensions/repository/view/coago/current/" title="COA_GO extension in TER on typo3.org" class="external-link" >COA_GO</a>.</p>
<p>The Tweet is still shown, but as a cached USER object which will be updated once a day. I think that's a good compromise, since  my twitter activity is anyway not so high.</p>
<h3>Test results (2)</h3>
<p>To test the performance gain, I used ApacheBench (ab) on the start page:</p>
<pre>spock@enterprise:/tmp$ ab -c 10 -n 1000 http ://www.t3node.com/</pre>
<p>With USER_INT cObjects: <b>8 req/s.</b></p>
<p>Without USER_INT cObjects and without static file cache: <b>40 req/s.</b></p>
<p>Without USER_INT cObjects and with static file cache: <b>500 req/s.</b></p>
<p>That's <b>62.5 times faster</b> than before! Ready to get slashdottet :-)</p>
<h3>Conclusion</h3>
<p>Performance can be crucial. If your website feels slow, search for bottlenecks like USER_INT extensions. If you can manage to get rid of USER_INT cObjects, chances are that you can also profit by a static file cache. That could push your website performance to lightning speed.</p>]]></content:encoded>
			
			
			<pubDate>Mon, 07 Dec 2009 17:51:00 +0100</pubDate>
			
		</item>
		
		<item>
			<title>Prevent SQL injection in TypoScript when using strings from GET parameters</title>
			<link>http://www.t3node.com/blog/prevent-sql-injection-in-typoscript-when-using-strings-from-get-parameters/</link>
			<description>Whenever you are using GET/POST parameters in SQL queries, you have to face the risk of running into SQL injection. The golden rule here is not to trust user parameters, but always properly check and escape values. This article introduces a TYPO3 extension, which helps to sanitize parameters by extending TypoScript stdWrap.</description>
			<content:encoded><![CDATA[<h3>Introduction</h3>
<p>As I have already shown in an <a href="blog/is-sql-injection-possible-in-typoscript-objects/" >article have a year ago</a>, TypoScript is not save against SQL injections. I introduced a case, where a numerical GET parameter (a uid as integer) is used in the WHERE clause of a <a href="http://typo3.org/documentation/document-library/references/doc_core_tsref/4.2.0/view/1/8/#id4251042" title="cObject CONTENT in official TSref" class="external-link" >TypoScript CONTENT cObject</a>. But the parameter could be misused to inject malicious SQL into the WHERE clause. The solution was to parse the GET parameter through the <a href="http://typo3.org/documentation/document-library/references/doc_core_tsref/4.2.0/view/1/5/#id4149585" title="stdWrap documentation in official TSref" class="external-link" >stdWrap function intval</a>. It ensured that only integer values were passed to the WHERE clause.</p>
<p>The posting you are now about to read is meant as  a follow-up to that article. It demonstrates a more advanced case: using a <b>string</b> of a GET parameter inside an SQL query of CONTENT.</p>
<h3>Example code</h3>
<p>Imagine you offer some search function to your website visitors. The search term is send as a GET parameter and TypoScript compares the term with the header of the content elements of a page. All content element of a page which is matching this comparison are shown. The page content is:</p>
<p><img alt="backend view of content elements" style="border-style: solid; border-width: thin; padding: 2px;" src="fileadmin/user_upload/images/injection-ce.png" height="169" width="374" /></p>
<p>We use the TypoScript cObject CONTENT to output all matching content elements of a page. The search term is inserted into the WHERE part of the SQL query:</p>
<pre>page.10 = CONTENT<br />page.10 {<br />&nbsp; table = tt_content<br />&nbsp; select {<br />&nbsp;&nbsp;&nbsp; pidInList = 35<br />&nbsp;&nbsp;&nbsp; andWhere.cObject = TEXT<br />&nbsp;&nbsp;&nbsp; andWhere.cObject {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; data = GPvar:tx_myext|header<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wrap = header=”|”&nbsp;&nbsp;&nbsp; <br />    }<br />&nbsp; }<br />} </pre>
<h3>Result</h3>
<p>If the URL contains the GET parameter tx_myext[header] it uses the given value in the SQL WHERE clause. For example, try this URL to get all content elements which use the term <b>My products</b> as header: </p>
<pre>http ://www.example.com/index.php?id=123&amp;tx_myext[header]=<b>My products</b></pre>
<p>That will result in a SQL clause like this:</p>
<pre>SELECT * FROM tt_content ... WHERE ... <b>AND header=”My products”</b> ...</pre>
<p>Have a look at the output of this TypoScript object. In the frontend, you'll see this:</p>
<p><img alt="Example output without SQL injection" style="border-style: solid; border-width: thin; padding: 2px;" src="fileadmin/user_upload/images/injection-result1.png" height="186" width="551" /></p>
<h3>SQL injection vulnerability</h3>
<p>With the TypoScript above, your website is vulnerable to SQL injections. Imagine a visitor uses the following malicious URL for SQL injection:</p>
<pre>http ://www.example.com/index.php?id=123&amp;tx_myext[header]=<b>abc&quot; OR 1=1 OR 1=&quot;1</b></pre>
<p>This will result in a SQL clause:</p>
<pre>SELECT * FROM tt_content ... WHERE ... <b>AND header=”abc” OR 1=1 OR 1=”1”</b> ...</pre>
<p>In the frontend, you'll see something like this:</p>
<p><img alt="Example output with SQL injection" style="border-style: solid; border-width: thin; padding: 2px;" src="fileadmin/user_upload/images/injection-result2.png" height="510" width="597" /></p>
<p>The website shows all content elements, no matter if they are deleted or hidden!</p>
<h3>Solution: quoting and escaping the string </h3>
<p>To prevent bad guys from injecting SQL with the search term, you need to quote the string and escape possible control characters. Unfortunately, there's no function in stdWrap to do that.</p>
<p>I have recently released the <a href="http://typo3.org/extensions/repository/view/sm_stdwrapquote/current/" title="The sm_stdwrapquote extension in the TYPO3 extension repository on typo3.org" class="external-link-new-window" >&quot;quote functions for stdWrap&quot; extension (sm_stdwrapquote)</a> to TER. This extension adds two functions to TypoScript stdWrap:</p><ul><li>quoteStr to escape special values</li><li>fullQuoteStr to escape special values and add quotes</li></ul><p>It implements the functionality of t3lib_DB-&gt;quoteStr() and t3lib_DB-&gt;fullQuoteStr() to stdWrap. This helps you sanitize and safely use GET/POST strings in TypoScript CONTENT objects without too much hassle.</p>
<h3>Example code with protection against SQL injection</h3>
<p>The extension provides a simple method to protect your TypoScript from SQL injection. You simply add fullQuoteStr to the andWhere part of your CONTENT object. It can be used like a regular function of stdWrap. When using fullQuoteStr, you also don't need quotes in the wrap:</p>
<pre>page.10 = CONTENT<br />page.10 {<br />&nbsp; table = tt_content<br />&nbsp; select {<br />&nbsp;&nbsp;&nbsp; pidInList = 35<br />&nbsp;&nbsp;&nbsp; andWhere.cObject = TEXT<br />&nbsp;&nbsp;&nbsp; andWhere.cObject {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; data = GPvar:tx_myext|header<br /><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fullQuoteStr = tt_content<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wrap = header=|</b><br />&nbsp;&nbsp;&nbsp; }<br />&nbsp; }<br />} </pre>
<p>The result is that SQL injection will not work anymore. When using the malicious URL, the frontend won't show any content elements at all. fullQuoteStr escapes all quotes inside the GET parameter and quotes the whole string. Data can be safely used with fullQuoteStr inside an SQL SELECT query of CONTENT.</p>
<p>For some more information, read the manual which is shiped with the extension.</p>
<h3>Conclusion</h3>
<p>You always have to protect your SQL queries of TypoScript cObject CONTENT against SQL injection. Since stdWrap does not ship sufficient functions to sanitize user parameters, use the fullQuoteStr function of the <a href="http://typo3.org/extensions/repository/view/sm_stdwrapquote/current/" title="Extension in TER on typo3.org" class="external-link" >extension sm_stdwrapquote</a>.</p>
<h3>Future implementation in TYPO3 core</h3>
<p>There's an RFC in the TYPO3 core team list to implement these functions into the core. Unfortunately this did not happen with version 4.3. But I try to push this into 4.4. If you like it, go to the core list and vote for <a href="http://bugs.typo3.org/view.php?id=12094" title="Bug report #12094: add fullQuoteStr to stdWrap" class="external-link" >feature #12094</a>.</p>]]></content:encoded>
			
			
			<pubDate>Mon, 30 Nov 2009 19:02:00 +0100</pubDate>
			
		</item>
		
		<item>
			<title>Fixed broken comment form on this site (update)</title>
			<link>http://www.t3node.com/blog/fixed-broken-comment-form-on-the-site/</link>
			<description>The comment form of this blog was broken the last two days. The reason was that I disabled the no_cache parameter in the install tool. It seems the ve_guestbook extension somehow relies on this parameter. The comments are now working properly again. Sorry for the inconvenience.</description>
			<content:encoded><![CDATA[<h3>Update</h3>
<p>Meanwhile I found out that ve_guestbook disables complete caching of pages with the guestbook form. I don't like that and it's not necessary. The plugin could be rendered as USER_INT instead of disabling page cache. I sent a <a href="http://bugs.typo3.org/view.php?id=12131" title="Bug report about ve_guestbook using no_cache" class="external-link" >bug report #12131</a> and appended a <a href="http://bugs.typo3.org/file_download.php?file_id=8572&amp;type=bug" title="Download the patch which hopefully fixes the issue" class="external-link" >patch</a> which fixes this issue: <a href="http://bugs.typo3.org/view.php?id=12131" title="Bug report" class="external-link" >http://bugs.typo3.org/view.php?id=12131</a></p>]]></content:encoded>
			
			
			<pubDate>Tue, 06 Oct 2009 11:22:00 +0200</pubDate>
			
		</item>
		
		<item>
			<title>Using the new TCA wizard &quot;suggest&quot; for autocompletion in BE fields of TYPO3 4.3</title>
			<link>http://www.t3node.com/blog/using-the-new-tca-wizard-suggest-autocomplete-in-extensions-of-typo3-43/</link>
			<description>There's a new type of wizard in the TYPO3 core called &quot;suggest&quot;, which has been added to TCA with 4.3beta-1. This wizard adds a magic input field for autocompletion to fields of type &quot;group&quot; or &quot;select&quot;, also called find-as-you-type. It helps to quickly find a record by typing its name/title in the suggest field, getting an AJAX dropdown list with all possible results. This article demonstrates how to implement this wizard in your TYPO3 extension. </description>
			<content:encoded><![CDATA[<h3>How does the suggest wizard work?</h3>
<p>Whenever you type some characters in the suggest field, the wizard searches for records matching the label field of given tables and immediately presents a list of results (find-as-you-type). Therefore it scans the table column which was set in the <a href="http://typo3.org/documentation/document-library/core-documentation/doc_core_api/4.2.0/view/4/2/#id4240310" title="The ctrl section in TYPO3 Core API documentation" class="external-link" >&quot;label&quot;-field or &quot;label_alt&quot;-field given in the $TCA['ctrl'] section</a> of the tables. That's for example the title field in the pages table or the header field in tt_content. The suggest wizard can be added to a group or select field like any other wizard by adding it to the $TCA['columns']['fieldname']['config'] section. At the time of writing this article, it's supposed to work only for database records: that means fields of type &quot;group&quot; having set 'internal_type' =&gt; 'db'or fields of type &quot;select&quot; having 'foreign_table' =&gt; tablename. Files and static items don't work ATM.</p>
<p>  <img alt="suggest wizard in action" style="padding: 8px;" src="uploads/RTEmagicC_suggest_dropdown.png.png" height="163" width="234" /></p>
<h3>How to add the suggest wizard to a field of your extension?</h3>
<p>The suggest wizard is added to a field like any other wizard in TCA. If you have no idea of using wizards yet, have a look at wizard section of the <a href="http://typo3.org/documentation/document-library/core-documentation/doc_core_api/4.2.0/view/4/3/#id4447706" title="Documenation on wizards in TCA" class="external-link" >TYPO3 Core API documentation</a>.<br />For the suggest wizard, there are two places for configuration: The $TCA['columns']['fieldname']['config'] section and page TSconfig.</p>
<h3>A simple scenario for demonstration</h3>
<p>There's an extension appended in this article for demonstration. The extension ships two new tables for articles and authors. To set the author in the article table, you can select records from the author table. Therefore the author field of articles not only shows a list of selectable authors, but also implements the new suggest wizard.</p>
<p><img alt="Field with suggest wizard in the BE" style="padding-top: 8px; padding-bottom: 8px;" src="fileadmin/user_upload/images/suggest_field.png" height="308" width="617" /></p>
<h3>Downloading the example extension</h3>
<p>If you like to see the wizard in action, you can download the example extension &quot;<a href="fileadmin/user_upload/examples/T3X_demo_suggest-0_0_0-z-200909251651.t3x" title="Initiates file download" class="download" >Demonstrate the TCA suggest wizard (demo_suggest)</a>&quot;.</p>
<p>The extension ships some sample data as a t3d file inside res/suggest_demo_dataset.t3d which can be imported with the import/export tool. You need to move this file into the fileadmin/ directory to be able to import the data into your TYPO3 installation.</p>
<h3>Implementing the wizard</h3>
<p>The below example code shows how to add the wizard to the &quot;author&quot; field of the table &quot;tx_demosuggest_article&quot; in TCA. In the &quot;allowed&quot; section, you need to add the table which should be searched for records. (When editing an article, you want to search for authors).</p>
<pre><b>TCA (tca.php)</b><br /><br />$TCA['tx_demosuggest_article']['columns']['author']['config'] =&gt; array(<br />&nbsp;&nbsp;&nbsp; 'type' =&gt; 'select',&nbsp;&nbsp;&nbsp; <br />&nbsp;&nbsp;&nbsp; 'foreign_table' =&gt; 'tx_demosuggest_author',<br />&nbsp;&nbsp;&nbsp; 'allowed' =&gt; 'tx_demosuggest_author',&nbsp;&nbsp;&nbsp; <br />&nbsp;&nbsp;&nbsp; 'size' =&gt; 10,&nbsp;&nbsp;&nbsp; <br />&nbsp;&nbsp;&nbsp; 'minitems' =&gt; 0,<br />&nbsp;&nbsp;&nbsp; 'maxitems' =&gt; 100,<br />&nbsp;&nbsp;&nbsp; 'wizards' =&gt; array(<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 'suggest' =&gt; array(&nbsp;&nbsp;&nbsp; <br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 'type' =&gt; 'suggest',<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ),<br />&nbsp;&nbsp;&nbsp; ),<br />);</pre>
<p>There are some configuration options which can be set directly in the TCA-wizard section or by using pageTS. The below example limits the number of results to 5 and searches only in page 123:</p>
<pre><b>TCA (tca.php)</b><br /><br />$TCA['tx_demosuggest_article']['columns']['author']['config'] =&gt; array(<br />&nbsp;&nbsp;&nbsp; (...)<br />&nbsp;&nbsp;&nbsp; 'wizards' =&gt; array(<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 'suggest' =&gt; array(&nbsp;&nbsp;&nbsp; <br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 'type' =&gt; 'suggest',<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 'tx_demosuggest_author' =&gt; array(<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 'maxItemsInResultList' =&gt; 5,<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 'pidList' =&gt; '123',<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ),<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ),<br />&nbsp;&nbsp;&nbsp; ),<br />);</pre>
<p>These options can also be set in page TSconfig:</p>
<pre><b>pageTS (TSconfig)</b><br /><br />TCEFORM.suggest.tx_demosuggest_author {<br />&nbsp; maxItemsInResultList = 5<br />&nbsp; pidList = 123<br />}</pre>
<p>Instead of setting these options for a certain table, you can also set a default value for any table:</p>
<pre><b>pageTS (TSconfig)</b><br /><br />TCEFORM.suggest.default {<br />&nbsp; maxItemsInResultList = 5<br />}</pre>
<p>Find a full list of all options in the <a href="http://typo3.org/documentation/document-library/core-documentation/doc_core_api/current/" title="TYPO3 Core API documentation" class="external-link" >TYPO3 Core API documentation</a>. As long as 4.3 is not realeased, please refer to the corresponding section of <a href="http://wiki.typo3.org/index.php/Pending_Documentation#suggest_-_autocomplete" title="Pending documentation for 4.3 in the TYPO3 wiki" class="external-link" >pending documentation in TYPO3 wiki</a>.</p>
<p>Of course you can also use this wizard in any table of the TYPO3 core. It is already implemented in the storage_pid field of pages.</p>
<h3>Further Reading</h3><ul><li><a href="http://typo3.org/documentation/document-library/core-documentation/doc_core_api/current/" title="TYPO3 Core API" class="external-link" >TYPO3 Core API Documentation</a> (once 4.3 is released)</li><li><a href="http://typo3.org/documentation/document-library/core-documentation/doc_core_api/4.2.0/view/4/3/#id4447706" title="Introduction to TCA wizards in TYPO3 Core API documentation" class="external-link" >Wizards configuration in TYPO3 Core API Documentation</a> </li><li><a href="http://wiki.typo3.org/index.php/Pending_Documentation#suggest_-_autocomplete" title="Configuration options of the TCA suggest wizard in the TYPO3 wiki" class="external-link" >Pending documentation in the TYPO3 wiki</a> (until 4.3 is finally released)</li></ul>]]></content:encoded>
			
			
			<pubDate>Fri, 02 Oct 2009 09:25:00 +0200</pubDate>
			
		</item>
		
		<item>
			<title>TYPO3 Blog www.t3node.com mentioned in &quot;The Ultimate TYPO3 Resource List&quot; ;-)</title>
			<link>http://www.t3node.com/blog/typo3-blog-t3node-mentioned-in-the-ultimate-typo3-resource-list/</link>
			<description>While searching for some resource lists on TYPO3, I stumbled upon &quot;The Ultimate TYPO3 Resource List&quot; in the Acqal Blog. Surprisingly, www.t3node.com is also mentioned there. Woooooo! Thanks to Virgil Houston.</description>
			<content:encoded><![CDATA[<p>While searching for some resource lists on TYPO3, I stumbled upon &quot;<a href="http://www.acqal.com/blog/a/article/the-ultimate-typo3-resource-list/" title="TYPO3 resource list by Virgil Houston in the Acqal blog" class="external-link" >The Ultimate TYPO3 Resource List</a>&quot; in the Acqal Blog. Surprisingly, www.t3node.com is also mentioned there. Woooooo! Thanks to Virgil Houston.</p>]]></content:encoded>
			
			
			<pubDate>Sat, 19 Sep 2009 15:47:00 +0200</pubDate>
			
		</item>
		
		<item>
			<title>&quot;Save and view&quot; button for records of TYPO3 extensions</title>
			<link>http://www.t3node.com/blog/save-and-view-button-for-records-of-typo3-extensions/</link>
			<description>When editing a page in the TYPO3 backend, there's a whole bunch of save buttons available. The &quot;save document and view page&quot; button allows to save the content and open a preview popup with one click. Unfortunately this does only work for regular pages and content elements, but not for database records of extensions which are stored inside sysfolders. The following tutorial describes a way to get that button also running for those records.</description>
			<content:encoded><![CDATA[<p>The solution is to hook into the post-process of saving records in TCEmain and set the GET parameters needed for the preview page. The idea is taken from the <a href="http://typo3.org/extensions/repository/view/tt_news/current/" title="tt_news: The most famous TYPO3 extension" class="external-link" >tt_news extension</a>. Thanks to the author <a href="http://www.rupert-germann.de/" title="Homepage of Rupert Germann, the maintainer of the tt_news extension" class="external-link" >Rupert Germann</a>!</p>
<h3>Hooks in TYPO3</h3>
<p>Using hooks is a common way to add functionality or change behaviour of the TYPO3 core. Although it sometimes looks like hardcore coding stuff, it's not that hard to understand. The <a href="http://typo3.org/documentation/document-library/core-documentation/doc_core_api/4.2.0/view/3/4/" title="Official documentation of TYPO3" class="external-link" >TYPO3 Core API documentation</a> on typo3.org gives you an overview about hooks in TYPO3. To get a list of hooks which exist in TYPO3, you can use the extension <a href="http://typo3.org/extensions/repository/view/dmc_hooklist/current/" title="Extension to list hooks in TYPO3 can be found in the extension repository." class="external-link" >dmc HookList (dmc_hooklist)</a>.</p>
<h3>Preassumptions</h3>
<p>This tutorial assumes you have an extension called <i>extExample</i>. <i>extExample</i> is used as the extension key. The extension stores its records in the DB table <i>tx_extExample_data</i>. The records are kept in a sysfolder in the BE. There's a frontend plugin <i>tx_extExample_pi1</i> which displays a single record on a page (page id=123) and using the GET-parameter <i>tx_extExample_pi1[showUid]</i> for the uid of the record. A very common type of frontend extension, isn't it? Just replace the emphasized keywords to use the snippets in your extension. </p>
<h3>What do you need to do in your own extension to get this button running?</h3>
<p>There's only three things to do:</p><ul><li>add a class to your extension with a method to set the proper preview parameters,</li><li>register the hook in your extension to tell TYPO3 to call this method,</li><li>set the page ID of the single view in pageTS.</li></ul><h3>Writing a method to set the preview parameters</h3>
<p>The method adds the needed information to a global variable which itself is processed by TCE when openening the popup window for the preview.</p>
<pre><b>typo3conf/ext/extExample/classes/class.tx_extExample_tcemain.php</b><br />&lt;?php<br />class tx_extExample_tcemain {<br /><br />&nbsp; public function processDatamap_preProcessFieldArray(&amp;$fieldArray, $table, $uid, &amp;$pObj) {<br />&nbsp;<br />&nbsp;&nbsp; if ($table == 'tx_extExample_data' &amp;&amp; isset($GLOBALS['_POST']['_savedokview_x']) &amp;&amp; !$GLOBALS['BE_USER']-&gt;workspace) {<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // The GETparam which is used in the single view of the plugin<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $getParam = 'tx_extExample_pi1[showUid]';<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // get page TSconfig<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $pageTS = t3lib_BEfunc::getPagesTSconfig($GLOBALS['_POST']['popViewId']);<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // get pid of single view<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $singlePid = $pageTS['tx_extExample.']['singlePid'];<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ($singlePid) {<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // set page id to be shown<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $GLOBALS['_POST']['popViewId'] = $singlePid;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // don't cache the page<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $GLOBALS['_POST']['popViewId_addParams'] = '&amp;no_cache=1';<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // set language parameter<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ($fieldArray['sys_language_uid'] &gt; 0) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $GLOBALS['_POST']['popViewId_addParams'] .= '&amp;L=' . $fieldArray['sys_language_uid'];<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // set plugin GETparams<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $GLOBALS['_POST']['popViewId_addParams'] .= '&amp;' . $getParam . '=' . $uid;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp; }<br />&nbsp; }<br />}<br /><br />if (defined('TYPO3_MODE') &amp;&amp; $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/extExample/classes/class.tx_extExample_tcemain.php']) {<br />&nbsp; include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/extExample/classes/class.tx_extExample_tcemain.php']);<br />}<br /><br />?&gt;</pre>
<h3>Registering the hook</h3>
<p>Hooks are registered in your extension by adding a simple oneliner to ext_localconf.php:</p>
<pre><b>ext_localconf.php</b><br />$GLOBALS ['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = 'EXT:exampleExt/classes/class.tx_exampleExt_tcemain.php:tx_exampleExt_tcemain';</pre>
<h3>Set the singlePid in pageTS</h3>
<p>Finaly, you need to set the page ID of the frontend single view in pageTS. It's the pid of the page which should be opened in the preview.</p>
<pre><b>pageTS (TSconfig)</b><br />tx_extExample.singlePid = 123</pre>
<p>That's it! Now clear the configuration cache in the TYPO3 backend, open a record and try to &quot;save and preview&quot;.</p>
<p>This solution works only in LIVE workspace. I didn't test it within otther workspaces.</p>]]></content:encoded>
			
			
			<pubDate>Wed, 16 Sep 2009 13:23:00 +0200</pubDate>
			
		</item>
		
		<item>
			<title>Dynamic forms and types with TYPO3 FlexForms</title>
			<link>http://www.t3node.com/blog/dynamic-forms-and-types-with-typo3-flexforms/</link>
			<description>The most accessible way to configure a plugin in TYPO3 is using a custom content element build with FlexForms. It provides forms of all kinds for any BE user. FlexForms adapt most of the features of the TCA, but unfortunately the documentation on FlexForms is rather poor. The following article tries to demonstrate the configuration of a TYPO3 FlexForm in order to get some forms which dynamically change their fields on user interaction.</description>
			<content:encoded><![CDATA[<h3> Dynamic forms and types of forms</h3>
<p>To get an idea what this article is exactly about, go login to a TYPO3 backend, open a content element of type &quot;Text&quot; and change its type to &quot;Image&quot;. The form of the content element will reload with some new fields appearing and others disappearing.</p>
<p><img title="Ugly looking sceenshots " alt="Ugly looking example forms" style="padding-left: 32px;" src="uploads/RTEmagicC_ce-types.jpg.jpg" height="817" width="285" /></p>
<p>This is what I call here dynamic forms. A single content element can be used for different tasks using different form fields. Each form type contains an individual set of fields. </p>
<h3>TCA configuration to get dynamic forms</h3>
<p>In TCA, the above example is achieved by two settings:</p><ul><li>reloading the form after changing the &quot;type&quot; field (dynamic form)</li><li>configuring the field sets for each type (types).</li></ul><p>The first setting is configured in TCA['ctrl']['type'] section by setting a certain table field to act as a form type switcher. In tt_content for example it look like this:</p>
<pre><b>TCA</b><br />'ctrl' =&gt; array(<br />&nbsp;&nbsp; &nbsp;'type' =&gt; 'CType',<br />),</pre>
<p>The second setting is arranged in TCA['ctrl']['types'] section by setting all individual fields for any type of form. For example:</p>
<pre><b>TCA</b><br />'types' =&gt; array(<br />&nbsp;&nbsp; &nbsp;'1' =&gt; array(<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;'showitem' =&gt; 'CType, header, bodytext'<br />&nbsp;&nbsp; &nbsp;),<br />&nbsp;&nbsp; &nbsp;'2' =&gt; array(<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;'showitem' =&gt; 'CType, header, image'<br />&nbsp;&nbsp; &nbsp;),<br />),</pre>
<p>In the above example we get a form with two types. One type is showing the type, a header and a text field, the other shows an image field instead of the text field. The field CType is used to switch between the types.</p>
<h3>FlexForms configuration to get dynamic forms</h3>
<p>In FlexForms we have to use a slightly different approach:</p><ul><li>using &lt;onChange&gt;reload&lt;/onChange&gt; instead of TCA[ctrl']['type'] to reload forms after changing the type field (onChange)</li><li>adding a condition to all FlexForm fields which expects a certain value of the type field. (displayCondition)</li></ul><p>Our example form would look like this:</p>
<pre><b>FlexForm</b><br />&lt;myType&gt;<br />&nbsp; &lt;TCEforms&gt;<br />&nbsp;&nbsp;&nbsp; &lt;label&gt;Type of form&lt;/label&gt;<br />&nbsp;&nbsp;&nbsp; &lt;onChange&gt;reload&lt;/onChange&gt;<br />&nbsp;&nbsp;&nbsp; &lt;config&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;type&gt;select&lt;/type&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;size&gt;1&lt;/size&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;maxitems&gt;1&lt;/maxitems&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;items&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;numIndex index=&quot;0&quot; type=&quot;array&quot;&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;numIndex index=&quot;0&quot;&gt;&lt;/numIndex&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;numIndex index=&quot;1&quot;&gt;0&lt;/numIndex&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/numIndex&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;numIndex index=&quot;1&quot; type=&quot;array&quot;&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;numIndex index=&quot;0&quot;&gt;Type No. 1 for texts&lt;/numIndex&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;numIndex index=&quot;1&quot;&gt;text&lt;/numIndex&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/numIndex&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;numIndex index=&quot;2&quot; type=&quot;array&quot;&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;numIndex index=&quot;0&quot;&gt;Type No. 2 for images&lt;/numIndex&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;numIndex index=&quot;1&quot;&gt;image&lt;/numIndex&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/numIndex&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/items&gt;<br />&nbsp;&nbsp;&nbsp; &lt;/config&gt;<br />&nbsp; &lt;/TCEforms&gt;<br />&lt;/myType&gt;<br />&lt;bodytext&gt;<br />&nbsp; &lt;TCEforms&gt;<br />&nbsp;&nbsp;&nbsp; &lt;label&gt;Your Text&lt;/label&gt;<br />&nbsp;&nbsp;&nbsp; &lt;displayCond&gt;FIELD:myType:=:text&lt;/displayCond&gt;<br />&nbsp;&nbsp;&nbsp; &lt;config&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;type&gt;input&lt;/type&gt;<br />&nbsp;&nbsp;&nbsp; &lt;/config&gt;<br />&nbsp; &lt;/TCEforms&gt;<br />&lt;/bodytext&gt;<br />&lt;image&gt;<br />&nbsp; &lt;TCEforms&gt;<br />&nbsp;&nbsp;&nbsp; &lt;label&gt;Your Image&lt;/label&gt;<br />&nbsp;&nbsp;&nbsp; &lt;displayCond&gt;FIELD:myType:=:image&lt;/displayCond&gt;<br />&nbsp;&nbsp;&nbsp; &lt;config&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;type&gt;input&lt;/type&gt;<br />&nbsp;&nbsp;&nbsp; &lt;/config&gt;<br />&nbsp; &lt;/TCEforms&gt;<br />&lt;/image&gt;</pre>
<h3>Explanation of the FlexForm displayCond feature</h3>
<p>The displayCond feature is explained in the<a href="http://typo3.org/documentation/document-library/core-documentation/doc_core_api/4.2.0/view/4/2/#id4256737" title="Official TYPO3 core API documentation on typo3.org" class="external-link" > ['columns'][fieldname] section of the TYPO3 core API documentation</a>.</p>
<p>In our case we use FIELD:myType:IN:value where value is a certain value of the type field (text or image):</p>
<pre>FIELD:myType:=:<i>text</i></pre>
<p>The field text is displayed only if the field myType is set to the value &quot;text&quot;.</p>
<h3>FlexForms documentation unleashed?</h3>
<p>FlexForms are almost as powerful as regular TCA forms. The configuration of FlexForms is slightly different than TCA: Most of the features use equivalent syntax, some have their own. Unfortunately, the documenation of FlexForms in most cases refers to TCA, instead of being discussed in a separate chapter - resulting in very few FlexForm examples.</p>
<p>You need to pass the 36 chambers of TCA to reveal the secret knowledge of FlexForms. Have patience and come up with some good keywords when search the mailing lists and forums for FlexForms examples.</p>]]></content:encoded>
			
			
			<pubDate>Mon, 14 Sep 2009 19:53:00 +0200</pubDate>
			
		</item>
		
		<item>
			<title>Conditions and dynamic values in TCA fields of TYPO3 </title>
			<link>http://www.t3node.com/blog/conditions-and-dynamic-values-in-tca-fields-of-typo3/</link>
			<description>TYPO3 backend and TCA simetimes appear a bit old school. Fields and values are less flexible like you are used to in recent AJAX applications. How to make them more flexible without heavy JS frameworks like ExtJS?</description>
			<content:encoded><![CDATA[<p> The first thing that I found was the dynaflex extension. It allows to add new fields dynamically based on conditions. Anyway I found a quick&amp;dirty solution, which looked more confident for the tiny task I had to solve:</p>
<p>The problem was to have dynamic values in the frames (section_frame)  field of content elements, depending on the value of the column (colPos) field. If normal column was choosen, frames should offer value 80 and 81. If right column was choosen, frames should offer 82 and 83.</p>
<p>The first thing I did was to add colPos to the list of fields, which trigger saving and reloading the content element on change. I kickstarted a new extension and added these lines to extTables.php:</p>
<pre>$updateFields = t3lib_div::trimExplode(<br />  ',',<br />  $TCA['tt_content']['ctrl']['requestUpdate']<br />);<br />if (in_array('colPos', $updateFields)) {<br />  $TCA['tt_content']['ctrl']['requestUpdate'] .= ',colPos';<br />} </pre>
<p>Then I changed the TCA of section_frame to use itemsProcFunc to customize its items:</p>
<pre>$TCA['tt_content']['columns']['section_frame']['config']['items'] = array();<br />$TCA['tt_content']['columns']['section_frame']['config']['itemsProcFunc'] = 'tx_myext_setsectionframeitems-&gt;main';<br />if (TYPO3_MODE == 'BE') {<br />&nbsp; include_once(t3lib_extMgm::extPath($_EXTKEY).'class.tx_myext_setsectionframeitems.php');<br />} </pre>
<p>Next step was to implement the class, which controls the items. The class itself was stored in a seperate file called class.tx_myext_setsectionframeitems.php:</p>
<pre>class tx_myext_setsectionframeitems {<br />&nbsp; function main(&amp;$params, &amp;$pObj)&nbsp;{<br />&nbsp;&nbsp;&nbsp; global $LANG;<br />&nbsp;&nbsp;&nbsp; $selectOptions = array();<br /><br />&nbsp;&nbsp; // Allowed fields for normal column<br />&nbsp;&nbsp;&nbsp; $normalFields = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $LANG-&gt;sL(&quot;LLL:EXT:myext/locallang_tca.xml:tt_content.section_frame.I.80&quot;) =&gt; 80,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $LANG-&gt;sL(&quot;LLL:EXT:myext/locallang_tca.xml:tt_content.section_frame.I.81&quot;) =&gt; 81<br />&nbsp; &nbsp;&nbsp; );<br />&nbsp;&nbsp;&nbsp; // Allowed fields for right column<br />&nbsp;&nbsp;&nbsp; $rightFields = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $LANG-&gt;sL(&quot;LLL:EXT:myext/locallang_tca.xml:tt_content.section_frame.I.82&quot;) =&gt; 82,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $LANG-&gt;sL(&quot;LLL:EXT:myext/locallang_tca.xml:tt_content.section_frame.I.83&quot;) =&gt; 83<br />&nbsp;&nbsp;&nbsp; );<br />&nbsp;&nbsp;&nbsp; // Get value of tt_content.colPos<br />&nbsp;&nbsp;&nbsp; $key = key($pObj-&gt;cachedTSconfig);<br />&nbsp;&nbsp;&nbsp; $colPos = $pObj-&gt;cachedTSconfig[$key]['_THIS_ROW']['colPos'];<br />&nbsp;&nbsp;&nbsp; // Add items<br />&nbsp;&nbsp;&nbsp; if ($colPos == 2) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $selectOptions = $rightFields;<br />&nbsp;&nbsp;&nbsp; } else {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $selectOptions = $normalFields;<br />&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp; foreach ($selectOptions as $key =&gt; $value) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $params['items'][] = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $key,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $value<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; );<br />&nbsp;&nbsp;&nbsp; }<br />&nbsp; }<br />}<br /><br />if (defined('TYPO3_MODE') &amp;&amp; $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/myext/class.tx_myext_setsectionframeitems.php'])&nbsp; {<br />&nbsp; include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/myext/class.tx_myext_setsectionframeitems.php']);<br />} </pre>
<p>The custom labels were stored in a usual locallang file.</p>
<p>Finally, I did some TSconfig tuning in extTables.php to prevent invalid field values:</p>
<pre>t3lib_extMgm::addPageTSConfig('<br /> &nbsp;&nbsp;TCEFORM.tt_content.section_frame.disableNoMatchingValueElement = 1<br />'); </pre>
<p>That's it. The whole stuff looks a bit ugly to me. So if you know a smarter solution, I'd be glad if you leave a comment.</p>]]></content:encoded>
			
			
			<pubDate>Sat, 20 Jun 2009 18:11:00 +0200</pubDate>
			
		</item>
		
		<item>
			<title>FLOW3 first alpha version released</title>
			<link>http://www.t3node.com/blog/flow3-first-alpha-version-released/</link>
			<description>Robert Lemke just announced that the first public alpha version of FLOW3 has been released. A reason to celebrate!</description>
			<content:encoded><![CDATA[<p><a href="http://flow3.typo3.org/news/0/1/" title="Official news article about the FLOW3 aplha 1 release" class="external-link" >FLOW3</a> is meant as the next generation PHP application  framework, which will be the basis for the forthcoming TYPO3 version 5. It has now been developed for 2.5 years and finally reached an alpha state. You can find a <a href="http://flow3.typo3.org/about/features/" title="Main features of FLOW3" class="external-link" >feature list at the FLOW3 website</a>. </p>
<p> I already got in contact with FLOW3 at <a href="http://t3dd09.typo3.org" title="T3DD09 - the official TYPO3 Developer Days 2009" class="external-link" >T3DD09</a>, listening to <a href="http://t3dd09.typo3.org/recordings.html" title="Some recordings of talks at T3DD09" class="external-link" >several talks</a> about its architecture and components and playing a bit with the code. This milestone release comes just in time with <a href="blog/extbase-presentation-at-t3dd09/" >Extbase</a>, the forthcoming <a href="http://forge.typo3.org/wiki/typo3v4-mvc/MVC_Concept" title="Extbase project website at TYPO3 forge" class="external-link" >backport of the MVC pattern</a> of FLOW3 for TYPO3 version 4.x.</p>
<p>I am very curious about the progress of these projects, since I am already infected by the new design patterns and programming paradigms. I also see  more and more people testing and writing FLOW3 and Extbase stuff which makes me confident about its success. Still there is a lot of criticism and scepticism about FLOW3, especially the question of performance. Anyway this is a first alpha release and there's still enough time and code left to solve these problems.</p>
<p>Keep on with your good work!</p>]]></content:encoded>
			
			
			<pubDate>Tue, 02 Jun 2009 19:41:00 +0200</pubDate>
			
		</item>
		
	</channel>
</rss>