<?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; GIFBUILDER</title>
	<atom:link href="http://www.typo3-addict.com/tag/gifbuilder/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.typo3-addict.com</link>
	<description>For those addicted to TYPO3</description>
	<lastBuildDate>Wed, 02 Jun 2010 13:03:58 +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>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: 5 things about tt_news</title>
		<link>http://www.typo3-addict.com/2009/10/5-things-you-should-know-about-tt_news/</link>
		<comments>http://www.typo3-addict.com/2009/10/5-things-you-should-know-about-tt_news/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 07:32:22 +0000</pubDate>
		<dc:creator>Maarten</dc:creator>
				<category><![CDATA[Extensions]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[Configuration]]></category>
		<category><![CDATA[GIFBUILDER]]></category>
		<category><![CDATA[tt_news]]></category>
		<category><![CDATA[Typoscript]]></category>

		<guid isPermaLink="false">http://www.typo3-addict.com/?p=610</guid>
		<description><![CDATA[In this post I'll show you 5 things about tt_news which might be nice to know about tt_news. We discuss a better pagebrowser, loading tt_news without cache and making images perfectly square by generating them automatically.]]></description>
			<content:encoded><![CDATA[<p>The tt_news extension is the most popular extension of TYPO3. No wonder, since it&#8217;s very flexible and can be used for much more than just handling newsitems. In this post I&#8217;ll show you 5 things about tt_news which might be nice to know about tt_news.</p>
<h4>1) A better pagebrowser</h4>
<p>By default, the tt_news pagebrowser is not very nice. Nor can it be easily styled. Inside tt_news there&#8217;s a &#8216;hidden&#8217; pagebrowser which is better, and much more flexible. To activate this better pagebrowser put the following into your template Setup section:<br />
<span id="more-610"></span></p>
<pre>#-----------------------------------
# A better tt_news pagebrowser
#-----------------------------------

plugin.tt_news {
  usePiBasePagebrowser = 1     # This activates the better pagebrowser
  pageBrowser {                # Here you can configure the better pagebrowser
    maxPages = 7                  # Maximum browserpage links
    showResultCount = 1           # Display the sentence: ** till ** out of ** messages
    showRange = 1                 # Will look like "Items: <span style="text-decoration: underline;">1-5</span> <span style="text-decoration: underline;">6-10</span>" instead of "Page <span style="text-decoration: underline;">1</span> <span style="text-decoration: underline;">2</span> <span style="text-decoration: underline;">3</span> <span style="text-decoration: underline;">4</span>"
    showPBrowserText = 0          # Prepends "<span style="text-decoration: underline;">1</span> <span style="text-decoration: underline;">2</span> <span style="text-decoration: underline;">3</span>" like "<span style="text-decoration: underline;">page 1</span> <span style="text-decoration: underline;">page 2</span> <span style="text-decoration: underline;">page 3</span>", only when showRange = 0
    dontLinkActivePage = 1        # No need to link the active page
    showFirstLast = 0             # Show a first / last link, 0 since there already is a previous / next link.
  }
}

#-----------------------------------
# Locallang for the tt_news pagebrowser
#-----------------------------------

plugin.tt_news {
  _LOCAL_LANG.default {
    pi_list_browseresults_displays = Newsitem ###FROM### till ###TO### out of ###OUT_OF### newsitems.
    pi_list_browseresults_first = First page
    pi_list_browseresults_last = Last page
    pi_list_browseresults_page = Page
    pi_list_browseresults_prev = &lt; Previous
    pi_list_browseresults_next = Next &gt;
  }
}</pre>
<h4>2) Do not display duplicate items</h4>
<p>If you have more than one tt_news plugin on your page, this can be nice. For example: The first plugin only shows the last newsitem, the second plugin the 5 most recent newsitems. The most recent newsitem is now shown by both the plugins. You can tell tt_news to only show newsitems once. This only works for List mode plugins. Put the following lines into your template Setup section:</p>
<pre>#-----------------------------------
# Only show newsitems once per page.
#-----------------------------------

plugin.tt_news {
  excludeAlreadyDisplayedNews = 1
}</pre>
<p>If &#8220;excludeAlreadyDisplayedNews&#8221; is enabled &#8220;excludeLatestFromList&#8221; and &#8220;listStartId&#8221; will be ignored. This is no problem, since both these fields are deprecated. Be aware this might break your archive links.</p>
<h4>3) Generate a tt_news image automatically when no image is available</h4>
<p>If your template design forces you to upload a photo with every newsitem, this can be helpful. The following code will generate a &#8220;No image&#8221; image using GIFBUILDER. Put this code in your template Setup section:</p>
<pre>#-----------------------------------
# Generate a tt_news image automatically when no image is available.
# In this snippet: Latest mode
#-----------------------------------

plugin.tt_news.displayLatest.image.noImage_stdWrap {
  cObject = IMAGE
  cObject {
    # Wrap the image with a div tag
    wrap = &lt;div&gt;|&lt;/div&gt;
    # Use GIFBUILDER to create an image
    file = GIFBUILDER
    file {
      # Define the width and height of the image.
      XY = 125,125
      # Define the background color of the image.
      backColor = #FFFFFF

      # First object in the image: TEXT
      10 = TEXT
      10 {
        # The actual text which is displayed in the image
        text = No image available
        # The fontsize
        fontSize = 16
        # niceText to make the text more natural. This can be good or bad depending on your server configuration.
        niceText = 1
        # Color of the text
        fontColor = #000000
        # Coordinates where your text should appear in the image. Width / Height
        offset = 125/2-32,125/2+4
      }
    }
  }
}</pre>
<h4>4) Load tt_news without cache; for example random news.</h4>
<p>If you want to display newsrecords random, set the viewmode to LIST or LATEST and set the &#8217;order by&#8217; field to &#8216;randomise order&#8217;. The tricky part here is that your plugin shouldn&#8217;t be cached, since that would destroy the whole random idea. Ofcourse you can set the whole page to &#8216;no cache&#8217; but this would kill your performance. Better is to just tell tt_news to use no cache. It will still cost you some performance but, it&#8217;s better than not caching the whole page. To setup tt_news without cache put the following code  into your template Setup section:</p>
<pre>#-----------------------------------
# Run tt_news without cache, remember to unset in deeper levels!
#-----------------------------------

