<?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>Webdevelopment at huuah.com &#187; TYPO3</title>
	<atom:link href="http://huuah.com/category/typo3/feed/" rel="self" type="application/rss+xml" />
	<link>http://huuah.com</link>
	<description>webdevelopment, cms, php, javascript etc</description>
	<lastBuildDate>Sat, 04 Sep 2010 22:55:27 +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 website caching for better performance</title>
		<link>http://huuah.com/using-website-caching-for-better-performance/</link>
		<comments>http://huuah.com/using-website-caching-for-better-performance/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 21:20:33 +0000</pubDate>
		<dc:creator>js - huuah</dc:creator>
				<category><![CDATA[TYPO3]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[caching]]></category>
		<category><![CDATA[optimization]]></category>

		<guid isPermaLink="false">http://huuah.com/?p=413</guid>
		<description><![CDATA[<p>I was doing some benchmarking and performance analyzing on servers running WordPress and TYPO3 websites and the result was not than good actually. My setup could use quite a bit of website optimization to get the pages loaded faster.</p>
<p>So. How do one find extra performance, without buying new expensive&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>I was doing some benchmarking and performance analyzing on servers running WordPress and TYPO3 websites and the result was not than good actually. My setup could use quite a bit of website optimization to get the pages loaded faster.</p>
<p>So. How do one find extra performance, without buying new expensive hardware. One way could to experiment with caching options. The <a href="http://eaccelerator.net/">eAccelerator</a> software is highly recommend for TYPO3 setup, so I did some testing with this and there was quite a bit of performance hidden here.</p>
<p>The installation was quite simple on my setup. I followed the <a href="http://eaccelerator.net/wiki/InstallFromSource">installlation guide</a> which was more or less a set of commands. phpize, configure, make, make install and the copy the .ini file to the PHP ini directory. Reload apache/php and that&#8217;s it. All done.</p>
<p>If the website is running TYPO3 and there still are performance issues, then you should check that the configuration of the site and server, uses the internal caching mechanism found in TYPO3. If this is not disable (from an extension or something else) there will most likely be major performance boost waiting here. This is the typical bottle neck in TYPO3 and it should be considered carefully, as this optimized the performance of TYPO3. </p>
]]></content:encoded>
			<wfw:commentRss>http://huuah.com/using-website-caching-for-better-performance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Including Javascript or CSS in your TYPO3 template</title>
		<link>http://huuah.com/including-javascript-or-css-in-your-typo3-template/</link>
		<comments>http://huuah.com/including-javascript-or-css-in-your-typo3-template/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 20:46:40 +0000</pubDate>
		<dc:creator>js - huuah</dc:creator>
				<category><![CDATA[TYPO3]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[template]]></category>

		<guid isPermaLink="false">http://huuah.com/?p=409</guid>
		<description><![CDATA[<p>Have you ever had the need for inserting extra stylesheet or javascript files in your TYPO3 template? I am used to having a TemplaVoila setup, which has the nice feature of mapping part of the header as part of the template, but this is not really that flexible when using&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>Have you ever had the need for inserting extra stylesheet or javascript files in your TYPO3 template? I am used to having a TemplaVoila setup, which has the nice feature of mapping part of the header as part of the template, but this is not really that flexible when using extension template and etc.</p>
<p>An easy way of controlling this, is to setup the javascript and css files from the template configuration. There are some different ways of doing this and I will demonstrate two of them here.</p>
<p>The template configuration examples should be self-explainable, so I will not comment them futher:</p>
<p><strong>Javascript option 1 &#8211; headerData:</strong></p>
<pre class="brush: plain;">
page.headerData.230 = TEXT
page.headerData.230.value = &lt;script type=&quot;text/javascript&quot; src=&quot;/fileadmin/myjavascript.js&quot;&gt;&lt;/script&gt;
</pre>
<p><strong>Javascript option 2 &#8211; includeJS:</strong></p>
<pre class="brush: plain;">
page.includeJS {
  file1 = fileadmin/myjavascript.js
  file1.type = application/x-javascript
  file2 = fileadmin/myjavascript2.js
}
</pre>
<p><strong>CSS option 1 &#8211; headerData</strong></p>
<pre class="brush: plain;">
page.headerData.231 = TEXT
page.headerData.231.value = &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;/fileadmin/stylesheet.css&quot; /&gt;
</pre>
<p><strong>CSS option 2 &#8211; includeCSS</strong></p>
<pre class="brush: plain;">
page.includeCSS {
  file1 = fileadmin/stylesheet.css
}
</pre>
<p><strong>CSS option 3 &#8211; page.stylesheet</strong></p>
<pre class="brush: plain;">
page.stylesheet = fileadmin/stylesheet.css
</pre>
<p>Hope this tip can be helpful. Please notice that the CSS option 3 only enables you to <strong>set 1 stylesheet</strong>, where the other examples support multiple files.</p>
]]></content:encoded>
			<wfw:commentRss>http://huuah.com/including-javascript-or-css-in-your-typo3-template/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Faster image scaling within TYPO3 extension</title>
		<link>http://huuah.com/faster-image-scaling-within-typo3-extension/</link>
		<comments>http://huuah.com/faster-image-scaling-within-typo3-extension/#comments</comments>
		<pubDate>Fri, 21 Aug 2009 20:28:43 +0000</pubDate>
		<dc:creator>js - huuah</dc:creator>
				<category><![CDATA[TYPO3]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://huuah.com/?p=387</guid>
		<description><![CDATA[<p>During the development of a gallery extension for TYPO3, I was having some performance issues when during the on-the-fly image scaling.</p>
<p>When displaying the images in the frontend, I would scale the images to a size specified in the plugin configuration. I was using the following code:</p>
<pre class="brush: php;"></pre><p>&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>During the development of a gallery extension for TYPO3, I was having some performance issues when during the on-the-fly image scaling.</p>
<p>When displaying the images in the frontend, I would scale the images to a size specified in the plugin configuration. I was using the following code:</p>
<pre class="brush: php;">
...
$imageConf['file'] = $row[image];
$imageConf['file.']['maxH'] = $this-&gt;conf[largeMaxH];
$imageConf['file.']['maxW'] = $this-&gt;conf[largeMaxW];
$thumbnailImage = $this-&gt;cObj-&gt;IMG_RESOURCE($imageConf);
...
</pre>
<p>The $row[image] would contain the image file to be displayed and the maxH and maxW is being set to the image sizes from the plugin configuration. When loading the page every image would be resized to the correct size, but when a single gallery reached about 100+ images this process started to perform very poorly. Actually is was slow &#8211; very slow.</p>
<p>What to do?! </p>
<p>Well, I figured out that I would try to make a function, where the image only would get resized once and then reused. I created an extra database field (a blob-field would be preferred) for storing the cached information.</p>
<p>Generating the images is still done with the above example, but now the filename for the resized image is being saved in the database. I choose a setup using a multidimensional array with keys representing the image height and width like this:</p>
<pre class="brush: php; highlight: [7];">
...
$imageConf['file'] = $row[image];
$imageConf['file.']['maxH'] = $this-&gt;conf[largeMaxH];
$imageConf['file.']['maxW'] = $this-&gt;conf[largeMaxW];
$thumbnailImage = $this-&gt;cObj-&gt;IMG_RESOURCE($imageConf);

$cached[$this-&gt;conf[thumbnailMaxW]][$this-&gt;conf[thumbnailMaxH]] = $thumbnailImage;
...
</pre>
<p>Until now there is no change in the performance as every image still is being resized on the fly. The last piece of the puzzle is to check whether or not there exists a cached image. To do this I am using two check:</p>
<pre class="brush: php; highlight: [1,2,10];">
$thumbnailImage = $cached[$this-&gt;conf[largeMaxW]][$this-&gt;conf[largeMaxH]];
if ($thumbnailImage == &quot;&quot; || ! file_exists($thumbnailImage)) {
  $imageConf['file'] = $row[image];
  $imageConf['file.']['maxH'] = $this-&gt;conf[largeMaxH];
  $imageConf['file.']['maxW'] = $this-&gt;conf[largeMaxW];
  $thumbnailImage = $this-&gt;cObj-&gt;IMG_RESOURCE($imageConf);

  $cached[$this-&gt;conf[thumbnailMaxW]][$this-&gt;conf[thumbnailMaxH]] = $thumbnailImage;

  $updateCache = 1;
}
</pre>
<p>First check is to see if the database contains information about a cached image and the second check is to see if the cache image still exists within the typo3temp directory. If one or both of these check fails, then a new cached image will be generated and the $updateCache is set to 1 indicating that the database should be updated later on in the script.</p>
<p>It&#8217;s a while since I made the actual code and I cannot remember the exact render times, but there was a massive performance boost in my extension.</p>
]]></content:encoded>
			<wfw:commentRss>http://huuah.com/faster-image-scaling-within-typo3-extension/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Multi language setup in TYPO3</title>
		<link>http://huuah.com/multi-language-setup-in-typo3/</link>
		<comments>http://huuah.com/multi-language-setup-in-typo3/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 11:07:44 +0000</pubDate>
		<dc:creator>js - huuah</dc:creator>
				<category><![CDATA[TYPO3]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[language]]></category>

		<guid isPermaLink="false">http://huuah.com/?p=320</guid>
		<description><![CDATA[<p>If you are building a site, which should support more than one language, there are two ways of doing this. Okay, perhaps there are more than two, but I will only give two examples.</p>
<p>The two I will cover is:<br />
1. Manually adding language page<br />
2. Integrated TYPO3&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>If you are building a site, which should support more than one language, there are two ways of doing this. Okay, perhaps there are more than two, but I will only give two examples.</p>
<p>The two I will cover is:<br />
1. Manually adding language page<br />
2. Integrated TYPO3 language support </p>
<a name="1.+Manually+adding+language+page"></a><h1>1. Manually adding language page</h1>
<p>This I will only touch briefly, as the solution should be obvious when the layout is presented. It should be very easy. Just create a tree like this and manually do the linking:<br />
<img src="/images/manuallylanguage.png" alt="Manually Language Setup" /><br />
That&#8217;s it. </p>
<a name="2.+Integrated+TYPO3+language+support"></a><h1>2. Integrated TYPO3 language support</h1>
<p>This is quite different compared to the first setup. We will be using the built-in language support in TYPO3, based on a tree structure like this:<br />
<img src="/images/typo3language1.png" alt="Tree structure for a TYPO3 language setup" /></p>
<p><strong>First step</strong> is to create the languages and this is done by selecting <code>list</code>, clicking your <code>site</code> in the tree structure and then adding a <code>website language</code>:<br />
<img src="/images/typo3language2.png" alt="Adding a website language step 1" /><br />
<img src="/images/typo3language3.png" alt="Adding a website language step 2" /></p>
<p>Then create the number of languages needed for the site.<br />
<img src="/images/typo3language4.png" alt="Adding a website language step 3" /></p>
<p><strong>Second step</strong> is the template configuration. Before doing this, we have to check which id numbers the languages has been given. This is done by selecting list on your site (just as when we created the languages) and the hover your mouse above each language:<br />
<img src="/images/typo3language5.png" alt="Adding a website language step 4 - getting the language id" /><br />
When this is done, then go to the template setup field and enter the following:</p>
<pre class="brush: plain;">
config.sys_language_overlay = hideNonTranslated
config.linkVars = L

[globalVar = GP:L=en]
  config.sys_language_uid=2
  config.language = en
[global]

[globalVar = GP:L=dk]
  config.sys_language_uid=1
  config.language = dk
[global]
</pre>
<p>What this does is:<br />
<code>config.sys_language_overlay = hideNonTranslated</code> will hide a page or content element, if is does not have content for the specific site. Remove or outcomment this, if you want all elements displayed.<br />
<code>config.linkVars = L</code> is the parameter used in the url for selecting language. Ie http://domain.tld/index.php?id=2?<code>L=dk</code><br />
<code>[globalVar = GP:L=dk]</code> a section like this, configures the language based on the parameter passed by the linkVars. Here it will trigger on <code>L=dk</code><br />
<code>config.sys_language_uid=1</code> this will join the dk-parameter with the language id 1, which we found earlier.<br />
<code>config.language = dk</code> this will set the page language for <code>dk</code></p>
<p><strong>Third and final step</strong> is to configure a page to use the new languages. This is done by selecting <code>list</code>, clicking <code>the page</code> and adding an <code>Alternative Page Language</code><br />
<img src="/images/typo3language6.png" alt="Adding a website language step 5" /><br />
<img src="/images/typo3language7.png" alt="Adding a website language step 6" /><br />
Then select which language you want to create a page for, type in the page title and save it.<br />
<img src="/images/typo3language8.png" alt="Adding a website language step 7" /><br />
We are now ready for translating the page. When editing an element on the newly configured page, there is now a new option in the top of the page. Select the new language and type in the translation.<br />
<img src="/images/typo3language9.png" alt="Adding a website language step 8" /></p>
<p><strong>That&#8217;s it</strong>. TYPO3 will now display the Danish content when visiting the page with the L=dk parameter in the url.</p>
]]></content:encoded>
			<wfw:commentRss>http://huuah.com/multi-language-setup-in-typo3/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>TemplaVoila with default elements</title>
		<link>http://huuah.com/templavoila-with-default-elements/</link>
		<comments>http://huuah.com/templavoila-with-default-elements/#comments</comments>
		<pubDate>Fri, 03 Jul 2009 20:19:43 +0000</pubDate>
		<dc:creator>js - huuah</dc:creator>
				<category><![CDATA[TYPO3]]></category>
		<category><![CDATA[TemplaVoila]]></category>

		<guid isPermaLink="false">http://huuah.com/?p=105</guid>
		<description><![CDATA[<p>There it was. A very basic TemplaVoila setup with two content elements. A <em>content</em> and a <em>rightbar</em>. The <em>content</em> is of course for all the regular stuff on the page, and the <em>right bar</em> has some standard highlights.</p>
<p>When both the <em>content</em> and the <em>rightbar</em> is of the type <em>Content</em>&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>There it was. A very basic TemplaVoila setup with two content elements. A <em>content</em> and a <em>rightbar</em>. The <em>content</em> is of course for all the regular stuff on the page, and the <em>right bar</em> has some standard highlights.</p>
<p>When both the <em>content</em> and the <em>rightbar</em> is of the type <em>Content Elements</em>, you have to manually insert elements on every single page, that should have output. </p>
<p>Wouldn&#8217;t it be nice, if the <em>rightbar</em> could have some default Content Elements outputted automatically, if you haven&#8217;t inserted any elements? Yes, it would!</p>
<p>So. To the fun part. Open your TemplaVoila section in the TYPO3 backend and edit the Data Structure (DS) for the template. The textfield <strong>Data Structure XML</strong> has a lot of XML-data and you should scroll down until you find the section of your element. In my case the element is named field_right and I should then find something like this:</p>
<pre class="brush: plain;">
...
        &lt;field_right type=&quot;array&quot;&gt;
				&lt;tx_templavoila type=&quot;array&quot;&gt;
					&lt;title&gt;&lt;/title&gt;
					&lt;sample_data type=&quot;array&quot;&gt;
						&lt;numIndex index=&quot;0&quot;&gt;&lt;/numIndex&gt;
					&lt;/sample_data&gt;
					&lt;eType&gt;ce&lt;/eType&gt;
					&lt;TypoScript&gt;&lt;![CDATA[
	10= RECORDS
	10.source.current=1
	10.tables = tt_content
	10.wrap = &lt;!--TYPO3SEARCH_begin--&gt; | &lt;!--TYPO3SEARCH_end--&gt;
                    ]]&gt;&lt;/TypoScript&gt;
...
</pre>
<p>We are then going to edit the &lt;TypoScript&gt;-section, so it should look like this:</p>
<pre class="brush: plain; highlight: [14,15,16,17,18,19,20,21,22,23];">
...
        &lt;field_right type=&quot;array&quot;&gt;
				&lt;tx_templavoila type=&quot;array&quot;&gt;
					&lt;title&gt;&lt;/title&gt;
					&lt;sample_data type=&quot;array&quot;&gt;
						&lt;numIndex index=&quot;0&quot;&gt;&lt;/numIndex&gt;
					&lt;/sample_data&gt;
					&lt;eType&gt;ce&lt;/eType&gt;
					&lt;TypoScript&gt;&lt;![CDATA[
	10= RECORDS
	10.source.current=1
	10.tables = tt_content
	10.wrap = &lt;!--TYPO3SEARCH_begin--&gt; | &lt;!--TYPO3SEARCH_end--&gt;
	20 = COA
	20 {
		10 = RECORDS
		10.tables = tt_content
		10.source = 57
		if {
			value.current = 1
			equals =
		}
	}
                    ]]&gt;&lt;/TypoScript&gt;
...
</pre>
<p>This will insert an extra set of data. The COA-element is a container used only for checking if there is any content. Inside the <strong>20</strong> we will insert the content of the <strong>tt_content-element</strong> with the <strong>uid 57</strong>, if the <strong>current value</strong> is nonexisting.</p>
<p>The uid should be changed to the uid of your choice and it is even possible to insert a comma separated list of multiple uids.</p>
<p>The result should now be, that the content of uid 57 will be shown on every page, if the page does not have any elements add to the field_right section in TemplaVoila.</p>
<p>There you go. A TemplaVoila setup with some default output.</p>
<p><span class="warning">*IMPORTANT* when making updates to the TemplaVoila configuration (mappings etc.) the above changes WILL BE overwriting.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://huuah.com/templavoila-with-default-elements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to setup up different top images in TYPO3</title>
		<link>http://huuah.com/how-to-setup-up-different-top-images-in-typo3/</link>
		<comments>http://huuah.com/how-to-setup-up-different-top-images-in-typo3/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 20:05:00 +0000</pubDate>
		<dc:creator>js - huuah</dc:creator>
				<category><![CDATA[TYPO3]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[TemplaVoila]]></category>
		<category><![CDATA[typoscript]]></category>

		<guid isPermaLink="false">http://huuah.com/?p=90</guid>
		<description><![CDATA[<p>This post will be about how to setup a TYPO3 template, with the option to have a different image on top of each page.</p>
<p>I&#8217;m using TemplaVoila with a very simple setup. 3 fields &#8211; header image, menu and a content-element. The focus will be on the header image element,&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>This post will be about how to setup a TYPO3 template, with the option to have a different image on top of each page.</p>
<p>I&#8217;m using TemplaVoila with a very simple setup. 3 fields &#8211; header image, menu and a content-element. The focus will be on the header image element, which in my case is mapped to a &lt;div&nbsp;&gt; and saved as the type &#8220;<strong>TypoScript Object Path</strong>&#8221; with an &#8220;<strong>Object Path</strong>&#8221; named &#8220;<em>lib.headerimg</em>&#8220;.</p>
<p>The next step is to setup the template to insert an image in the <em>lib.headerimg</em>. This is done by inserting to following into the <strong>Template Setup</strong> field:</p>
<pre class="brush: plain;">
lib.headerimg = IMAGE
lib.headerimg {
  #this is the default image, for pages with no specific image add
  file = fileadmin/default.gif

  #if the selected page has an added image, the set this instead of the default above
  file.import.override.field = media

  #fetch image from the upload/media/ folder
  file.import.data = levelmedia: -1, &quot;slide&quot;
  file.import = uploads/media/

  #lock the configuration to use only the first added image
  file.import.listNum = 0
}</pre>
<p>That&#8217;s it! Save, clear cache and view your site. Every page should now be showing the default.gif image as entered in the template configuration.</p>
<p>To make the image change for a single page, your should go the page property for the page, select the &#8220;<strong>Resources</strong>&#8221; tab and upload an image in the &#8220;<strong>Files</strong>&#8221; section. When the image is uploaded, this page should now be showing the newly added image.</p>
]]></content:encoded>
			<wfw:commentRss>http://huuah.com/how-to-setup-up-different-top-images-in-typo3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
