<?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>TYPO3-Addict &#187; Snippets</title>
	<atom:link href="http://www.typo3-addict.com/category/snippets/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.typo3-addict.com</link>
	<description>For those addicted to TYPO3</description>
	<lastBuildDate>Wed, 06 Jul 2011 08:08:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>TYPO3: Advanced GIFBUILDER use with tt_news</title>
		<link>http://www.typo3-addict.com/2011/05/typo3-advanced-gifbuilder-use-with-tt_news/</link>
		<comments>http://www.typo3-addict.com/2011/05/typo3-advanced-gifbuilder-use-with-tt_news/#comments</comments>
		<pubDate>Sun, 08 May 2011 08:55:09 +0000</pubDate>
		<dc:creator>Maarten</dc:creator>
				<category><![CDATA[Extensions]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[GIFBUILDER]]></category>
		<category><![CDATA[tt_news]]></category>
		<category><![CDATA[TYPO3]]></category>
		<category><![CDATA[Typoscript]]></category>

		<guid isPermaLink="false">http://www.typo3-addict.com/?p=1088</guid>
		<description><![CDATA[In the tutorial we&#8217;re going to make an automatic gifbuilder image, for a tt_news article. We&#8217;re going to use the news image from the tt_news record and overlay it with the title. Onces finish, it will look like this: Step 0: We&#8217;ll start with creating a simple news record: We&#8217;re also going to need a [...]]]></description>
			<content:encoded><![CDATA[<p>In the tutorial we&#8217;re going to make an automatic gifbuilder image, for a tt_news article. We&#8217;re going to use the news image from the tt_news record and overlay it with the title. </p>
<p><span id="more-1088"></span><br />
Onces finish, it will look like this:</p>
<p><a href="http://www.typo3-addict.com/wp-content/uploads/2011/04/tt_news_image.png"><img class="alignnone size-full wp-image-1108" title="The result" src="http://www.typo3-addict.com/wp-content/uploads/2011/04/tt_news_image.png" alt="" width="517" height="177" /></a></p>
<p><strong>Step 0: We&#8217;ll start with creating a simple news record:</strong></p>
<p><a href="http://www.typo3-addict.com/wp-content/uploads/2011/04/Schermafbeelding-2011-04-30-om-15.01.14.png"><img class="alignnone size-medium wp-image-1091" title="A simple news record" src="http://www.typo3-addict.com/wp-content/uploads/2011/04/Schermafbeelding-2011-04-30-om-15.01.14-273x300.png" alt="" width="273" height="300" /></a> <a href="http://www.typo3-addict.com/wp-content/uploads/2011/04/Schermafbeelding-2011-04-30-om-15.01.27.png"><img class="alignnone size-medium wp-image-1092" title="Add the background image to the news record" src="http://www.typo3-addict.com/wp-content/uploads/2011/04/Schermafbeelding-2011-04-30-om-15.01.27-257x300.png" alt="" width="257" height="300" /></a></p>
<p>We&#8217;re also going to need a background image for the final gifbuilder image, so we add that too.</p>
<p>Save the news record once your done.</p>
<p>Our news list will contain nothing more than just the image, since the title and subheader will be printed in there*. This means the tt_news template will look like this:</p>
<pre>&lt;!-- ###TEMPLATE_LIST### begin --&gt;
  &lt;div class="news-latest-container"&gt;
    &lt;!-- ###CONTENT### begin --&gt;
      &lt;!-- ###NEWS### begin --&gt;
        &lt;div class="news-latest-item"&gt;
          ###NEWS_IMAGE###
        &lt;/div&gt;
      &lt;!-- ###NEWS### end--&gt;
    &lt;!-- ###CONTENT###  end --&gt;
  &lt;/div&gt;
&lt;!-- ###TEMPLATE_LIST### end --&gt;</pre>
<p>We now have a basic news list view with nothing more than the tt_news image:</p>
<p><a href="http://www.typo3-addict.com/wp-content/uploads/2011/04/Schermafbeelding-2011-04-30-om-15.07.14.png"><img class="alignnone size-full wp-image-1098" title="The basic tt_news output with just one image." src="http://www.typo3-addict.com/wp-content/uploads/2011/04/Schermafbeelding-2011-04-30-om-15.07.14.png" alt="" width="580" /></a></p>
<p>So how to transform this image into a dynamic image with title and subtitle?</p>
<p><strong>Step 1: Creating a TypoScript template</strong></p>
<p>Create a TypoScript template at the same page your news-list is located. We tell TYPO3 to clear all current configuration regarding the news-list image:</p>
<pre>plugin.tt_news {
  displayList {
    # Remove all configuration
    image &gt;
  }
}</pre>
<p>We just removed all earlier configuration, which means we can start from the beginning.</p>
<p><strong>Step 2: Import the tt_news image</strong></p>
<p>Import the image we want to use as a background, from the tt_news record by inserting the following TypoScript</p>
<pre>plugin.tt_news {
  displayList {
    # Remove all configuration  
    image &gt;

    # Create a new image
    image {
      stdWrap.cObject = IMAGE
      stdWrap.cObject.file = GIFBUILDER
      stdWrap.cObject.file {
        # Width and height of the image
        XY = 517,177

        # First object: Our background image
        10 = IMAGE
        10 {
          offset = 0,0
          file {
            # Import the image from the tt_news record
            import = uploads/pics/
            import.data = field:image
            import.listNum = 0
            import.override.field = image

            # Determine the width and height (crop)
            width = 517c
            height = 177c

            # Set the quality of the image
            ext = jpg
            quality = 100
          }
        }
      }
    } 
  }       
}</pre>
<p>Save the TypoScript template, and have a look at the frontend. You now have:</p>
<p><a href="http://www.typo3-addict.com/wp-content/uploads/2011/04/Schermafbeelding-2011-04-30-om-15.40.47.png"><img class="alignnone size-full wp-image-1100" title="First result with TypoScript :)" src="http://www.typo3-addict.com/wp-content/uploads/2011/04/Schermafbeelding-2011-04-30-om-15.40.47.png" alt="" width="580" /></a></p>
<p><strong>Step 3: Add the transparent box in which the title should be displayed</strong></p>
<p>We need to create another object within our TypoScript setup, to display the transparent box:</p>
<pre>plugin.tt_news {
  displayList {
    # Remove all configuration
    image &gt;

    # Create a new image
    image {
      stdWrap.cObject = IMAGE
      stdWrap.cObject.file = GIFBUILDER
      stdWrap.cObject.file {
        # Width and height of the image
        XY = 517,177

        10 = IMAGE
        [.........]

        20 = BOX
        20 {
          # Offset left, Offset bottom, Width, Height
          dimensions = 10,-10,280,70
          # Start at left bottom
          align = l,b
          # Color of the box
	  color = white
          # Opacity of the box
	  opacity = 75
        }
      }
    }
  }
}</pre>
<p>Again, save the template. You now have:</p>
<p><a href="http://www.typo3-addict.com/wp-content/uploads/2011/04/Schermafbeelding-2011-04-30-om-15.53.59.png"><img class="alignnone size-full wp-image-1104" title="The tt_news image now has a transparent box" src="http://www.typo3-addict.com/wp-content/uploads/2011/04/Schermafbeelding-2011-04-30-om-15.53.59.png" alt="" width="580" /></a></p>
<p><strong>Step 4: Insert the tt_news title</strong></p>
<p>Create yet another object in your TypoScript setup, and get the title from the tt_news record:</p>
<pre>
plugin.tt_news {
  displayList {
    # Remove all configuration
    image >

    # Create a new image
    image {
      stdWrap.cObject = IMAGE
      stdWrap.cObject.file = GIFBUILDER
      stdWrap.cObject.file {
        # Width and height of the image
        XY = 517,177

        # First object: Our background image
        10 = IMAGE
        10 {
          offset = 0,0
          file {
            # Import the image from the tt_news record
            import = uploads/pics/
            import.data = field:image
            import.listNum = 0
            import.override.field = image

            # Determine the width and height (crop)
            width = 517c
            height = 177c

            # Set the quality of the image
            ext = jpg
            quality = 100
          }
        }
        20 = BOX
        20 {
          # Offset left, Offset bottom, Width, Height
          dimensions = 10,-10,280,70
          # Start at left bottom
          align = l,b
          # Color of the box
	  color = white
          # Opacity of the box
	  opacity = 75
        }
        30 = TEXT
        30 {
          text.data = field:title
          align = left
	  offset = 15,120
	  fontSize = 20
	  color = black
	}
      }
    }
  }
}
</pre>
<p><strong>We&#8217;re finished:</strong></p>
<p><a href="http://www.typo3-addict.com/wp-content/uploads/2011/04/Schermafbeelding-2011-04-30-om-16.12.53.png"><img class="alignnone size-full wp-image-1110" title="Finished..." src="http://www.typo3-addict.com/wp-content/uploads/2011/04/Schermafbeelding-2011-04-30-om-16.12.53.png" alt="" width="580" /></a></p>
<p>If all went well, you should now be able to insert a subheader or any other tt_news field into the image as well. Hope you liked this tutorial, if you did please leave a comment.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.typo3-addict.com/2011/05/typo3-advanced-gifbuilder-use-with-tt_news/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>TYPO3: Ajax login box with ods_ajaxfelogin</title>
		<link>http://www.typo3-addict.com/2011/05/typo3-ajax-login-box-with-ods_ajaxfelogin/</link>
		<comments>http://www.typo3-addict.com/2011/05/typo3-ajax-login-box-with-ods_ajaxfelogin/#comments</comments>
		<pubDate>Tue, 03 May 2011 09:09:53 +0000</pubDate>
		<dc:creator>Maarten</dc:creator>
				<category><![CDATA[Extensions]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Login]]></category>
		<category><![CDATA[Typoscript]]></category>

		<guid isPermaLink="false">http://www.typo3-addict.com/?p=1074</guid>
		<description><![CDATA[With the all new AJAX powered TYPO3 backend, the default frontend loginbox looks like old and slow technology&#8230; In this tutorial I will turn the default TYPO3 loginbox into an AJAX-powered loginbox with the extension ods_ajaxfelogin. First: Import the extension through the TYPO3 Extension Manager: You might need to install two additional extensions: xajax (for [...]]]></description>
			<content:encoded><![CDATA[<p>With the all new AJAX powered TYPO3 backend, the default frontend loginbox looks like old and slow technology&#8230; In this tutorial I will turn the default TYPO3 loginbox into an AJAX-powered loginbox with the extension <a title="Download the extension" href="http://typo3.org/extensions/repository/view/ods_ajaxfelogin/current/">ods_ajaxfelogin</a>.</p>
<p><span id="more-1074"></span>First: Import the extension through the TYPO3 Extension Manager:</p>
<p><a href="http://www.typo3-addict.com/wp-content/uploads/2011/04/Schermafbeelding-2011-04-29-om-16.01.52.png"><img class="size-full wp-image-1075 alignnone" title="Import the extension for TER" src="http://www.typo3-addict.com/wp-content/uploads/2011/04/Schermafbeelding-2011-04-29-om-16.01.52.png" alt="" width="500" /></a></p>
<p>You might need to install two additional extensions: xajax (for ajax support) and the default TYPO3 loginbox which is already available but not active.</p>
<p><a href="http://www.typo3-addict.com/wp-content/uploads/2011/04/Schermafbeelding-2011-04-29-om-16.02.07.png"><img class="alignnone size-full wp-image-1078" title="Install additional extensions" src="http://www.typo3-addict.com/wp-content/uploads/2011/04/Schermafbeelding-2011-04-29-om-16.02.07.png" alt="" width="500" /></a></p>
<p>We now have all necessary extensions.</p>
<p>Insert a loginbox into a page, by selecting the regular default login content element. If this is your first loginbox, please create a usergroup and a user first, preferably in a System Folder. In the login content element, point the startingpoint to this System Folder.</p>
<p><a href="http://www.typo3-addict.com/wp-content/uploads/2011/04/Schermafbeelding-2011-04-29-om-16.03.34.png"><img class="alignnone size-full wp-image-1079" title="Select the default 'login' content element" src="http://www.typo3-addict.com/wp-content/uploads/2011/04/Schermafbeelding-2011-04-29-om-16.03.34.png" alt="" width="500" /></a></p>
<p>If you&#8217;re familiar with the default TYPO3 login box, you&#8217;ll notice nothing has actually changed in the frontend. To make the ajax-magic work, you should make some (small) template adjustments. The extension (ods_ajaxfelogin) provides a ready-to-use template, which is basically the same default template but with those small adjustments.</p>
<p>To make use of this template, we need to tell TYPO3 to use this template, instead of the default one. Create a TypoScript template and put the following inside the &#8216;setup&#8217; area:</p>
<pre># Custom template for the TYPO3 loginbox
plugin.tx_felogin_pi1 {
	templateFile = EXT:ods_ajaxfelogin/felogin.html
}</pre>
<p>In the code above I use the template provided by ods_ajaxfelogin, but you might way to copy the contents of this file and create your own file. This way you can make adjustments according to your design needs.</p>
<p>After you applied the code above, you should have an AJAX-powered loginbox in the frontend.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.typo3-addict.com/2011/05/typo3-ajax-login-box-with-ods_ajaxfelogin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TYPO3: RTE embed / iframe tag</title>
		<link>http://www.typo3-addict.com/2011/04/typo3-rte-embed-iframe-tag-tt_news/</link>
		<comments>http://www.typo3-addict.com/2011/04/typo3-rte-embed-iframe-tag-tt_news/#comments</comments>
		<pubDate>Thu, 28 Apr 2011 13:52:43 +0000</pubDate>
		<dc:creator>Maarten</dc:creator>
				<category><![CDATA[RTE]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[TSConfig]]></category>
		<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Typoscript]]></category>

		<guid isPermaLink="false">http://www.typo3-addict.com/?p=1052</guid>
		<description><![CDATA[According to Google Analytics a lot of people are currently looking for a way to use embed tags within the (tt_news) RTE. By default the TYPO3 RTE will remove these embed tags, but it&#8217;s fairly easy to change this. In this tutorial I&#8217;ll show you how to insert an iframe, within the TYPO3 RTE. Embedding [...]]]></description>
			<content:encoded><![CDATA[<p>According to Google Analytics a lot of people are currently looking for a way to use embed tags within the (tt_news) RTE. By default the TYPO3 RTE will remove these embed tags, but it&#8217;s fairly easy to change this. In this tutorial I&#8217;ll show you how to insert an iframe, within the TYPO3 RTE.</p>
<p><span id="more-1052"></span><br />
<strong>Embedding a Vimeo video </strong></p>
<p>Vimeo uses an iframe:<br />
<iframe src="http://player.vimeo.com/video/16458561?title=0&amp;byline=0&amp;portrait=0" frameborder="0" height="225" width="400"></iframe></p>
<pre>&lt;iframe src="http://player.vimeo.com/video/16458561?title=0&amp;amp;byline=0&amp;amp;portrait=0" frameborder="0" height="225" width="400"&gt;&lt;/iframe&gt;</pre>
<p>The most obvious way would be: Switch to HTML modus in the RTE, paste the code and save the content element. But as you might have experienced, this way you&#8217;ll end up with a nice HTML embed code printed in the frontend. Not so useful&#8230;</p>
<p><strong>How to fix this?!</strong><br />
Since Vimeo uses an iframe, we need to make sure the RTE accepts this iframe-tag. So we need to change RTE behaviour when saving the content element or tt_news record. Insert the following TSConfig configuration into the Page TSConfig field:</p>
<pre>RTE.default.proc.allowTags := addToList(iframe)
RTE.default.proc.entryHTMLparser_db.allowTags := addToList(iframe)</pre>
<p>If you want to insert the iframe outside of a block tag like a P or a DIV, than you&#8217;ll need to following as well:</p>
<pre>
RTE.default.proc.allowTagsOutside := addToList(iframe)
</pre>
<p>Now the RTE will preserve the iframe when saving. But&#8230; still no iframe in the frontend! <img src='http://www.typo3-addict.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /><br />
The extension css_styled_content doesn&#8217;t render an iframe by default, so let&#8217;s change this:</p>
<p>In your TypoScript constants add the iframe to the following (default) code:</p>
<pre>styles.content.links {
  allowTags  (
         b,i,u,a,img,br,div,center,pre,font,hr,sub,sup,p,strong,
         em,li,ul,ol,blockquote,strike,del,ins,span,h1,h2,h3,h4,
         h5,h6,address,iframe
  )
}</pre>
<p>Take a look in the frontend <img src='http://www.typo3-addict.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  If everything went well you can now see the Vimeo videoplayer.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.typo3-addict.com/2011/04/typo3-rte-embed-iframe-tag-tt_news/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>TYPO3: Replace RTE content through TypoScript</title>
		<link>http://www.typo3-addict.com/2011/04/typo3-replace-rte-content-through-typoscript/</link>
		<comments>http://www.typo3-addict.com/2011/04/typo3-replace-rte-content-through-typoscript/#comments</comments>
		<pubDate>Fri, 08 Apr 2011 18:49:24 +0000</pubDate>
		<dc:creator>Maarten</dc:creator>
				<category><![CDATA[RTE]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[TYPO3]]></category>
		<category><![CDATA[Typoscript]]></category>

		<guid isPermaLink="false">http://www.typo3-addict.com/?p=1013</guid>
		<description><![CDATA[Ever wanted to replace a single word throughout a whole TYPO3 website? Of even better: You know it will have to be changed in time? Like a year or a name? The solution is quite simple yet not seen as often as you might think. Most people know they can set a TypoScript constant to [...]]]></description>
			<content:encoded><![CDATA[<p>Ever wanted to replace a single word throughout a whole TYPO3 website? Of even better: You know it will have to be changed in time? Like a year or a name? The solution is quite simple yet not seen as often as you might think. Most people know they can set a TypoScript constant to easily change a TypoScript setup value along the way, but your actual content is most of the time written in the RTE. With this little TypoScript snippet you can replace RTE content with something else.</p>
<p><span id="more-1013"></span></p>
<p>Example 1: We want our customers to contact us by phone, but the phone number changes all the time.</p>
<p>RTE content:</p>
<pre>Please call us: phonenumber</pre>
<p>In TypoScript:</p>
<pre>page {
  stdWrap.parseFunc.short {
    phonenumber =  + 1 555-3141
  }
}</pre>
<p>In the frontend &#8216;phonenumber&#8217; will now be replaced with the actual number. Quite easy. Combined with <a title="TYPO3: How to use TypoScript Conditions" href="http://www.typo3-addict.com/2009/11/typo3-how-to-use-typoscript-conditions/">TypoScript conditions</a>, this is a really powerful way of content rendering.</p>
<p>Example 2: We want customers to call a different phone number during business hours.</p>
<p>RTE content:</p>
<pre>Please call us: phonenumber</pre>
<p>In TypoScript:</p>
<pre>[hour =&lt; 9] &amp;&amp; [hour =&gt;18]
page {
  stdWrap.parseFunc.short {
    phonenumber =  + 1 555-3141
  }
}
[else]
page {
  stdWrap.parseFunc.short {
    phonenumber =  + 1 555-5131
  }
}
[end]</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.typo3-addict.com/2011/04/typo3-replace-rte-content-through-typoscript/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>TYPO3: A basic HTML5 tutorial</title>
		<link>http://www.typo3-addict.com/2011/04/typo3-a-basic-html5-tutorial/</link>
		<comments>http://www.typo3-addict.com/2011/04/typo3-a-basic-html5-tutorial/#comments</comments>
		<pubDate>Sat, 02 Apr 2011 19:52:45 +0000</pubDate>
		<dc:creator>Maarten</dc:creator>
				<category><![CDATA[Snippets]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[TYPO3]]></category>

		<guid isPermaLink="false">http://www.typo3-addict.com/?p=1018</guid>
		<description><![CDATA[Although TYPO3 is fully HTML5 capable, you need some TypoScript changes to make things work accordingly. The most obvious changes of HTML5 are the new doctype and the new HTML tags used in your template. So let&#8217;s see what we need to do to make things work the HTML5 way. First of all lets render [...]]]></description>
			<content:encoded><![CDATA[<p>Although TYPO3 is fully HTML5 capable, you need some TypoScript changes to make things work accordingly. The most obvious changes of HTML5 are the new doctype and the new HTML tags used in your template. So let&#8217;s see what we need to do to make things work the HTML5 way.</p>
<p>First of all lets render the appropriate doctype. <span id="more-1018"></span>TYPO3 by default renders a HTML 4.0 transitional doctype, we&#8217;re changing it to a HTML5 doctype using:</p>
<pre>config.doctype = html5</pre>
<p>HTML5 doesn&#8217;t have a XML Prologue, so let&#8217;s remove it:</p>
<pre>config.xmlprologue = none</pre>
<p>Now, we want to make use of the new &lt;section&gt; tag which requires us to override some predefined TypoScript.</p>
<pre>Definition and Usage: The &lt;section&gt; tag defines sections in a
document. Such as chapters, headers, footers, or any other
sections of the document.</pre>
<p>This DOES NOT indicate all &lt;div&gt; tags should be replaced! If fact, the &lt;section&gt; tag should be used on all elements which have a header and some text. In TYPO3 this means every content element should be a section by default, instead of a div. So let&#8217;s make that happen:</p>
<pre># Change &lt;div id="c#"&gt; in &lt;section id="c#"&gt;
tt_content.stdWrap.innerWrap.cObject.default {
  10.value = &lt;section id="c{field:uid}"
  30.value = &gt;|&lt;/section&gt;
}</pre>
<p>Your &lt;header&gt;, &lt;footer&gt; and &lt;nav&gt; will have their own tags in HTML5, so no more div tags here. If you&#8217;re using the autoparser you need to extend the tags which should be parsed.</p>
<pre>plugin.tx_automaketemplate_pi1 {
   elements {
       BODY.all = 1
       BODY.all.subpartMarker = DOCUMENT_BODY

       DIV.all = 1
       HEADER.all = 1
       FOOTER.all = 1
       NAV.all = 1
   }
}</pre>
<p>We want people to view our Awesome-Cool-TYPO3-HTML5-website in a decent browser like FireFox 4 or Chrome, but that&#8217;s wishful thinking. So let&#8217;s add some IE compatibility for all those people on IE 7 and 8.</p>
<pre># Insert HTML5 compatibility for older browsers
[browser = msie]&amp;&amp;[version = &lt;9]
page.includeJS {
	file1 = http://html5shiv.googlecode.com/svn/trunk/html5.js
	file1.external = 1
}
[end]</pre>
<p>You now have a basic HTML5 website, enjoy. Maybe I&#8217;ll add some more things later <img src='http://www.typo3-addict.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.typo3-addict.com/2011/04/typo3-a-basic-html5-tutorial/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>TYPO3: Click and Enlarge in RTE tt_news</title>
		<link>http://www.typo3-addict.com/2010/06/typo3-click-and-enlarge-in-rte-tt_news/</link>
		<comments>http://www.typo3-addict.com/2010/06/typo3-click-and-enlarge-in-rte-tt_news/#comments</comments>
		<pubDate>Wed, 02 Jun 2010 12:55:32 +0000</pubDate>
		<dc:creator>Maarten</dc:creator>
				<category><![CDATA[Extensions]]></category>
		<category><![CDATA[RTE]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[tt_news]]></category>
		<category><![CDATA[Typoscript]]></category>

		<guid isPermaLink="false">http://www.typo3-addict.com/?p=990</guid>
		<description><![CDATA[I needed an image in the RTE to support the &#8216;click and enlarge&#8217; option in tt_news. Now, I used Google to find a solution but no luck, although it seems I&#8217;m not the only one trying to make this work. Looks like this isn&#8217;t as easy as it would sound.. Read more for the solution! [...]]]></description>
			<content:encoded><![CDATA[<p>I needed an image in the RTE to support the &#8216;click and enlarge&#8217; option in tt_news. Now, I used Google to find a solution but no luck, although it seems I&#8217;m not the only one trying to make this work. Looks like this isn&#8217;t as easy as it would sound..</p>
<p>Read more for the solution!</p>
<p><span id="more-990"></span></p>
<p><strong>How to set the click and enlarge option for the RTE in tt_news:</strong></p>
<p>Step 1:<br />
Include the static template: Clickenlarge Rendering (rtehtmlarea)</p>
<p>Now the click and enlarge rendering should work for normal content elements, but still no result for tt_news.</p>
<p>Step 2:<br />
Add the following TypoScript to your setup:</p>
<pre>
# Rendering RTE tt_news. Use the normal RTE parseFunc
# configuration for tt_news rte content
plugin.tt_news {
        general_stdWrap {
   	      parseFunc < tt_content.text.20.parseFunc
        }
}
</pre>
<p>Your Done <img src='http://www.typo3-addict.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>It turns out tt_news uses another way of rendering the RTE, so this should be reversed.</p>
<p>Update: It seems this snippet is actually part of the tt_news static template but out-commented... makes me wonder why?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.typo3-addict.com/2010/06/typo3-click-and-enlarge-in-rte-tt_news/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TYPO3: Hide records from static_info_tables in the rootpage</title>
		<link>http://www.typo3-addict.com/2010/05/hide-records-from-static_info_tables-in-the-rootpage/</link>
		<comments>http://www.typo3-addict.com/2010/05/hide-records-from-static_info_tables-in-the-rootpage/#comments</comments>
		<pubDate>Wed, 05 May 2010 08:50:26 +0000</pubDate>
		<dc:creator>Maarten</dc:creator>
				<category><![CDATA[Snippets]]></category>
		<category><![CDATA[TSConfig]]></category>
		<category><![CDATA[Configuration]]></category>

		<guid isPermaLink="false">http://blog.mmwebdesign.eu/?p=70</guid>
		<description><![CDATA[After you installed static_info_tables in your TYPO3 installtion, you get a whole bunch of records displayed in the rootpage. This really slows down the page, which isn&#8217;t funny when you work a lot with usergroups. You can hide all of these records with a simple line in your BE-User-TSConfig. Insert the following User TSConfig into [...]]]></description>
			<content:encoded><![CDATA[<p>After you installed static_info_tables in your TYPO3 installtion, you get a whole bunch of records displayed in the rootpage. This really slows down the page, which isn&#8217;t funny when you work a lot with usergroups. You can hide all of these records with a simple line in your BE-User-TSConfig.<span id="more-70"></span></p>
<p>Insert the following User TSConfig into your own userrecord or in the usergroup to which you belong (i.e. Admins).</p>
<pre>mod.web_list.hideTables=static_template, static_countries,
static_country_zones, static_currencies, static_languages,
static_territories, static_taxes, static_markets</pre>
<p><strong>IMPORTANT:</strong><br />
I had to use spaces in the code above in order to display it right. DON&#8217;T use them in your TSConfig!</p>
<p><!-- .googleAdsenseTop {  display: none; } --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.typo3-addict.com/2010/05/hide-records-from-static_info_tables-in-the-rootpage/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>TYPO3: Create a custom header layout</title>
		<link>http://www.typo3-addict.com/2010/03/a-custom-header-layout/</link>
		<comments>http://www.typo3-addict.com/2010/03/a-custom-header-layout/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 09:17:32 +0000</pubDate>
		<dc:creator>Maarten</dc:creator>
				<category><![CDATA[Snippets]]></category>
		<category><![CDATA[Headers]]></category>
		<category><![CDATA[Typoscript]]></category>

		<guid isPermaLink="false">http://www.typo-addict.com/?p=365</guid>
		<description><![CDATA[By default, TYPO3 has five default header layouts from which to choose. Each correspond to the H1 to H5 tags. With this TypoScript snippet you can adjust one of them and set it to your own needs. For example a header with a date attached to it. This way you can make a header like: [...]]]></description>
			<content:encoded><![CDATA[<p>By default, TYPO3 has five default header layouts from which to choose. Each correspond to the H1 to H5 tags. With this TypoScript snippet you can adjust one of them and set it to your own needs. For example a header with a date attached to it. This way you can make a header like: Latest news of {date}. Or what about: Welcome back {username}?</p>
<p><span id="more-365"></span></p>
<h4>A header with a date attached:</h4>
<pre># Overwrite layout 5
# Create an array of objects
lib.stdheader.10.5 = COA
lib.stdheader.10.5 {
   # First object is a copy of the default header layout 1,
   # so the basic input is printed. (e.g. the field 'header')
   10 &lt; lib.stdheader.10.1
   10.fontTag = &lt;h2{register:headerStyle}{register:headerClass}&gt;|

   # Second object: The date which we want to be appended.
   20 = TEXT
   20 {
      data = date:U
      strftime = %A %e %B
   }

   # Third object: Closing the H2 tag which we opened
   # in the first object.
   30 = TEXT
   30.value = &lt;/h2&gt;
}</pre>
<h4>A header with the username</h4>
<pre># Overwrite layout 5
# Create an array of objects
lib.stdheader.10.5 = COA
lib.stdheader.10.5 {
   # First object is a copy of the default header layout 1,
   # so the basic input is printed. (e.g. the field 'header')
   10 &lt; lib.stdheader.10.1
   10.fontTag = &lt;h2{register:headerStyle}{register:headerClass}&gt;|

   # Second object: insert the username.
   20 = TEXT
   20.value = {TSFE:fe_user|user|name}
   20.insertData = 1

   # Third object: Closing the H2 tag which we opened
   # in the first object.
   30 = TEXT
   30.value = &lt;/h2&gt;
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.typo3-addict.com/2010/03/a-custom-header-layout/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>TYPO3: A multiple line graphical header</title>
		<link>http://www.typo3-addict.com/2010/01/typo3-a-multiple-line-graphical-header/</link>
		<comments>http://www.typo3-addict.com/2010/01/typo3-a-multiple-line-graphical-header/#comments</comments>
		<pubDate>Sun, 17 Jan 2010 19:01:32 +0000</pubDate>
		<dc:creator>Maarten</dc:creator>
				<category><![CDATA[Snippets]]></category>
		<category><![CDATA[GIFBUILDER]]></category>
		<category><![CDATA[Headers]]></category>
		<category><![CDATA[Typoscript]]></category>
		<category><![CDATA[Web design]]></category>

		<guid isPermaLink="false">http://www.typo3-addict.com/?p=855</guid>
		<description><![CDATA[Graphical headers can be just that little extra thing your design needs. Luckily TYPO3 can manage this pretty well using the GIFBUILDER. But what if you have a long headertext? What if you need the headertext to display over more than just one line? GIFBUILDER can&#8217;t actually read your headertext so there&#8217;s no way it [...]]]></description>
			<content:encoded><![CDATA[<p>Graphical headers can be just that little extra thing your design needs. Luckily TYPO3 can manage this pretty well using the GIFBUILDER. But what if you have a long headertext? What if you need the headertext to display over more than just one line?</p>
<p>GIFBUILDER can&#8217;t actually read your headertext so there&#8217;s no way it can determine when to use multiple lines by itself (at least, not without making weird cuts in the middle of your words). Therefore, we need to tell GIFBUILDER when to break the line.</p>
<p><span id="more-855"></span>Since we only use one H1 tag per seo, this snippet modifies the second header layout.</p>
<pre># Start overriding the second header layout.
lib.stdheader.10.2 &gt;
lib.stdheader.10.2 = COA
lib.stdheader.10.2 {
  # Wrap the whole header
  wrap = &lt;div&gt;|&lt;/div&gt;
  10 = IMAGE
  10 {
     # Wrap the first line
     wrap = &lt;div&gt;|&lt;/div&gt;
     file = GIFBUILDER
     file {
        XY = [10.w] + 4, [10.h] + 8
        backColor = #FFFFFF
        10 = TEXT
        10 {
           text.field = header
           # Set the fontfile and font-properties.
           fontFile = fileadmin/fonts/customfont.ttf
           fontSize = 22
           fontColor = #000000
           offset = 0,18
           # Select the first line of our sentence.
           text.listNum = 0
           # Here we determine the break, in this case a pipe (|).
           text.listNum.splitChar = |
        }
     }
  }
  # Check if the second line is there...
  20 = COA
  20.if {
     value.field = header
     isTrue.cObject = TEXT
     isTrue.cObject.field = header
     # The second line starts after the pipe
     isTrue.cObject.listNum.splitChar = |
     # Now use the second line of our sentence
     isTrue.cObject.listNum = 1
  }
  # If the second line is there, use the same markup
  20.10 &lt; .10
  20.10 {
     file {
        10.text.listNum = 1
        10.text.listNum.splitChar = |
     }
  }
}
</pre>
<p>Just to be clear: A header with two lines would now be like:<br />
This is a very long header which will | be displayed over two lines.</p>
<p><a href="http://www.typo3-addict.com/wp-content/uploads/2010/01/header_entry.png"><img class="size-full wp-image-871 alignnone" title="header_entry" src="http://www.typo3-addict.com/wp-content/uploads/2010/01/header_entry.png" alt="" width="552" height="52" /></a></p>
<p>Result:</p>
<p><a href="http://www.typo3-addict.com/wp-content/uploads/2010/01/result.png"><img class="size-full wp-image-872 alignnone" title="result" src="http://www.typo3-addict.com/wp-content/uploads/2010/01/result.png" alt="" width="418" height="115" /></a></p>
<p>The pipe will be the place where you split the header. Ofcourse, all the font properties used in the first line are also available in the second line, so play all you like with different fonts and markup on every other line.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.typo3-addict.com/2010/01/typo3-a-multiple-line-graphical-header/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>TYPO3: How to use TypoScript Conditions</title>
		<link>http://www.typo3-addict.com/2009/11/typo3-how-to-use-typoscript-conditions/</link>
		<comments>http://www.typo3-addict.com/2009/11/typo3-how-to-use-typoscript-conditions/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 10:10:23 +0000</pubDate>
		<dc:creator>Maarten</dc:creator>
				<category><![CDATA[Snippets]]></category>
		<category><![CDATA[Conditions]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Typoscript]]></category>

		<guid isPermaLink="false">http://www.typo3-addict.com/?p=828</guid>
		<description><![CDATA[A TypoScript condition is a powerful and easy way of telling TYPO3 when to execute a piece of TypoScript. In this tutorial I&#8217;ll explain the basics of such a condition and how to use one. Conditions are very similar to a PHP if-statement and should be easy to use if you understand the principles of [...]]]></description>
			<content:encoded><![CDATA[<p>A TypoScript condition is a powerful and easy way of telling TYPO3 when to execute a piece of TypoScript. In this tutorial I&#8217;ll explain the basics of such a condition and how to use one. Conditions are very similar to a PHP if-statement and should be easy to use if you understand the principles of PHP if, elseif and else.</p>
<p><span id="more-828"></span>A condition always consists of 2 brackets with a statement in the middle:</p>
<pre>[your-statement]</pre>
<p>Multiple conditions can be combined by using so called operators: &amp;&amp; (AND) or || (OR), if no operator is defined the default will be OR.</p>
<p>Example 1: Load ie.css only when the browser is IE</p>
<pre>[browser = msie]
page.includeCSS {
   1 = fileadmin/ie.css
}
[end]</pre>
<p>Example 2: Load ie6.css only when the browser is IE and the version is lower than 7</p>
<pre>[browser = msie] &amp;&amp; [version = &lt;7]
page.includeCSS {
   1 = fileadmin/ie6.css
}
[end]</pre>
<p>Example 3: Load ie stylesheet when the browser is IE, load normal stylesheet with all other browsers</p>
<pre>[browser = msie] &amp;&amp; [version = &lt;7]
page.includeCSS {
   1 = fileadmin/ie.css
}
[else]
page.includeCSS {
   1 = fileadmin/style.css
}
[end]</pre>
<p>Example 4: Use the time to accordingly greet your visitor</p>
<pre># Display 'Good Morning before 12 o'clock
[hour =&lt; 12]
lib.greeting = TEXT
lib.greeting {
    value = Good Morning!
}
[else]
# Display 'Good Day' after 12 o'clock
lib.greeting = TEXT
lib.greeting {
    value = Good Day!
}
[end]</pre>
<p>Let&#8217;s make things a little bit more interesting.</p>
<p>Example 5: We want to include some records (from page id 250) in our left_column div but only on page id 100 or a subpage of this page!</p>
<pre># First we define the content of the 'left_column' div:
left_column = COA
left_column {
   10 &lt; lib.regularContent
   20 &lt; lib.specialContent
}

# Display the lib.specialContent only on page id 100 or a subpage
[PIDinRootline = 100]
lib.specialContent = CONTENT
lib.specialContent {
   table = tt_content
   select {
      pidInList = 250
      orderBy = sorting
      languageField = sys_language_uid
   }
}
[end]</pre>
<p>I could make a hundred examples but when you know to basics it isn&#8217;t that hard. If you want to know more about these conditions please read chapter 4 of the TSRef:<br />
<a title="TypoScript Conditions" href="http://typo3.org/documentation/document-library/references/doc_core_tsref/4.1.0/view/4/1/">http://typo3.org/documentation/document-library/references/doc_core_tsref/4.1.0/view/4/1/</a></p>
<p>If you have any questions don&#8217;t hesitate to ask!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.typo3-addict.com/2009/11/typo3-how-to-use-typoscript-conditions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