plugin.tt_news = USER_INT</pre>
<p>This will load the tt_news plugin as a USER_INT object and render it without cache, outside of the main pagerendering. This way your page will be called from cache but the plugin will be non-cached. Just be sure to un-set this rendering on a deeper pagelevel since TypoScript is inherited from levels above.</p>
<h4>5) Perfectly square tt_news images.</h4>
<p>By default tt_news allows you to set the maximum width and height for an image in LIST or LATEST mode. Width and height are adjusted automatically when one exceeds the other. But what if you want a perfectly square image no matter what photo is being uploaded? CSS seems to be the only way to do this but there&#8217;s a solution which is better..</p>
<p>Ever noticed TYPO3 is able to crop images as soon as resizing isn&#8217;t posible anymore? An example: we have an image of 400 x 300 pixels, we want a picture of 30 x 30. What it does is it resizes the image to 40 x 30 pixels and than crops the width to 30 pixels. But that&#8217;s TYPO3.. not tt_news.</p>
<p>To enable this for tt_news you need to put the following code into your tempate Setup section:</p>
<pre>#-----------------------------------
# Generate a perfectly square tt_news image.
# In this snippet: Latest mode
#-----------------------------------

plugin.tt_news {
    # This only affects the LATEST mode, to use LIST mode change to 'displayList'
    displayLatest {
        # Unset the default tt_news maximum width and height parameter
        image.file.maxW &gt;
        image.file.maxH &gt;
        # Call the TYPO3 way to render images, setting it to 90 pixels; cropping mode (c)
        image.file.width  = 90c
        image.file.height = 90c
        # Make the images SEO, using the caption as Alt tag.
        image.altText.field = imagecaption
    }
}</pre>
<p>Now, the image will be resized untill the given width or height is reached and than be cropped. Width and height are always in pixels so there is no need to append &#8216;px&#8217;. The &#8216;c&#8217; tells TYPO3 to crop the image.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.typo3-addict.com/2009/10/5-things-you-should-know-about-tt_news/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TYPO3 SEO: Combining graphical headers with text headers</title>
		<link>http://www.typo3-addict.com/2009/09/typo3-seo-combining-graphical-headers-with-text-headers/</link>
		<comments>http://www.typo3-addict.com/2009/09/typo3-seo-combining-graphical-headers-with-text-headers/#comments</comments>
		<pubDate>Sat, 12 Sep 2009 08:00:50 +0000</pubDate>
		<dc:creator>Maarten</dc:creator>
				<category><![CDATA[Snippets]]></category>
		<category><![CDATA[GIFBUILDER]]></category>
		<category><![CDATA[Headers]]></category>
		<category><![CDATA[Typoscript]]></category>

		<guid isPermaLink="false">http://www.typo3-addict.com/?p=539</guid>
		<description><![CDATA[When you want to use an exotic font you&#8217;ll always end up with SEO problems. Ofcourse there is SIFR but this requires flash and there are still a lot of big companies who won&#8217;t allow flash on their computers. And even though you can set alt and titles attributes for graphical headers using TypoScript, a [...]]]></description>
			<content:encoded><![CDATA[<p>When you want to use an exotic font you&#8217;ll always end up with SEO problems. Ofcourse there is SIFR but this requires flash and there are still a lot of big companies who won&#8217;t allow flash on their computers. And even though you can set alt and titles attributes for graphical headers using TypoScript, a text header is always better for SEO.</p>
<p>Here&#8217;s a bit of TypoScript which produces both a graphical and a text header for the same single content element. You can display the graphical header and hide the text header using css (for example: indent: -9999). This way users will experience the nice graphical header while search engines will still be able to crawl the text header. We&#8217;ll give the text-header a H2 attribute so the importants is obvious to the search engine.</p>
<p><span id="more-539"></span></p>
<p>This snippets produces a H2 header with the same headertitle for both the graphical header as the text header:</p>
<pre>lib.stdheader.10.2 = COA
lib.stdheader.10.2 {
	10 = IMAGE
	10 {
   		wrap = &lt;span&gt;|&lt;/span&gt;
                file = GIFBUILDER
   		file {
   			XY = [10.w]+1,60
   			backColor = #ffffff
   			transparentBackground = 1
   			10 = TEXT
   			10 {
   				text.field = header
   				text.current = 1
   				fontSize = 52
   				offset = 0,50
   				fontFile =  path/to/your/font.ttf
   				fontColor = #000000
   				niceText = 1
    			}
   		}
   	}
	20 = TEXT
	20 {
		wrap = &lt;h2 class="headerDesc"&gt;|&lt;/h2&gt;
                field = header
	}
}</pre>
<p>Maybe you would like to have a different alt and title text with the graphical header instead of the actually image text and also want this different text to show in your text-header. Since TYPO3 has no extra BE-field for this issue, you should use &#8220;Text and Image&#8221; instead of &#8220;Text&#8221;. This way you&#8217;ll have more BE-fields you can use. In this example I&#8217;ll use the &#8220;Long URL Description&#8221; field to define our alt, title and text-header content.</p>
<pre>lib.stdheader.10.2 = COA
lib.stdheader.10.2 {
	10 = IMAGE
	10 {
   		alttext.field = longdescURL
   		titleText.field = longdescURL
   		wrap =  &lt;span&gt;| &lt;/span&gt;
   		file = GIFBUILDER
   		file {
   			XY = [10.w]+1,60
   			backColor = #ffffff
   			transparentBackground = 1
   			10 = TEXT
   			10 {
   				text.field = header
   				text.current = 1
   				fontSize = 52
   				offset = 0,50
   				fontFile =  path/to/your/font.ttf
   				fontColor = #000000
   				niceText = 1
    			}
   		}
   	}
	20 = TEXT
	20 {
		wrap =  &lt;h2 class="headerDesc"&gt;|&lt;/h2&gt;
  		field = longdescURL
	}
}</pre>
<p>I hope this will be useful. If you have any questions or comments please don&#8217;t hesitate&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.typo3-addict.com/2009/09/typo3-seo-combining-graphical-headers-with-text-headers/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>TYPO3: Auto generated tt_news image using GIFBUILDER</title>
		<link>http://www.typo3-addict.com/2009/02/auto-generated-tt_news-image-using-gifbuilder/</link>
		<comments>http://www.typo3-addict.com/2009/02/auto-generated-tt_news-image-using-gifbuilder/#comments</comments>
		<pubDate>Sat, 07 Feb 2009 08:00:16 +0000</pubDate>
		<dc:creator>Maarten</dc:creator>
				<category><![CDATA[Extensions]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[GIFBUILDER]]></category>
		<category><![CDATA[tt_news]]></category>

		<guid isPermaLink="false">http://www.typo-addict.com/?p=360</guid>
		<description><![CDATA[If you have a image in your latest of list view sometimes you just don&#8217;t have a appropriate picture, but no picture would distroy your nice design. tt_news can automatically insert a generated image, using GIFBUILDER. This TypoScript snippet is a latest view, but list is also posible. Adjust the output by reading this. plugin.tt_news.displayLatest.image.noImage_stdWrap [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">If you have a image in your latest of list view sometimes you just don&#8217;t have a appropriate picture, but no picture would distroy your nice design. tt_news can automatically insert a generated image, using GIFBUILDER.</p>
<p style="text-align: left;">This TypoScript snippet is a latest view, but list is also posible.</p>
<p style="text-align: left;">Adjust the output by <a href="http://typo3.org/documentation/document-library/references/doc_core_tsref/4.1.0/view/9/2/">reading this</a>.</p>
<p><span id="more-360"></span></p>
<pre>plugin.tt_news.displayLatest.image.noImage_stdWrap {
  cObject = IMAGE
  cObject {
    wrap = &lt;div class="ttnews-no-image"&gt;|&lt;/div&gt;
    file = GIFBUILDER
    file {
      XY = {$plugin.tt_news.latestMaxW},{$plugin.tt_news.latestMaxH}
      backColor = #3f5158
    20 = TEXT
    20 {
      text = No image
      fontSize = 16
      niceText = 1
      fontColor = #ccedfb
      offset = {$plugin.tt_news.latestMaxW}/2-30, {$plugin.tt_news.latestMaxH}/2+4
      }
    }
  }
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.typo3-addict.com/2009/02/auto-generated-tt_news-image-using-gifbuilder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
