<?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 Blogger &#187; Tutorial</title>
	<atom:link href="http://typo3blogger.de/category/tutorial/feed/" rel="self" type="application/rss+xml" />
	<link>http://typo3blogger.de</link>
	<description>TYPO3 News, Development &#38; Insider Infos</description>
	<lastBuildDate>Tue, 22 May 2012 19:04:05 +0000</lastBuildDate>
	<language>de-de</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Deutsche Fluid Dokumentation</title>
		<link>http://typo3blogger.de/deutsche-fluid-dokumentation/</link>
		<comments>http://typo3blogger.de/deutsche-fluid-dokumentation/#comments</comments>
		<pubDate>Sun, 15 Apr 2012 00:15:09 +0000</pubDate>
		<dc:creator>Stefan Frömken</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[ExtBase/Fluid]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[TYPO3]]></category>

		<guid isPermaLink="false">http://typo3blogger.de/?p=8013</guid>
		<description><![CDATA[Ich erhalte in den letzten Monaten immer wieder Anfragen bzgl. Unterstützung für Fluid-ViewHelper erhalten und tatsächlich: Eine Googlesuche nach &#8220;Fluid Dokumentation&#8221; zeigt im Groben nur die PDF-Variante aus dem Hause Mittwald und die eher beispielbehaftete englische ViewHelper Dokumentation des TYPO3 Wikis. Somit habe ich den kompletten Samstag einer neuen ViewHelper-Dokumentation gewidmet und habe versucht eigene [...]<p>------------------------------------------------------<br />Dies ist ein Post vom <a href="http://typo3blogger.de/">TYPO3 Blog</a> typo3blogger.de!</p>
]]></description>
			<content:encoded><![CDATA[<p>Ich erhalte in den letzten Monaten immer wieder Anfragen bzgl. Unterstützung für Fluid-ViewHelper erhalten und tatsächlich: Eine Googlesuche nach &#8220;Fluid Dokumentation&#8221; zeigt im Groben nur die PDF-Variante aus dem Hause Mittwald und die eher beispielbehaftete englische ViewHelper Dokumentation des TYPO3 Wikis. Somit habe ich den kompletten Samstag einer neuen <a href="http://typo3.sfroemken.de/typo3-tutorials/extensions/fluid/fluid-dokumentation.html" title="Deutsche ViewHelper Dokumentation" target="_blank">ViewHelper-Dokumentation</a> gewidmet und habe versucht eigene Erfahrungen und Problemlösungen mit bestimmten ViewHelpern einfließen zu lassen. Knapp 80% der Doku habe ich bereits fertig, der Rest folgt die nächsten Tage. Die SubViewHelper &#8220;BE&#8221; und &#8220;Form&#8221; fehlen noch. Außerdem möchte ich noch etws näher in die ViewHelper-Programmierung eingehen und noch detailierter auf die Inlinenotation und mehrdimensionale Arraynotation eingehen.</p>
<p>------------------------------------------------------<br />Dies ist ein Post vom <a href="http://typo3blogger.de/">TYPO3 Blog</a> typo3blogger.de!</p>
]]></content:encoded>
			<wfw:commentRss>http://typo3blogger.de/deutsche-fluid-dokumentation/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Templating 3.0 mit TYPO3 – backend_layout (Teil 2)</title>
		<link>http://typo3blogger.de/templating-3-0-mit-typo3-backend_layout-teil-2/</link>
		<comments>http://typo3blogger.de/templating-3-0-mit-typo3-backend_layout-teil-2/#comments</comments>
		<pubDate>Tue, 20 Mar 2012 19:49:43 +0000</pubDate>
		<dc:creator>Thomas Löffler</dc:creator>
				<category><![CDATA[Templates]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[TYPO3]]></category>
		<category><![CDATA[TypoScript]]></category>
		<category><![CDATA[backend_layout]]></category>
		<category><![CDATA[fluidtemplate]]></category>
		<category><![CDATA[templating]]></category>

		<guid isPermaLink="false">http://typo3blogger.de/?p=7866</guid>
		<description><![CDATA[Im ersten Teil bin ich auf die Einbindung des FLUIDTEMPLATEs eingegangen, heute will ich speziell den Content-Bereich eines Templates eingehen. Dabei kommt uns eine Extension zugute, die seit TYPO3 4.5 im Core ist. Diese heißt &#8220;backend_layout&#8221; und als neuer Datensatz heißt er &#8220;Backend Layout&#8221;: Ein neues Backend Layout können wir unsere eigene oder vom Kunden [...]<p>------------------------------------------------------<br />Dies ist ein Post vom <a href="http://typo3blogger.de/">TYPO3 Blog</a> typo3blogger.de!</p>
]]></description>
			<content:encoded><![CDATA[<p>Im ersten Teil bin ich auf die <a title="Templating 3.0 mit TYPO3 – FLUIDTEMPLATE (Teil 1)" href="http://typo3blogger.de/templating-3-0-mit-typo3-fluidtemplate-teil-1/">Einbindung des FLUIDTEMPLATEs</a> eingegangen, heute will ich speziell den Content-Bereich eines Templates eingehen.</p>
<p>Dabei kommt uns eine Extension zugute, die seit TYPO3 4.5 im Core ist. Diese heißt &#8220;backend_layout&#8221; und als neuer Datensatz heißt er &#8220;Backend Layout&#8221;:<span id="more-7866"></span></p>
<div id="attachment_7868" class="wp-caption alignnone" style="width: 290px"><a href="http://typo3blogger.de/wp-content/uploads/2012/03/Bildschirmfoto-2012-03-20-um-19.47.52.png"><img class="size-full wp-image-7868" title="Backend Layout" src="http://typo3blogger.de/wp-content/uploads/2012/03/Bildschirmfoto-2012-03-20-um-19.47.52.png" alt="" width="280" height="167" /></a><p class="wp-caption-text">Backend Layout Datensatz</p></div>
<p>Ein neues Backend Layout können wir unsere eigene oder vom Kunden gewünschte Inhaltsstruktur mittels des Wizards erstellen. Wir erstellen heute ein Layout, welches in der oberen Hälfte aus zwei Spalten und in der unteren Hälfte aus einer Spalte über die gesamte Breite besteht:</p>
<div id="attachment_7870" class="wp-caption alignnone" style="width: 310px"><a href="http://typo3blogger.de/wp-content/uploads/2012/03/Bildschirmfoto-2012-03-20-um-19.59.38.png"><img class="size-medium wp-image-7870" title="Backend Layout Wizard" src="http://typo3blogger.de/wp-content/uploads/2012/03/Bildschirmfoto-2012-03-20-um-19.59.38-300x288.png" alt="Backend Layout Wizard" width="300" height="288" /></a><p class="wp-caption-text">Backend Layout Wizard</p></div>
<p>Hier sieht man schön die zukünftige Struktur. Man sieht auch, dass ich jeden Bereich mit einer Zahl fest definiert habe. Diese Zahlen müssen wir uns merken für das TypoScript später.</p>
<p>Nachdem wir das Backend Layout gespeichert haben, können wir uns sogleich mal an das TypoScript machen. Merken müssen wir uns noch die UID des Backend Layouts. Und so geht es los:</p>

<div class="wp_syntax"><div class="code"><pre class="typoscript" style="font-family:monospace;"><span style="color: #aaa; font-style: italic;"># Ein CASE Objekt schaut, welcher Fall eintritt und handelt dementsprechend.</span>
<span style="color: #000066; font-weight: bold;">temp</span><span style="color: #339933; font-weight: bold;">.</span>contentStructure <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #990000; font-weight: bold;">CASE</span>
<span style="color: #000066; font-weight: bold;">temp</span><span style="color: #339933; font-weight: bold;">.</span>contentStructure <span style="color: #009900;">&#123;</span>
  <span style="color: #aaa; font-style: italic;"># Durch den Key können wir festlegen, auf welches Feld er prüft, in diesem Fall das Feld</span>
  <span style="color: #aaa; font-style: italic;"># &quot;backend_layout&quot; im Seiten-Datensatz.</span>
  key<span style="color: #339933; font-weight: bold;">.</span>field <span style="color: #339933; font-weight: bold;">=</span> backend_layout
  <span style="color: #aaa; font-style: italic;"># Falls das Feld leer ist, schaut er rekursiv bis zur Root Page, ob irgendwo das Feld gesetzt ist.</span>
  key<span style="color: #339933; font-weight: bold;">.</span>ifEmpty<span style="color: #339933; font-weight: bold;">.</span>data <span style="color: #339933; font-weight: bold;">=</span> levelfield<span style="color: #339933; font-weight: bold;">:</span>-<span style="color: #cc0000;">2</span>, backend_layout_next_level, slide
&nbsp;
  <span style="color: #aaa; font-style: italic;"># Die UID des Backend Layout Datensatzes, in unserem Falle die 1</span>
  <span style="color: #cc0000;">1</span> <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #990000; font-weight: bold;">COA</span>
  <span style="color: #cc0000;">1.10</span> <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #990000; font-weight: bold;">COA</span>
  <span style="color: #cc0000;">1.10</span><span style="color: #339933; font-weight: bold;">.</span>wrap <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #3366CC;">&lt;div class=&quot;maincolumns&quot;&gt;</span><span style="color: #339933; font-weight: bold;">|</span><span style="color: #3366CC;">&lt;div class=&quot;clear&quot;&gt;</span><span style="color: #3366CC;">&lt;/div&gt;</span><span style="color: #3366CC;">&lt;/div&gt;</span>
  <span style="color: #aaa; font-style: italic;"># Spalte oben links </span>
  1<span style="color: #339933; font-weight: bold;">.</span>10<span style="color: #339933; font-weight: bold;">.</span>10 <span style="color: #339933; font-weight: bold;">&lt;</span> <span style="color: #000066; font-weight: bold;">styles</span><span style="color: #339933; font-weight: bold;">.</span>content<span style="color: #339933; font-weight: bold;">.</span>get 
  1<span style="color: #339933; font-weight: bold;">.</span>10<span style="color: #339933; font-weight: bold;">.</span>10<span style="color: #339933; font-weight: bold;">.</span><span style="font-weight: bold;">select</span><span style="color: #339933; font-weight: bold;">.</span>where <span style="color: #339933; font-weight: bold;">=</span> colPos <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #cc0000;">1</span> 
  1<span style="color: #339933; font-weight: bold;">.</span>10<span style="color: #339933; font-weight: bold;">.</span>10<span style="color: #339933; font-weight: bold;">.</span>wrap <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #3366CC;">&lt;div class=&quot;column first&quot;&gt;</span><span style="color: #339933; font-weight: bold;">|</span><span style="color: #3366CC;">&lt;/div&gt;</span>
  <span style="color: #aaa; font-style: italic;"># Spalte oben rechts </span>
  1<span style="color: #339933; font-weight: bold;">.</span>10<span style="color: #339933; font-weight: bold;">.</span>20 <span style="color: #339933; font-weight: bold;">&lt;</span> <span style="color: #000066; font-weight: bold;">styles</span><span style="color: #339933; font-weight: bold;">.</span>content<span style="color: #339933; font-weight: bold;">.</span>get 
  1<span style="color: #339933; font-weight: bold;">.</span>10<span style="color: #339933; font-weight: bold;">.</span>20<span style="color: #339933; font-weight: bold;">.</span><span style="font-weight: bold;">select</span><span style="color: #339933; font-weight: bold;">.</span>where <span style="color: #339933; font-weight: bold;">=</span> colPos <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #cc0000;">2</span> 
  1<span style="color: #339933; font-weight: bold;">.</span>10<span style="color: #339933; font-weight: bold;">.</span>20<span style="color: #339933; font-weight: bold;">.</span>wrap <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #3366CC;">&lt;div class=&quot;column second&quot;&gt;</span><span style="color: #339933; font-weight: bold;">|</span><span style="color: #3366CC;">&lt;/div&gt;</span>
  <span style="color: #aaa; font-style: italic;"># Spalte unten </span>
  <span style="color: #cc0000;">1.20</span> <span style="color: #339933; font-weight: bold;">&lt;</span> <span style="color: #000066; font-weight: bold;">styles</span><span style="color: #339933; font-weight: bold;">.</span>content<span style="color: #339933; font-weight: bold;">.</span>get 
  <span style="color: #cc0000;">1.20</span><span style="color: #339933; font-weight: bold;">.</span><span style="font-weight: bold;">select</span><span style="color: #339933; font-weight: bold;">.</span>where <span style="color: #339933; font-weight: bold;">=</span> colPos <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #cc0000;">3</span> 
  <span style="color: #cc0000;">1.20</span><span style="color: #339933; font-weight: bold;">.</span>wrap <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #3366CC;">&lt;div&gt;</span><span style="color: #339933; font-weight: bold;">|</span><span style="color: #3366CC;">&lt;/div&gt;</span>
<span style="color: #009900;">&#125;</span> 
&nbsp;
<span style="color: #aaa; font-style: italic;"># Wir kopieren das Objekt in die Variable content </span>
<span style="color: #000066; font-weight: bold;">page</span><span style="color: #339933; font-weight: bold;">.</span>10<span style="color: #339933; font-weight: bold;">.</span>variables<span style="color: #339933; font-weight: bold;">.</span>content <span style="color: #339933; font-weight: bold;">&lt;</span> <span style="color: #000066; font-weight: bold;">temp</span><span style="color: #339933; font-weight: bold;">.</span>contentStructure</pre></div></div>

<p>Damit setzen wir für jede Spalte (colPos = vorher gesetzte Spaltennummer) auch direkt das HTML. Mit den verschiedenen Klassen können wir dann auch im Frontend per CSS die Struktur nachbauen, wie wir sie im Backend erstellt haben:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">div<span style="color: #6666ff;">.first</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">50%</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
div<span style="color: #6666ff;">.second</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">50%</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
div.<span style="color: #000000; font-weight: bold;">clear</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">clear</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">both</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Natürlich hat man Unmengen von Möglichkeiten, um sich mittels der Spalten verschiedene Backend Layouts zusammenzustellen.<br />
Ach, und die Auswahl erfolgt über den Seiten-Datensatz im Backend. Dort gibt es die Möglichkeit ein Backend Layout für die Seite, aber auch rekursiv für alle darunterliegenden Seiten zu setzen:</p>
<div id="attachment_7873" class="wp-caption alignnone" style="width: 310px"><a href="http://typo3blogger.de/wp-content/uploads/2012/03/Bildschirmfoto-2012-03-20-um-20.34.24.png"><img class="size-medium wp-image-7873" title="Backend Layout Auswahl" src="http://typo3blogger.de/wp-content/uploads/2012/03/Bildschirmfoto-2012-03-20-um-20.34.24-300x120.png" alt="Backend Layout Auswahl" width="300" height="120" /></a><p class="wp-caption-text">Backend Layout Auswahl</p></div>
<p>&nbsp;</p>
<p>Viel Spaß beim Probieren! <img src='http://typo3blogger.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>------------------------------------------------------<br />Dies ist ein Post vom <a href="http://typo3blogger.de/">TYPO3 Blog</a> typo3blogger.de!</p>
]]></content:encoded>
			<wfw:commentRss>http://typo3blogger.de/templating-3-0-mit-typo3-backend_layout-teil-2/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Templating 3.0 mit TYPO3 &#8211; FLUIDTEMPLATE (Teil 1)</title>
		<link>http://typo3blogger.de/templating-3-0-mit-typo3-fluidtemplate-teil-1/</link>
		<comments>http://typo3blogger.de/templating-3-0-mit-typo3-fluidtemplate-teil-1/#comments</comments>
		<pubDate>Thu, 15 Mar 2012 21:11:10 +0000</pubDate>
		<dc:creator>Thomas Löffler</dc:creator>
				<category><![CDATA[ExtBase/Fluid]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[TYPO3]]></category>
		<category><![CDATA[TypoScript]]></category>
		<category><![CDATA[fluid]]></category>
		<category><![CDATA[fluidtemplate]]></category>

		<guid isPermaLink="false">http://typo3blogger.de/?p=7833</guid>
		<description><![CDATA[Nachdem ich auf dem TYPO3camp München 2011 und der T3AK12 (auch in München) schon Sessions bzw. Vorträge über das Thema gehalten habe, möchte ich eine kleine Reihe von Tutorials hier anbieten. Angefangen wird mit dem neuen TypoScript Objekt FLUIDTEMPLATE. Als Alternative zum Marker Based Templating (richtig Old School) und dem teils gehasstem, teils verehrtem TemplaVoilá [...]<p>------------------------------------------------------<br />Dies ist ein Post vom <a href="http://typo3blogger.de/">TYPO3 Blog</a> typo3blogger.de!</p>
]]></description>
			<content:encoded><![CDATA[<p>Nachdem ich auf dem TYPO3camp München 2011 und der T3AK12 (auch in München) schon Sessions bzw. Vorträge über das Thema gehalten habe, möchte ich eine kleine Reihe von Tutorials hier anbieten.</p>
<p>Angefangen wird mit dem neuen TypoScript Objekt FLUIDTEMPLATE.<span id="more-7833"></span></p>
<p>Als Alternative zum Marker Based Templating (richtig Old School) und dem teils gehasstem, teils verehrtem TemplaVoilá gibt es nun seit TYPO3 4.5 das FLUIDTEMPLATE. Es ist keine Installation nötig, man kann es direkt per TypoScript initialisieren:</p>

<div class="wp_syntax"><div class="code"><pre class="typoscript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">page</span> <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #990000; font-weight: bold;">PAGE</span>
<span style="color: #000066; font-weight: bold;">page</span><span style="color: #339933; font-weight: bold;">.</span>10 <span style="color: #339933; font-weight: bold;">=</span> FLUIDTEMPLATE
<span style="color: #000066; font-weight: bold;">page</span><span style="color: #339933; font-weight: bold;">.</span>10<span style="color: #339933; font-weight: bold;">.</span>file <span style="color: #339933; font-weight: bold;">=</span> fileadmin<span style="color: #339933; font-weight: bold;">/</span>template<span style="color: #339933; font-weight: bold;">/</span>my_template<span style="color: #339933; font-weight: bold;">.</span>html</pre></div></div>

<p>Hiermit haben wir dem System gesagt, dass das Template my_template.html genutzt werden soll.</p>
<p>Wie üblich, werden verschiedene Elemente des Templates im TypoScript zusammengebaut, wie z.B. verschiedene Menus. Diese speichern wir in temporären Objekten namens temp.mainMenu, temp.subMenu oder auch temp.footerMenu.</p>
<p>Ich gehe jetzt mal davon aus, dass jeder weiß, wie man ein Menu im TypoScript erstellt, daher kopieren wir das fertige Objekt direkt in das FLUIDTEMPLATE:</p>

<div class="wp_syntax"><div class="code"><pre class="typoscript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">page</span><span style="color: #339933; font-weight: bold;">.</span>10<span style="color: #339933; font-weight: bold;">.</span>variables <span style="color: #009900;">&#123;</span>
  mainMenu <span style="color: #339933; font-weight: bold;">&lt;</span> <span style="color: #000066; font-weight: bold;">temp</span><span style="color: #339933; font-weight: bold;">.</span>mainMenu
  subMenu <span style="color: #339933; font-weight: bold;">&lt;</span> <span style="color: #000066; font-weight: bold;">temp</span><span style="color: #339933; font-weight: bold;">.</span>subMenu
  footerMenu <span style="color: #339933; font-weight: bold;">&lt;</span> <span style="color: #000066; font-weight: bold;">temp</span><span style="color: #339933; font-weight: bold;">.</span>footerMenu
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Wir kopieren unsere erstellen Menustrukturen in Variablen im FLUIDTEMPLATE, um sie dann im HTML direkt anzusprechen:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;div id=&quot;mainMenu&quot;&gt;
  &lt;f:format.html&gt;{mainMenu}&lt;/f:format.html&gt;
&lt;/div&gt;</pre></div></div>

<p>Man sieht an dem <f:> Tag, dass ein Fluid Tag genutzt wird. &#8220;format.html&#8221; ist ein ViewHelper, der die Ausgabe in reinem HTML ausgibt. Die vorher definierte Variable wird mittels den geschweiften Klammern {variable} angesprochen, die wir ja vorher im TypoScript mit einem MENU Objekt gefüllt haben.</p>
<p>Das Gesamte kann jetzt natürlich mit allen möglichen TypoScript Objekten gefüllt werden. Auch Partials und Sections sind nutzbar, doch der Einfachheit halber soll dieses Beispiel ausreichen.</p>
<p>Natürlich kann man auch das HTML je nach TypoScript Objekt abhängig machen, indem man die Wenn-Abfrage von Fluid nutzt. So kann ich die HTML-Struktur abhängig von einem möglichen zweiten Menu machen und die Ebenen jeweils benennen:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;f:if condition=&quot;{submenu}&quot;&gt;
  &lt;f:then&gt;
    &lt;div id=&quot;content_wrap&quot;&gt;
      &lt;div id=&quot;submenu&quot;&gt;
        &lt;f:format.html&gt;{subMenu}&lt;/f:format.html&gt;
      &lt;/div&gt;
      &lt;div id=&quot;content&quot;&gt;
        &lt;f:format.html&gt;{content}&lt;/f:format.html&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/f:then&gt;
  &lt;f:else&gt;
    &lt;div id=&quot;content_wide&quot;&gt;
      &lt;f:format.html&gt;{content}&lt;/f:format.html&gt;
    &lt;/div&gt;
  &lt;/f:else&gt;
&lt;/f:if&gt;</pre></div></div>

<p>Im zweiten Teil erkläre ich, wie man die backend_layouts nutzen kann, um den Content Bereich gemütlich mit verschiedenen Layouts zu füttern.</p>
<p>------------------------------------------------------<br />Dies ist ein Post vom <a href="http://typo3blogger.de/">TYPO3 Blog</a> typo3blogger.de!</p>
]]></content:encoded>
			<wfw:commentRss>http://typo3blogger.de/templating-3-0-mit-typo3-fluidtemplate-teil-1/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Newsletterabmeldung mit Formhandler</title>
		<link>http://typo3blogger.de/newsletterabmeldung-mit-formhandler/</link>
		<comments>http://typo3blogger.de/newsletterabmeldung-mit-formhandler/#comments</comments>
		<pubDate>Wed, 14 Mar 2012 22:13:03 +0000</pubDate>
		<dc:creator>Alois Rainbacher</dc:creator>
				<category><![CDATA[Extension]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[TypoScript]]></category>

		<guid isPermaLink="false">http://typo3blogger.de/?p=7824</guid>
		<description><![CDATA[Für ein Projekt habe ich die Newsletteranmeldung mit Formhandler, wie im Türchen 14 Tutorial beschrieben, verwendet. Natürlich war auch eine Newsletterabmeldung notwendig, die ich auch, basierend auf Formhandler, umgesetzt habe. Ablauf der Abmeldung Im Formular ist nur die E-Mail Adresse anzugeben, die aus dem Newsletterverteiler entfernt werden soll. Nach dem Absenden wird die eingetragenen E-Mail [...]<p>------------------------------------------------------<br />Dies ist ein Post vom <a href="http://typo3blogger.de/">TYPO3 Blog</a> typo3blogger.de!</p>
]]></description>
			<content:encoded><![CDATA[<p>Für ein Projekt habe ich die Newsletteranmeldung mit Formhandler, wie im <a href="http://typo3blogger.de/newsletteranmeldung-mit-formhandler-turchen-14/" title="Newsletteranmeldung mit Formhandler – Türchen 14" target="_blank">Türchen 14</a> Tutorial beschrieben, verwendet. Natürlich war auch eine Newsletterabmeldung notwendig, die ich auch, basierend auf Formhandler, umgesetzt habe.<span id="more-7824"></span></p>
<p><strong>Ablauf der Abmeldung</strong><br />
Im Formular ist nur die E-Mail Adresse anzugeben, die aus dem Newsletterverteiler entfernt werden soll. Nach dem Absenden wird die eingetragenen E-Mail Adresse zunächst validiert (Tx_Formhandler_Validator_Default (gültige E-Mail Adresse und ob sie in der Tabelle tt_address existiert)) und bei Erfolg wird in der Tabelle tt_address für den existierenden Datensatz, basierend auf der angegebenen E-Mail Adresse, das Feld hidden auf 1 gesetzt (Finisher_DB).</p>
<p>Alle weiteren Schritte, wie versenden von E-Mails an User und Admin, habe ich in diesem Tutorial weggelassen, da sie genau wie im <a href="http://typo3blogger.de/newsletteranmeldung-mit-formhandler-turchen-14/" title="Newsletteranmeldung mit Formhandler – Türchen 14" target="_blank">Tutorial Newsletteranmeldung</a>, umgesetzt werden können.</p>

<div class="wp_syntax"><div class="code"><pre class="typoscript" style="font-family:monospace;"><span style="color: #990000; font-weight: bold;">plugin</span><span style="color: #339933; font-weight: bold;">.</span>Tx_Formhandler<span style="color: #339933; font-weight: bold;">.</span>settings<span style="color: #339933; font-weight: bold;">.</span>predef<span style="color: #339933; font-weight: bold;">.</span>newsletter <span style="color: #009900;">&#123;</span>
	<span style="color: #aaa; font-style: italic;"># Common configuration</span>
	name <span style="color: #339933; font-weight: bold;">=</span> Newsletterabmeldung
	addErrorAnchors <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #cc0000;">1</span>
	templateFile <span style="color: #339933; font-weight: bold;">=</span> fileadmin<span style="color: #339933; font-weight: bold;">/</span>templates<span style="color: #339933; font-weight: bold;">/</span>formhandler<span style="color: #339933; font-weight: bold;">/</span>newsletter_unsubscribe<span style="color: #339933; font-weight: bold;">.</span>html
	langFile<span style="color: #339933; font-weight: bold;">.</span>1 <span style="color: #339933; font-weight: bold;">=</span> fileadmin<span style="color: #339933; font-weight: bold;">/</span>templates<span style="color: #339933; font-weight: bold;">/</span>formhandler<span style="color: #339933; font-weight: bold;">/</span>newsletter_unsubscribe<span style="color: #339933; font-weight: bold;">.</span>xml
	cssFile<span style="color: #339933; font-weight: bold;">.</span>1 <span style="color: #339933; font-weight: bold;">=</span> fileadmin<span style="color: #339933; font-weight: bold;">/</span>css<span style="color: #339933; font-weight: bold;">/</span>my<span style="color: #339933; font-weight: bold;">.</span>css
	formValuesPrefix <span style="color: #339933; font-weight: bold;">=</span> formhandler
&nbsp;
	requiredSign <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #990000; font-weight: bold;">TEXT</span>
	requiredSign<span style="color: #339933; font-weight: bold;">.</span>value <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #339933; font-weight: bold;">*</span>
	requiredSign<span style="color: #339933; font-weight: bold;">.</span>wrap <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #3366CC;">&lt;span style=&quot;color: <span style="color: #3366CC;">#DF9707</span>;&quot;&gt;</span><span style="color: #339933; font-weight: bold;">|</span><span style="color: #3366CC;">&lt;/span&gt;</span>
&nbsp;
	<span style="color: #aaa; font-style: italic;">#isErrorMarker.default = class=&quot;errorField&quot;</span>
	isErrorMarker<span style="color: #339933; font-weight: bold;">.</span>default <span style="color: #339933; font-weight: bold;">=</span>
&nbsp;
	<span style="color: #aaa; font-style: italic;"># HTML wrapping by validation error</span>
	errorListTemplate <span style="color: #009900;">&#123;</span>
		totalWrap <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #3366CC;">&lt;div class=&quot;error&quot;&gt;</span><span style="color: #339933; font-weight: bold;">|</span><span style="color: #3366CC;">&lt;/div&gt;</span>
		singleWrap <span style="color: #339933; font-weight: bold;">=</span> &amp;nbsp;<span style="color: #339933; font-weight: bold;">|</span>&amp;nbsp;
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #aaa; font-style: italic;">#PreProcessors</span>
	preProcessors <span style="color: #009900;">&#123;</span>
		<span style="color: #cc0000;">1</span><span style="color: #339933; font-weight: bold;">.</span>class <span style="color: #339933; font-weight: bold;">=</span> PreProcessor_LoadGetPost
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #aaa; font-style: italic;"># Validators configuration</span>
	validators <span style="color: #009900;">&#123;</span>
		<span style="color: #cc0000;">1</span> <span style="color: #009900;">&#123;</span>
			class <span style="color: #339933; font-weight: bold;">=</span> Tx_Formhandler_Validator_Default
			<span style="color: #000066; font-weight: bold;">config</span> <span style="color: #009900;">&#123;</span>
				fieldConf <span style="color: #009900;">&#123;</span>
					emailunsubscribe <span style="color: #009900;">&#123;</span>
						errorCheck<span style="color: #339933; font-weight: bold;">.</span>1 <span style="color: #339933; font-weight: bold;">=</span> required
						errorCheck<span style="color: #339933; font-weight: bold;">.</span>2 <span style="color: #339933; font-weight: bold;">=</span> email
						errorCheck<span style="color: #339933; font-weight: bold;">.</span>3 <span style="color: #339933; font-weight: bold;">=</span> isInDBTable
						errorCheck<span style="color: #339933; font-weight: bold;">.</span>3 <span style="color: #009900;">&#123;</span>
							table <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #000066; font-weight: bold;">tt_address</span>
							<span style="color: #000066; font-weight: bold;">field</span> <span style="color: #339933; font-weight: bold;">=</span> email
							fields <span style="color: #009900;">&#123;</span>
								email<span style="color: #339933; font-weight: bold;">.</span>mapping <span style="color: #339933; font-weight: bold;">=</span> emailunsubscribe
							<span style="color: #009900;">&#125;</span>
						<span style="color: #009900;">&#125;</span>
					<span style="color: #009900;">&#125;</span>
				<span style="color: #009900;">&#125;</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #aaa; font-style: italic;"># Finishers configuration</span>
	finishers <span style="color: #009900;">&#123;</span>
		<span style="color: #cc0000;">1</span><span style="color: #339933; font-weight: bold;">.</span>class <span style="color: #339933; font-weight: bold;">=</span> Finisher_DB
		<span style="color: #cc0000;">1</span><span style="color: #339933; font-weight: bold;">.</span>config <span style="color: #009900;">&#123;</span>
		  debug <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #cc0000;">1</span>
			table <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #000066; font-weight: bold;">tt_address</span>
			updateInsteadOfInsert <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #cc0000;">1</span>
			key <span style="color: #339933; font-weight: bold;">=</span> email
			key_value <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #990000; font-weight: bold;">TEXT</span>
			key_value<span style="color: #339933; font-weight: bold;">.</span>data <span style="color: #339933; font-weight: bold;">=</span> GPvar<span style="color: #339933; font-weight: bold;">:</span>formhandler<span style="color: #339933; font-weight: bold;">|</span>emailunsubscribe
			fields <span style="color: #009900;">&#123;</span>
				hidden<span style="color: #339933; font-weight: bold;">.</span>ifIsEmpty <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #cc0000;">1</span>
				email<span style="color: #339933; font-weight: bold;">.</span>mapping <span style="color: #339933; font-weight: bold;">=</span> emailunsubscribe
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #cc0000;">2</span><span style="color: #339933; font-weight: bold;">.</span>class <span style="color: #339933; font-weight: bold;">=</span> Finisher_Redirect
		<span style="color: #cc0000;">2</span><span style="color: #339933; font-weight: bold;">.</span>config <span style="color: #009900;">&#123;</span>
			redirectPage <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #cc0000;">97</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;!-- ###TEMPLATE_FORM1### begin --&gt;
&lt;div id=&quot;formhandler_newsletter_unsubscribe_form&quot;&gt;
	&lt;form method=&quot;post&quot; action=&quot;###REL_URL###&quot;&gt;
	&lt;table&gt;
		&lt;tr&gt;
			&lt;td&gt;###LLL:newsletter_intro_unsubscribe###&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td&gt;
				&lt;table&gt;
					&lt;tr&gt;
						&lt;td class=&quot;newsletterlabel&quot;&gt;###LLL:emailunsubscribe### ###required_emailunsubscribe###&lt;/td&gt;
						&lt;td&gt;&lt;input type=&quot;text&quot; ###is_error_emailunsubscribe### name=&quot;formhandler[emailunsubscribe]&quot; id=&quot;emailunsubscribe&quot; value=&quot;###value_emailunsubscribe###&quot; size=&quot;30&quot; class=&quot;newsletterinput&quot;/&gt;&lt;/td&gt;
					&lt;/tr&gt;
			  &lt;/table&gt;
			&lt;/td&gt;
		&lt;tr&gt;
			&lt;td class=&quot;newslettertext&quot;&gt;###LLL:required_fields###&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td class=&quot;newslettertext&quot;&gt;###LLL:newsletter_text_1###&lt;/td&gt;
		&lt;/tr&gt;
    &lt;tr&gt;
    	&lt;td&gt;&amp;nbsp;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
    	&lt;td&gt;&lt;input type=&quot;submit&quot; value=&quot;###LLL:submit###&quot; ###submit_nextStep###/&gt;&lt;/td&gt;
	  &lt;/tr&gt;
    &lt;tr&gt;
    	&lt;td&gt;###ERROR###&lt;/td&gt;
	  &lt;/tr&gt;
	&lt;/table&gt;
	&lt;/form&gt;
&lt;/div&gt;
&lt;!-- ###TEMPLATE_FORM1### end --&gt;
&nbsp;
&lt;!-- ###TEMPLATE_SUBMITTEDOK### begin --&gt;
&lt;table&gt;
  &lt;tr&gt;
    &lt;td&gt;###LLL:emailunsubscribe###&lt;/td&gt;
    &lt;td&gt;###value_emailunsubsrcibe###&lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
&lt;!-- ###TEMPLATE_SUBMITTEDOK### end --&gt;</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;utf-8&quot;</span> <span style="color: #000066;">standalone</span>=<span style="color: #ff0000;">&quot;yes&quot;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;T3locallang<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;data</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;array&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;languageKey</span> <span style="color: #000066;">index</span>=<span style="color: #ff0000;">&quot;default&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;array&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
&nbsp;
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;label</span> <span style="color: #000066;">index</span>=<span style="color: #ff0000;">&quot;emailunsubscribe&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>E-Mail<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;label</span> <span style="color: #000066;">index</span>=<span style="color: #ff0000;">&quot;required_fields&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>* Pflichtfelder<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;label</span> <span style="color: #000066;">index</span>=<span style="color: #ff0000;">&quot;newsletter_text_1&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Die Daten werden nicht an Dritte weitergegeben.<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;label</span> <span style="color: #000066;">index</span>=<span style="color: #ff0000;">&quot;submit&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Formular senden<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;label</span> <span style="color: #000066;">index</span>=<span style="color: #ff0000;">&quot;error_emailunsubscribe_required&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Gültige E-Mail Adresse bitte eingeben.<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;label</span> <span style="color: #000066;">index</span>=<span style="color: #ff0000;">&quot;error_emailunsubscribe_email&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Gültige E-Mail Adresse bitte eingeben.<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;label</span> <span style="color: #000066;">index</span>=<span style="color: #ff0000;">&quot;error_emailunsubscribe_isInDBTable&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Diese E-Mail Adresse ist nicht registriert.<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/languageKey<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/data<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/T3locallang<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p><em>Dies ist ein Gast-Beitrag von Alois Rainbacher. Vielen Dank dafür.</em></p>
<p>------------------------------------------------------<br />Dies ist ein Post vom <a href="http://typo3blogger.de/">TYPO3 Blog</a> typo3blogger.de!</p>
]]></content:encoded>
			<wfw:commentRss>http://typo3blogger.de/newsletterabmeldung-mit-formhandler/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Mit Grids und jQuery schöne Effekte basteln</title>
		<link>http://typo3blogger.de/mit-grids-und-jquery-schoene-effekte-basteln/</link>
		<comments>http://typo3blogger.de/mit-grids-und-jquery-schoene-effekte-basteln/#comments</comments>
		<pubDate>Tue, 13 Mar 2012 19:25:07 +0000</pubDate>
		<dc:creator>Thomas Löffler</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[TYPO3]]></category>
		<category><![CDATA[TypoScript]]></category>
		<category><![CDATA[Accordion]]></category>
		<category><![CDATA[gridelements]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[typoscript]]></category>

		<guid isPermaLink="false">http://typo3blogger.de/?p=7779</guid>
		<description><![CDATA[Jeder von euch kennt die Extensions wie z.B. &#8220;jfmulticontent&#8220;, die für Redakteure schöne Tab-Navigationen oder Accordions bieten, um Inhaltselemente aufgeräumt und strukturiert anzeigen zu lassen. Heute möchte ich eine für den Integrator einfache und für den Redakteur übersichtliche Methode zeigen, um solche Effekte ohne Extension und ohne die teils nervigen Updates nachzubauen. Einzige Bedingung hierfür [...]<p>------------------------------------------------------<br />Dies ist ein Post vom <a href="http://typo3blogger.de/">TYPO3 Blog</a> typo3blogger.de!</p>
]]></description>
			<content:encoded><![CDATA[<p>Jeder von euch kennt die Extensions wie z.B. &#8220;<a title="Extension &quot;jfmulticontent&quot;" href="https://typo3.org/extensions/repository/view/jfmulticontent/current/" target="_blank">jfmulticontent</a>&#8220;, die für Redakteure schöne Tab-Navigationen oder Accordions bieten, um Inhaltselemente aufgeräumt und strukturiert anzeigen zu lassen.</p>
<p>Heute möchte ich eine für den Integrator einfache und für den Redakteur übersichtliche Methode zeigen, um solche Effekte ohne Extension und ohne die teils nervigen Updates nachzubauen.<span id="more-7779"></span></p>
<p>Einzige Bedingung hierfür ist die TYPO3 Version &gt;= 4.6 und die Extension &#8220;<a title="Extension &quot;gridelements&quot;" href="https://typo3.org/extensions/repository/view/gridelements/current/" target="_blank">gridelements</a>&#8220;.<br />
Einfach über den Extension Manager installieren und &#8211; nicht vergessen &#8211; die statischen Templates einbinden.</p>
<p>Als Beispiel habe ich mir heute den Effekt &#8220;<a title="Accordion Effekt Demo" href="http://jqueryui.com/demos/accordion/" target="_blank">Accordion</a>&#8221; ausgesucht.</p>
<p>Wir beginnen damit, ein Grid Element anzulegen mit dem redakteursunterstützenden Namen <strong>Accordion</strong>. Im Wizard für die Elemente sind wir schnell fertig, da wir nur diesen einen Kasten benötigen. Wir geben der &#8220;Spalte&#8221; auch den Namen Accordion und die Spaltennummer ist die &#8220;1&#8243;.</p>
<p>Nachdem wir das Grid Element gespeichert haben, müssen wir nur noch das TypoScript einfügen:</p>

<div class="wp_syntax"><div class="code"><pre class="typoscript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">tt_content</span><span style="color: #339933; font-weight: bold;">.</span>gridelements_pi1<span style="color: #339933; font-weight: bold;">.</span>20<span style="color: #339933; font-weight: bold;">.</span>10<span style="color: #339933; font-weight: bold;">.</span>setup <span style="color: #009900;">&#123;</span>
  <span style="color: #aaa; font-style: italic;"># ID of gridelement</span>
  <span style="color: #cc0000;">1</span> <span style="color: #339933; font-weight: bold;">&lt;</span> <span style="color: #000066; font-weight: bold;">temp</span><span style="color: #339933; font-weight: bold;">.</span>gridelements<span style="color: #339933; font-weight: bold;">.</span>defaultGridSetup
  <span style="color: #cc0000;">1</span> <span style="color: #009900;">&#123;</span>
    columns <span style="color: #009900;">&#123;</span>
      <span style="color: #aaa; font-style: italic;"># colPos ID</span>
      <span style="color: #cc0000;">1</span> <span style="color: #339933; font-weight: bold;">&lt;</span> <span style="color: #339933; font-weight: bold;">.</span>default
      <span style="color: #cc0000;">1</span><span style="color: #339933; font-weight: bold;">.</span>wrap <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #3366CC;">&lt;div class=&quot;accordion&quot;&gt;</span><span style="color: #339933; font-weight: bold;">|</span><span style="color: #3366CC;">&lt;/div&gt;</span>;
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Die HTML-Grundstruktur haben wir jetzt. Nun brauchen wir das nötige JavaScript. Das finden wir unter <a title="jQuery UI" href="http://jqueryui.com" target="_blank">http://jqueryui.com</a>. Dort können wir für das Accordion <a title="Zusammenstellen der JS Bibliotheken" href="http://jqueryui.com/download" target="_blank">nötige JS</a> zusammenstellen lassen. Dieses müssen wir herunterladen, entpacken und in unsere TYPO3 Instanz hochladen.<br />
Dann die nötigen TypoScript-Befehle:</p>

<div class="wp_syntax"><div class="code"><pre class="typoscript" style="font-family:monospace;"><span style="color: #aaa; font-style: italic;"># CSS von Accordion / Theme ui-lightness</span>
<span style="color: #000066; font-weight: bold;">page</span><span style="color: #339933; font-weight: bold;">.</span>includeCSS<span style="color: #339933; font-weight: bold;">.</span>accordion <span style="color: #339933; font-weight: bold;">=</span> fileadmin<span style="color: #339933; font-weight: bold;">/</span>res<span style="color: #339933; font-weight: bold;">/</span>css<span style="color: #339933; font-weight: bold;">/</span>ui-lightness<span style="color: #339933; font-weight: bold;">/</span>jquery-ui-1<span style="color: #339933; font-weight: bold;">.</span>8<span style="color: #339933; font-weight: bold;">.</span>18<span style="color: #339933; font-weight: bold;">.</span>custom<span style="color: #339933; font-weight: bold;">.</span>css
<span style="color: #aaa; font-style: italic;"># jQuery Source</span>
<span style="color: #000066; font-weight: bold;">page</span><span style="color: #339933; font-weight: bold;">.</span>includeJSFooterlibs<span style="color: #339933; font-weight: bold;">.</span>jquery <span style="color: #339933; font-weight: bold;">=</span> fileadmin<span style="color: #339933; font-weight: bold;">/</span>res<span style="color: #339933; font-weight: bold;">/</span>js<span style="color: #339933; font-weight: bold;">/</span>jquery-1<span style="color: #339933; font-weight: bold;">.</span>7<span style="color: #339933; font-weight: bold;">.</span>1<span style="color: #339933; font-weight: bold;">.</span>min<span style="color: #339933; font-weight: bold;">.</span>js
<span style="color: #aaa; font-style: italic;"># jQuery UI Accordion Source</span>
<span style="color: #000066; font-weight: bold;">page</span><span style="color: #339933; font-weight: bold;">.</span>includeJSFooter<span style="color: #339933; font-weight: bold;">.</span>accordion <span style="color: #339933; font-weight: bold;">=</span> fileadmin<span style="color: #339933; font-weight: bold;">/</span>res<span style="color: #339933; font-weight: bold;">/</span>js<span style="color: #339933; font-weight: bold;">/</span>jquery-ui-1<span style="color: #339933; font-weight: bold;">.</span>8<span style="color: #339933; font-weight: bold;">.</span>18<span style="color: #339933; font-weight: bold;">.</span>custom<span style="color: #339933; font-weight: bold;">.</span>min<span style="color: #339933; font-weight: bold;">.</span>js
<span style="color: #aaa; font-style: italic;"># jQuery UI Accordion Init</span>
<span style="color: #000066; font-weight: bold;">page</span><span style="color: #339933; font-weight: bold;">.</span>includeJSFooter<span style="color: #339933; font-weight: bold;">.</span>accordion_init <span style="color: #339933; font-weight: bold;">=</span> fileadmin<span style="color: #339933; font-weight: bold;">/</span>res<span style="color: #339933; font-weight: bold;">/</span>jquery-accordion<span style="color: #339933; font-weight: bold;">.</span>js</pre></div></div>

<p>Die letzte Datei jquery-accordion.js müssen wir selbst erstellen und den initialisierenden Code hineinschreiben:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  $<span style="color: #009900;">&#40;</span> <span style="color: #3366CC;">&quot;.accordion&quot;</span> <span style="color: #009900;">&#41;</span>.<span style="color: #660066;">accordion</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Da laut Dokumentation der Standard-Header ein &lt;h3&gt; ist, wir in unserem Beispiel aber die css-styled-content Erweiterungen nutzen, müssen wir den Code anpassen:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  $<span style="color: #009900;">&#40;</span> <span style="color: #3366CC;">&quot;.accordion&quot;</span> <span style="color: #009900;">&#41;</span>.<span style="color: #660066;">accordion</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span> header<span style="color: #339933;">:</span> <span style="color: #3366CC;">'div.csc-header'</span> <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Weitere Anpassungen von Accordion kann man <a title="Accordion Einstellungen" href="http://jqueryui.com/demos/accordion/#default" target="_blank">auf der Seite von jQuery UI einsehen</a>.</p>
<p>Somit müssten wir jetzt ein schönes Resultat finden, wenn wir Inhaltselement in das Grid Element hineinziehen (Drag&#8217;n'Drop möglich):</p>

<a href='http://typo3blogger.de/mit-grids-und-jquery-schoene-effekte-basteln/grid_be/' title='Accordion im Backend'><img width="150" height="150" src="http://typo3blogger.de/wp-content/uploads/2012/03/grid_be-150x150.png" class="attachment-thumbnail" alt="Accordion im Backend" title="Accordion im Backend" /></a>
<a href='http://typo3blogger.de/mit-grids-und-jquery-schoene-effekte-basteln/grid_fe/' title='Accordion im Frontend'><img width="150" height="150" src="http://typo3blogger.de/wp-content/uploads/2012/03/grid_fe-150x150.png" class="attachment-thumbnail" alt="Accordion im Frontend" title="Accordion im Frontend" /></a>

<p>------------------------------------------------------<br />Dies ist ein Post vom <a href="http://typo3blogger.de/">TYPO3 Blog</a> typo3blogger.de!</p>
]]></content:encoded>
			<wfw:commentRss>http://typo3blogger.de/mit-grids-und-jquery-schoene-effekte-basteln/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Helferlein &#8211; Türchen 24</title>
		<link>http://typo3blogger.de/helferlein/</link>
		<comments>http://typo3blogger.de/helferlein/#comments</comments>
		<pubDate>Sat, 24 Dec 2011 00:00:18 +0000</pubDate>
		<dc:creator>Tim Lochmüller</dc:creator>
				<category><![CDATA[ExtBase/Fluid]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[TYPO3]]></category>

		<guid isPermaLink="false">http://typo3blogger.de/?p=7436</guid>
		<description><![CDATA[Im letzten Türchen des Adventskalender, sind noch drei &#8220;Helferlein&#8221; versteckt, welche vielleicht auch in euren Extensions Sinn machen. Folgende Ideen könnt ihr bei euch unterbringen&#8230; GEO Position Für die Ermittlung einer GEO Position anhand einer IP Adresse, gibt es natürlich auch Erweiterungen, welche diese Aufgabe erfüllen. Diese müssen jedoch gewartet werden, weil die IP-Bereichs-Datenbanken aktuell [...]<p>------------------------------------------------------<br />Dies ist ein Post vom <a href="http://typo3blogger.de/">TYPO3 Blog</a> typo3blogger.de!</p>
]]></description>
			<content:encoded><![CDATA[<p>Im letzten Türchen des Adventskalender, sind noch drei &#8220;Helferlein&#8221; versteckt, welche vielleicht auch in euren Extensions Sinn machen. Folgende Ideen könnt ihr bei euch unterbringen&#8230;<span id="more-7436"></span></p>
<h2>GEO Position</h2>
<p>Für die Ermittlung einer GEO Position anhand einer IP Adresse, gibt es natürlich auch Erweiterungen, welche diese Aufgabe erfüllen. Diese müssen jedoch gewartet werden, weil die IP-Bereichs-Datenbanken aktuell gehalten werden müssen. Wer einmal &#8220;zwischendurch&#8221; eine Position einer IP benötigt, dem ist vielleicht schon mit dieser Methode geholfen.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">    <span style="color: #009933; font-style: italic;">/**
     * @param string $ip
     * @return array|null
     */</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> getPosition<span style="color: #009900;">&#40;</span><span style="color: #000088;">$ip</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">NULL</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$ip</span> <span style="color: #339933;">===</span> <span style="color: #009900; font-weight: bold;">NULL</span><span style="color: #009900;">&#41;</span>
            <span style="color: #000088;">$ip</span> <span style="color: #339933;">=</span> t3lib_div<span style="color: #339933;">::</span><span style="color: #004000;">getIndpEnv</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'REMOTE_ADDR'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        try <span style="color: #009900;">&#123;</span>
            <span style="color: #000088;">$urlService</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'http://www.geoplugin.net/php.gp?ip='</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$ip</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$content</span> <span style="color: #339933;">=</span> <span style="color: #990000;">unserialize</span><span style="color: #009900;">&#40;</span>t3lib_div<span style="color: #339933;">::</span><span style="color: #004000;">getURL</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$urlService</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span> catch <span style="color: #009900;">&#40;</span>Exception <span style="color: #000088;">$exc</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">NULL</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #b1b100;">return</span> <span style="color: #990000;">sizeof</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$content</span><span style="color: #009900;">&#41;</span> ? <span style="color: #000088;">$content</span> <span style="color: #339933;">:</span> <span style="color: #009900; font-weight: bold;">NULL</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span></pre></div></div>

<h2>Aktuellen Tabellennamen im ExtBase Repository</h2>
<p>Der Abstraktionlayer von ExtBase abstrahiert die Datenbank von TYPO3 vollständig. Wenn jedoch individuelle Abfragen (Statements) aus einem &#8220;generellen&#8221; Repository abgeschickt werden sollen, dann wird der Tabellenname benötigt &#8211; und das natürlich dynamisch! Diese Methode holt sich den Tabellennamen aus den DataMappern, sodass sich auch Abfragen, mit von Hand geschriebenen SQL Queries, ein bisschen besser abstrahieren lassen (wenn überhaupt möglich <img src='http://typo3blogger.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  ).</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">    <span style="color: #009933; font-style: italic;">/**
     * Return the current tablename
     *
     * @return string
     */</span>
    <span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000000; font-weight: bold;">function</span> getTableName<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">persistenceManager</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getBackend</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getDataMapper</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getDataMap</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getRepositoryClassName</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getTableName</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span></pre></div></div>

<h2>Fluid Label mit Error Klasse</h2>
<p>Mit diesem ViewHelper könnt ihr auch für eure Labels in Formularen eine ErrorClass definieren. Einfach mit&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;yourkey:form.label property=&quot;yourProperty&quot;&gt;Name&lt;/yourkey:form.label&gt;</pre></div></div>

<p>&#8230; auch das Label-Tag an die Property binden. Wenn die Eigenschaft eures Model dann im Validator zu einem Fehler führt, wird neben dem Formular-Feld auch das Label-Tag mit der passenden errorClass versehen.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">class</span> Tx_YourExtensionName_ViewHelpers_Form_LabelViewHelper <span style="color: #000000; font-weight: bold;">extends</span> Tx_Fluid_ViewHelpers_Form_AbstractFormFieldViewHelper <span style="color: #009900;">&#123;</span>
&nbsp;
    <span style="color: #009933; font-style: italic;">/**
     * @var string
     */</span>
    <span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000088;">$tagName</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'label'</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #009933; font-style: italic;">/**
     * Initialize the arguments.
     *
     * @return void
     */</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> initializeArguments<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        parent<span style="color: #339933;">::</span><span style="color: #004000;">initializeArguments</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">registerArgument</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'errorClass'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'string'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'CSS class to set if there are errors for this view helper'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">FALSE</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'f3-form-error'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">registerUniversalTagAttributes</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #009933; font-style: italic;">/**
     * Renders the textfield.
     *
     * @return string
     */</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> render<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">strlen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">arguments</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'property'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setErrorClassAttribute</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">tag</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addAttribute</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'for'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">arguments</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'property'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">tag</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setContent</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">renderChildren</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">tag</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">render</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>------------------------------------------------------<br />Dies ist ein Post vom <a href="http://typo3blogger.de/">TYPO3 Blog</a> typo3blogger.de!</p>
]]></content:encoded>
			<wfw:commentRss>http://typo3blogger.de/helferlein/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>TYPO3 Filelist konfigurieren &#8211; Türchen 23</title>
		<link>http://typo3blogger.de/typo3-filelist-konfigurieren/</link>
		<comments>http://typo3blogger.de/typo3-filelist-konfigurieren/#comments</comments>
		<pubDate>Thu, 22 Dec 2011 23:01:10 +0000</pubDate>
		<dc:creator>Bernhard Berger</dc:creator>
				<category><![CDATA[Templates]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[TYPO3]]></category>
		<category><![CDATA[TypoScript]]></category>
		<category><![CDATA[Dateiliste]]></category>
		<category><![CDATA[Filelist]]></category>
		<category><![CDATA[Snippet]]></category>
		<category><![CDATA[Template]]></category>
		<category><![CDATA[tt_content]]></category>
		<category><![CDATA[tt_content.uploads]]></category>
		<category><![CDATA[typo3]]></category>
		<category><![CDATA[typoscript]]></category>
		<category><![CDATA[Uploads]]></category>

		<guid isPermaLink="false">http://typo3blogger.de/?p=7285</guid>
		<description><![CDATA[Viele von euch kennen sicherlich das Problem: man möchte ohne großen Aufwand ein paar Dateien zum Download auf der Website anbieten und beschließt dazu das TYPO3-Content Element &#8220;Filelist&#8221; zu verwenden. Nach dem ersten Blick ins Frontend kommt dann das böse Erwachen &#8211; das ganze Teil ist ziemlich eigenartig gestaltet, die Vorschaubilder sind riesig, die Dateigrößen [...]<p>------------------------------------------------------<br />Dies ist ein Post vom <a href="http://typo3blogger.de/">TYPO3 Blog</a> typo3blogger.de!</p>
]]></description>
			<content:encoded><![CDATA[<p>Viele von euch kennen sicherlich das Problem: man möchte ohne großen Aufwand ein paar Dateien zum Download auf der Website anbieten und beschließt dazu das TYPO3-Content Element &#8220;Filelist&#8221; zu verwenden. Nach dem ersten Blick ins Frontend kommt dann das böse Erwachen &#8211; das ganze Teil ist ziemlich eigenartig gestaltet, die Vorschaubilder sind riesig, die Dateigrößen werden in &#8220;M&#8221;, &#8220;K&#8221;, etc. angegeben anstelle von &#8220;MB&#8221; und &#8220;KB&#8221; &#8211; und das schlimmste daran &#8211; im Web findet man entweder nur veraltete Snippets welche nicht mehr funktionieren oder eben auch garnichts..</p>
<p>Hier möchte ich euch gerne mit den häufigst gebrauchten Snippets Abhilfe verschaffen.</p>
<p><span id="more-7285"></span></p>
<p>Das wichtigste zuerst: sämtliche Konfigurationen der Dateiliste sind per TypoScript im Setup-Teil des Templates vorzunehmen und finden im <strong>tt_content.uploads.20</strong> Bereich statt. Dank des mittlerweile standardmäßig vorhandenen TypoScript Editor im Backend sind zwar schon viele Einstellungen per &#8220;Suggest Drop-Down&#8221; zu erahnen, aber halt doch nicht immer so durchsichtig.</p>
<h3>Sinnvolle Dateigrößen-Bezeichnungen einpflegen:</h3>

<div class="wp_syntax"><div class="code"><pre class="typoscipt" style="font-family:monospace;">tt_content.uploads.20.itemRendering.30.bytes.labels = Byte | KB | MB | GB</pre></div></div>

<h3>Dateiendung (*.pdf, *.doc, etc.) verstecken:</h3>

<div class="wp_syntax"><div class="code"><pre class="typoscipt" style="font-family:monospace;">tt_content.uploads.20.stripFileExtensionFromLinkText = 1</pre></div></div>

<h3>Thumbnail-Generierung beeinflussen:</h3>

<div class="wp_syntax"><div class="code"><pre class="typoscipt" style="font-family:monospace;">tt_content.uploads.20.linkProc.iconCObject.file.maxH = 100 #maximale Höhe der Thumbnails
tt_content.uploads.20.linkProc.iconCObject.file.maxW = 100 # maximale Breite der Thumbnails
# etc.</pre></div></div>

<h3>Bestimmen welches Frame eines GIFs bzw. welche Seite eines PDFs angezeigt werden soll:</h3>

<div class="wp_syntax"><div class="code"><pre class="typoscipt" style="font-family:monospace;">tt_content.uploads.20.linkProc.iconCObject.file.maxH = 100 #maximale Höhe der Thumbnails
tt_content.uploads.20.linkProc.iconCObject.file.frame = 2 # zweite Seite eines PDFs als Thumbnail generieren</pre></div></div>

<p>Viel Spaß beim Experimentieren!</p>
<p>------------------------------------------------------<br />Dies ist ein Post vom <a href="http://typo3blogger.de/">TYPO3 Blog</a> typo3blogger.de!</p>
]]></content:encoded>
			<wfw:commentRss>http://typo3blogger.de/typo3-filelist-konfigurieren/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Mehrspaltige Struktur-Elemente mit Gridelements – Türchen 21</title>
		<link>http://typo3blogger.de/mehrspaltige-struktur-elemente-mit-gridelements-turchen-21/</link>
		<comments>http://typo3blogger.de/mehrspaltige-struktur-elemente-mit-gridelements-turchen-21/#comments</comments>
		<pubDate>Wed, 21 Dec 2011 07:00:16 +0000</pubDate>
		<dc:creator>Tobias Liegl</dc:creator>
				<category><![CDATA[Extension]]></category>
		<category><![CDATA[Templates]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[TYPO3]]></category>

		<guid isPermaLink="false">http://typo3blogger.de/?p=7378</guid>
		<description><![CDATA[Backend-Layouts machen Spaß und sind schnell zu implementieren. Wer dadurch auf den Geschmack gekommen ist und überlegt, von Templavoila auf diese Methode zu wechseln, vermisst sicherlich die Möglichkeit, Struktur-Elemente (zwei- oder mehrspaltige Inhaltscontainer) anzulegen. Mit Templavoila hat man sich dafür meist FCEs (Flexible Content Elements) angelegt. Auch die Extension &#8220;multicolumn&#8221; dürfte in diesem Zusammenhang vielen [...]<p>------------------------------------------------------<br />Dies ist ein Post vom <a href="http://typo3blogger.de/">TYPO3 Blog</a> typo3blogger.de!</p>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://typo3blogger.de/typo3-templates-mit-backend-layouts-und-fluidtemplate-turchen-19/">Backend-Layouts</a> machen Spaß und sind schnell zu implementieren. Wer dadurch auf den Geschmack gekommen ist und überlegt, von Templavoila auf diese Methode zu wechseln, vermisst sicherlich die Möglichkeit, Struktur-Elemente (zwei- oder mehrspaltige Inhaltscontainer) anzulegen. Mit Templavoila hat man sich dafür meist FCEs (Flexible Content Elements) angelegt. Auch die Extension &#8220;multicolumn&#8221; dürfte in diesem Zusammenhang vielen ein Begriff sein. Doch inzwischen gibt es eine Erweiterung für TYPO3, die das Konzept der Backend-Layouts auf Struktur- bzw. Raster-Elemente überträgt: <strong>gridelements</strong>.</p>
<p><span id="more-7378"></span></p>
<p>Man lädt sich also die Erweiterung &#8220;gridelements&#8221; aus dem TER, installiert sie und bindet die &#8220;Statischen Templates&#8221; ein. Danach den System-Ordner, den man als &#8220;Allgemeine Datensatzsammlung&#8221; angegeben hat öffnen und dort einen neuen Datensatz vom Typ &#8220;CE Backend Layout&#8221; anlegen. Die Funktionsweise ist hier die gleiche wie bei den <a href="http://typo3blogger.de/typo3-templates-mit-backend-layouts-und-fluidtemplate-turchen-19/">Backend Layouts</a>. Danach lässt sich das neu angelegte Element auf einer Seite einfügen. Man findet es in der Rubrik &#8220;Raster-Elemente&#8221;. Hat man z. B. ein zweispaltiges Element angelegt, sieht das Backend ungefähr so aus:</p>
<p><a href="http://typo3blogger.de/wp-content/uploads/2011/12/gridelement-zweispaltig.png"><img class="alignnone size-full wp-image-7385" title="gridelement-zweispaltig" src="http://typo3blogger.de/wp-content/uploads/2011/12/gridelement-zweispaltig.png" alt="" width="479" height="260" /></a></p>
<p>Nachdem das erfreulicherweise schon alles war, kümmern wir uns um die Ausgabe auf der Webseite. Dazu kann man per Typoscript definieren, wie dieses Element ausgegeben werden soll. Für das zweispaltige Element könnte das so aussehen:</p>

<div class="wp_syntax"><div class="code"><pre class="typoscript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">tt_content</span><span style="color: #339933; font-weight: bold;">.</span>gridelements_pi1<span style="color: #339933; font-weight: bold;">.</span>20<span style="color: #339933; font-weight: bold;">.</span>10<span style="color: #339933; font-weight: bold;">.</span>setup <span style="color: #009900;">&#123;</span>
	<span style="color: #aaa; font-style: italic;"># ID of gridelement</span>
	<span style="color: #cc0000;">1</span> <span style="color: #339933; font-weight: bold;">&lt;</span> <span style="color: #000066; font-weight: bold;">temp</span><span style="color: #339933; font-weight: bold;">.</span>gridelements<span style="color: #339933; font-weight: bold;">.</span>defaultGridSetup
	<span style="color: #cc0000;">1</span> <span style="color: #009900;">&#123;</span>
		columns <span style="color: #009900;">&#123;</span>
			<span style="color: #aaa; font-style: italic;"># colPos ID</span>
			<span style="color: #cc0000;">11</span> <span style="color: #339933; font-weight: bold;">&lt;</span> <span style="color: #339933; font-weight: bold;">.</span>default
			<span style="color: #cc0000;">11</span><span style="color: #339933; font-weight: bold;">.</span>wrap <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #3366CC;">&lt;div class=&quot;firstcol&quot;&gt;</span><span style="color: #339933; font-weight: bold;">|</span><span style="color: #3366CC;">&lt;/div&gt;</span>
			<span style="color: #aaa; font-style: italic;"># colPos ID</span>
			<span style="color: #cc0000;">12</span> <span style="color: #339933; font-weight: bold;">&lt;</span> <span style="color: #339933; font-weight: bold;">.</span>default
			<span style="color: #cc0000;">12</span><span style="color: #339933; font-weight: bold;">.</span>wrap <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #3366CC;">&lt;div class=&quot;secondcol&quot;&gt;</span><span style="color: #339933; font-weight: bold;">|</span><span style="color: #3366CC;">&lt;/div&gt;</span>
		<span style="color: #009900;">&#125;</span>
		wrap <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #3366CC;">&lt;div class=&quot;element2cols&quot;&gt;</span><span style="color: #339933; font-weight: bold;">|</span><span style="color: #3366CC;">&lt;/div&gt;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Wichtig sind hier die verwendeten Zahlen. Die &#8220;1&#8243; entspricht der ID des angelegten &#8220;gridelements&#8221;. Darin befinden sich die &#8220;columns&#8221;, die anhand ihrer colPos mit einem &#8220;wrap&#8221; versehen werden können. Der &#8220;wrap&#8221; am Ende umschließt das komplette Element. Zusätzliche Elemente können nach dem gleichen Schema hinzugefügt werden.</p>
<p>Selbst wenn man keine Raster-Elemente benötigt, empfiehlt es sich, die Erweiterung <strong>gridelements</strong> zu installieren. Denn man erhält mit dieser Extension auch eine Drag&amp;Drop-Funktionalität für die Inhaltselemente, wie man sie von Templavoila kennt.</p>
<p>------------------------------------------------------<br />Dies ist ein Post vom <a href="http://typo3blogger.de/">TYPO3 Blog</a> typo3blogger.de!</p>
]]></content:encoded>
			<wfw:commentRss>http://typo3blogger.de/mehrspaltige-struktur-elemente-mit-gridelements-turchen-21/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>TYPO3-Templates mit Backend-Layouts und FLUIDTEMPLATE – Türchen 19</title>
		<link>http://typo3blogger.de/typo3-templates-mit-backend-layouts-und-fluidtemplate-turchen-19/</link>
		<comments>http://typo3blogger.de/typo3-templates-mit-backend-layouts-und-fluidtemplate-turchen-19/#comments</comments>
		<pubDate>Mon, 19 Dec 2011 07:00:17 +0000</pubDate>
		<dc:creator>Tobias Liegl</dc:creator>
				<category><![CDATA[Templates]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[TYPO3]]></category>
		<category><![CDATA[TypoScript]]></category>

		<guid isPermaLink="false">http://typo3blogger.de/?p=7337</guid>
		<description><![CDATA[Ich habe die letzten Jahre fast immer Templavoila für die Template-Integration in TYPO3 benutzt. Seit den Backend Layouts und der Möglichkeit Fluid in den Templates zu benutzen, hat sich das Blatt aber gewendet und ich benutze Templavoila immer weniger. Daher hier ein kurzer Schnelleinstieg in die Backend Layouts für Wechselwillige. 1. Backend-Layout anlegen Als erstes [...]<p>------------------------------------------------------<br />Dies ist ein Post vom <a href="http://typo3blogger.de/">TYPO3 Blog</a> typo3blogger.de!</p>
]]></description>
			<content:encoded><![CDATA[<p>Ich habe die letzten Jahre fast immer Templavoila für die Template-Integration in TYPO3 benutzt. Seit den Backend Layouts und der Möglichkeit Fluid in den Templates zu benutzen, hat sich das Blatt aber gewendet und ich benutze Templavoila immer weniger. Daher hier ein kurzer Schnelleinstieg in die Backend Layouts für Wechselwillige.</p>
<p><span id="more-7337"></span></p>
<h3>1. Backend-Layout anlegen</h3>
<p>Als erstes im System-Ordner, den man bei &#8220;Allgemeine Datensatzsammlung&#8221; der Root-Seite angegeben hat, einen neuen Datensatz vom Typ &#8220;Backend-Layout&#8221; anlegen. Man vergibt einen Titel (z. B. Startseite oder Unterseite) und  öffnet über &#8220;Konfiguration&#8221; den sog. &#8220;Grid wizard&#8221;. Dort lässt sich dann ein Backend-Layout zusammen klicken, das in meinem Fall auch die Ausgabe im Frontend widerspiegelt.</p>
<p><a href="http://typo3blogger.de/wp-content/uploads/2011/12/grid-wizard.png"><img class="alignnone size-full wp-image-7342" title="grid-wizard" src="http://typo3blogger.de/wp-content/uploads/2011/12/grid-wizard.png" alt="" width="489" height="342" /></a></p>
<p>Die einzelnen Bereiche lassen sich noch benennen und mit Spaltennummern (colPos) versehen.</p>
<h3>2. Backend-Layout auswählen</h3>
<p>Nach dem Speichern, kann dieses Backend-Layout bereits in den Seiteneigenschaften einer Seite ausgewählt werden. Dazu einfach den Reiter &#8220;Erscheinungsbild&#8221; anklicken.</p>
<p><a href="http://typo3blogger.de/wp-content/uploads/2011/12/backend-layout-auswahl.png"><img class="alignnone size-full wp-image-7345" title="backend-layout-auswahl" src="http://typo3blogger.de/wp-content/uploads/2011/12/backend-layout-auswahl.png" alt="" width="442" height="206" /></a></p>
<p>Man kann das Backend-Layout für die aktuelle Seite und für deren Unterseiten einstellen. Nach der Auswahl zeigt das Backend direkt die vorher getroffene Konfiguration an &#8211; und zwar in korrekter Spalten- und Zeilen-Aufteilung.</p>
<p><a href="http://typo3blogger.de/wp-content/uploads/2011/12/backend-layout-seite.png"><img class="alignnone size-full wp-image-7346" title="backend-layout-seite" src="http://typo3blogger.de/wp-content/uploads/2011/12/backend-layout-seite.png" alt="" width="484" height="136" /></a></p>
<p>Somit wäre das Backend schon mal fertig konfiguriert. Bei Bedarf kann man sich natürlich noch weitere Backend-Layouts bzw. Seiten-Templates anlegen.</p>
<h3>3. Die Verknüpfung mit dem Frontend</h3>
<p>Um die angelegten Backend-Layouts mit der Ausgabe zu verknüpfen, benötigt man nur folgendes Typoscript Setup:</p>

<div class="wp_syntax"><div class="code"><pre class="typoscript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">page</span> <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #990000; font-weight: bold;">PAGE</span>
<span style="color: #000066; font-weight: bold;">page</span><span style="color: #339933; font-weight: bold;">.</span>10 <span style="color: #339933; font-weight: bold;">=</span> FLUIDTEMPLATE
<span style="color: #000066; font-weight: bold;">page</span><span style="color: #339933; font-weight: bold;">.</span>10 <span style="color: #009900;">&#123;</span>
	<span style="color: #000066; font-weight: bold;">file</span><span style="color: #339933; font-weight: bold;">.</span><span style="font-weight: bold;">stdWrap</span><span style="color: #339933; font-weight: bold;">.</span>cObject <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #990000; font-weight: bold;">CASE</span>
	<span style="color: #000066; font-weight: bold;">file</span><span style="color: #339933; font-weight: bold;">.</span><span style="font-weight: bold;">stdWrap</span><span style="color: #339933; font-weight: bold;">.</span>cObject <span style="color: #009900;">&#123;</span>
		<span style="color: #aaa; font-style: italic;"># slide the template</span>
		key<span style="color: #339933; font-weight: bold;">.</span>data <span style="color: #339933; font-weight: bold;">=</span> levelfield<span style="color: #339933; font-weight: bold;">:</span>-<span style="color: #cc0000;">1</span>, backend_layout_next_level, slide
		key<span style="color: #339933; font-weight: bold;">.</span>override<span style="color: #339933; font-weight: bold;">.</span>field <span style="color: #339933; font-weight: bold;">=</span> backend_layout
		<span style="color: #aaa; font-style: italic;"># default template file</span>
		default <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #990000; font-weight: bold;">TEXT</span>
		default<span style="color: #339933; font-weight: bold;">.</span>value <span style="color: #339933; font-weight: bold;">=</span> fileadmin<span style="color: #339933; font-weight: bold;">/</span>templates<span style="color: #339933; font-weight: bold;">/</span>index<span style="color: #339933; font-weight: bold;">.</span>html
		<span style="color: #aaa; font-style: italic;"># template file for backend-layout with ID 2</span>
		<span style="color: #cc0000;">2</span> <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #990000; font-weight: bold;">TEXT</span>
		<span style="color: #cc0000;">2</span><span style="color: #339933; font-weight: bold;">.</span>value <span style="color: #339933; font-weight: bold;">=</span> fileadmin<span style="color: #339933; font-weight: bold;">/</span>templates<span style="color: #339933; font-weight: bold;">/</span>subpage<span style="color: #339933; font-weight: bold;">.</span>html
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Im obigen Beispiel wird abhängig vom gewählten Backend-Layout, eine entsprechendes Template-Datei verwendet. Ich habe ein Standard-Template (default) angegeben und ein Template für das Backend-Layout mit der ID 2. Bei weiteren vorhanden Backend-Layouts, kann diese Liste natürlich erweitert werden. Dazu nur die korrekte ID benutzen.</p>
<h3>4. Inhalte für die Ausgabe im Template bereitstellen</h3>
<p>Wer von Templavoila kommt, dürfte z. B. die Navigation immer per &#8220;TypoScript Object Path&#8221; eingebunden haben. Die gute Nachricht: diese können beibehalten und direkt im Template aufgerufen werden. Aber wie kommt man an die Inhaltsbereiche? Mit Templavoila wurden diese als &#8220;Content Elements&#8221; gemapped. Jetzt benötigt man hier ein wenig Typoscript. (Ich gehe davon aus, dass CSS Styled Content benutzt wird.)</p>

<div class="wp_syntax"><div class="code"><pre class="typoscript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">lib</span><span style="color: #339933; font-weight: bold;">.</span>field_content <span style="color: #339933; font-weight: bold;">&lt;</span> <span style="color: #000066; font-weight: bold;">styles</span><span style="color: #339933; font-weight: bold;">.</span>content<span style="color: #339933; font-weight: bold;">.</span>get
<span style="color: #000066; font-weight: bold;">lib</span><span style="color: #339933; font-weight: bold;">.</span>field_content<span style="color: #339933; font-weight: bold;">.</span><span style="font-weight: bold;">select</span><span style="color: #339933; font-weight: bold;">.</span>where <span style="color: #339933; font-weight: bold;">=</span> colPos <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #cc0000;">2</span></pre></div></div>

<p>Hier auf die korrekte Angabe der colPos achten. Je nach Anzahl der Inhaltsbereiche, muss diese Anweisung natürlich &#8220;vervielfältigt&#8221; werden.</p>
<h3>5. Die Template-Datei</h3>
<p>Die Template-Datei, die im &#8220;fileadmin&#8221; liegt, beinhaltet dann vom Prinzip nur noch den Inhalt des &lt;body&gt; Bereichs. Den Rest baut TYPO3 ja automatisch drum herum. Das HTML-Template könnte dann z. B. so aussehen:</p>
<p>&lt;div id=&#8221;header&#8221;&gt;<br />
&lt;f:cObject typoscriptObjectPath=&#8221;lib.field_navmain&#8221; /&gt;<br />
&lt;/div&gt;<br />
&lt;div id=&#8221;content&#8221;&gt;<br />
&lt;f:cObject typoscriptObjectPath=&#8221;lib.field_content&#8221; /&gt;<br />
&lt;/div&gt;</p>
<p>In diesem Beispiel benutze ich nur den &lt;f:cObject&gt; View-Helper von Fluid, um direkt auf die im Typoscript angelegten Content-Objekte zuzugreifen. Fluid aber auch Fluidtemplate bieten natürlich noch viele weitere Möglichkeiten, mit denen man sein Template anreichern kann.</p>
<p>Und hier sind wir schon am Ende. Mehr ist nicht nötig.</p>
<h3>Fazit</h3>
<p>Im Vergleich zu Templavoila bin ich mit dieser Template-Methode um einiges schneller, da das aufwändige Mapping wegfällt. Und das Anlegen der extra Backend-Layouts für Templavoila-Templates spart man sich dadurch auch.</p>
<p>------------------------------------------------------<br />Dies ist ein Post vom <a href="http://typo3blogger.de/">TYPO3 Blog</a> typo3blogger.de!</p>
]]></content:encoded>
			<wfw:commentRss>http://typo3blogger.de/typo3-templates-mit-backend-layouts-und-fluidtemplate-turchen-19/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>HTML5 Boilerplate mit TYPO3 – Türchen 17</title>
		<link>http://typo3blogger.de/html5-boilerplate-mit-typo3-turchen-17/</link>
		<comments>http://typo3blogger.de/html5-boilerplate-mit-typo3-turchen-17/#comments</comments>
		<pubDate>Sat, 17 Dec 2011 07:00:02 +0000</pubDate>
		<dc:creator>Tobias Liegl</dc:creator>
				<category><![CDATA[Extension]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[TYPO3]]></category>

		<guid isPermaLink="false">http://typo3blogger.de/?p=7260</guid>
		<description><![CDATA[Wer sich mit Frontend-Entwicklung beschäftigt, stolpert früher oder später über HTML5 Boilerplate und die Konzepte die damit einhergehen. Der auffälligste Teil beim Betrachten des Quellcodes einer mit HTML5 Boilerplate umgesetzten Webseite, dürften die Conditional Comments um den &#60;html&#62; Tag sein. Das sieht dann ungefähr so aus: &#60;!--[if lt IE 7]&#62; &#60;html lang="de" class="no-js ie6"&#62; &#60;![endif]--&#62; [...]<p>------------------------------------------------------<br />Dies ist ein Post vom <a href="http://typo3blogger.de/">TYPO3 Blog</a> typo3blogger.de!</p>
]]></description>
			<content:encoded><![CDATA[<p>Wer sich mit Frontend-Entwicklung beschäftigt, stolpert früher oder später über <a href="http://html5boilerplate.com/" target="_blank">HTML5 Boilerplate</a> und die Konzepte die damit einhergehen. Der auffälligste Teil beim Betrachten des Quellcodes einer mit HTML5 Boilerplate umgesetzten Webseite, dürften die Conditional Comments um den &lt;html&gt; Tag sein. Das sieht dann ungefähr so aus:</p>
<pre>&lt;!--[if lt IE 7]&gt; &lt;html lang="de" class="no-js ie6"&gt; &lt;![endif]--&gt;
&lt;!--[if IE 7]&gt; &lt;html lang="de" class="no-js ie7"&gt; &lt;![endif]--&gt;
&lt;!--[if IE 8]&gt; &lt;html lang="de" class="no-js ie8"&gt; &lt;![endif]--&gt;
&lt;!--[if gt IE 8]&gt;&lt;!--&gt; &lt;html lang="de" class="no-js"&gt; &lt;!--&lt;![endif]--&gt;</pre>
<p><span id="more-7260"></span></p>
<p>Je nach eingesetztem Browser hat man also zusätzliche CSS-Klassen im &lt;html&gt; Tag, anhand derer man seine Seite für verschiedene IE-Browser-Versionen anpassen kann. Dieser Ansatz hat den Vorteil, dass man alle CSS-Angaben in einer CSS-Datei machen kann und dazu keine CSS-Hacks benötigt, um die unterschiedlichen IEs anzusprechen. Und da das alles in einer Datei machbar ist, spart man sich auch noch ein paar HTTP-Requests &#8211; im Vergleich zur Einbindung von versionsspezifischen Stylesheets per Conditional Comment.</p>
<h3>Aber wie bekommt man das jetzt in eine TYPO3-Seite?</h3>
<p>Nur mit der Angabe von &#8220;config.doctype = html5&#8243; ist es hier natürlich nicht getan. Es gibt meines Wissens auch keine Standard-Typoscript-Anweisung, mit der man den obigen Code in die Webseite bekommt. Aber für solche Fälle gibt es ja Extensions! Und hier hilft die Extension &#8220;<a href="http://typo3.org/extensions/repository/view/html5boilerplate/current/" target="_blank">html5boilerplate</a>&#8220;. Nach der Installation dieser Extension lässt sich der obige Code wie folgt einfügen:</p>
<pre>config.html5boilerplate {
 htmlTag (
    &lt;!--[if lt IE 7]&gt; &lt;html lang="de" class="no-js ie6"&gt; &lt;![endif]--&gt;
    &lt;!--[if IE 7]&gt; &lt;html lang="de" class="no-js ie7"&gt; &lt;![endif]--&gt;
    &lt;!--[if IE 8]&gt; &lt;html lang="de" class="no-js ie8"&gt; &lt;![endif]--&gt;
    &lt;!--[if gt IE 8]&gt;&lt;!--&gt; &lt;html lang="de" class="no-js"&gt; &lt;!--&lt;![endif]--&gt;
  )
}</pre>
<p>Somit hätte man den kompliziertesten Teil der <strong>HTML5 Boilerplate</strong> in TYPO3 integriert. Alles andere lässt sich im Prinzip mit hinlänglich bekannten TYPO3-Boardmitteln erledigen.</p>
<p>Die Extension liefert dazu auch Statische Templates (Typoscript) zum Einbinden mit, in denen neben dem obigen Snippet auch viele andere Anweisungen definiert sind. Es wird z. B. <a href="http://www.modernizr.com/" target="_blank">Modernizr</a> im &lt;head&gt; eingebunden und alle anderen Skripte per &#8220;page.includeJSFooter&#8221; in den Footer geladen. Es lohnt sich also, einen Blick in die TS-Templates zu werfen, selbst wenn man die Extension eigtl. nur für das Setzen des HTML-Tags verwenden möchte.</p>
<p>Einer Webseite nach HTML5 Boilerplate Prinzipien steht dank dieser Extension nichts im Wege.</p>
<p>------------------------------------------------------<br />Dies ist ein Post vom <a href="http://typo3blogger.de/">TYPO3 Blog</a> typo3blogger.de!</p>
]]></content:encoded>
			<wfw:commentRss>http://typo3blogger.de/html5-boilerplate-mit-typo3-turchen-17/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Signal / Slot Pattern &#8211; Türchen 15</title>
		<link>http://typo3blogger.de/signal-slot-pattern/</link>
		<comments>http://typo3blogger.de/signal-slot-pattern/#comments</comments>
		<pubDate>Wed, 14 Dec 2011 23:08:00 +0000</pubDate>
		<dc:creator>Tim Lochmüller</dc:creator>
				<category><![CDATA[ExtBase/Fluid]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[TYPO3]]></category>

		<guid isPermaLink="false">http://typo3blogger.de/?p=7222</guid>
		<description><![CDATA[Seit der letzten Version von TYPO3 bzw. von ExtBase wurde das Signal/Slot Design Pattern in ExtBase integriert bzw. von FLOW zurückportiert. Ein Feine Sache! Zusammengefasst soll es das Hook-Konzept ergänzen bzw. ersetzen. In diesem Tutorial möchte ich euch zeigen wie ihr das Pattern benutzen könnte. Genauso wie der Hook besteht das Signal/Slot Pattern aus zwei [...]<p>------------------------------------------------------<br />Dies ist ein Post vom <a href="http://typo3blogger.de/">TYPO3 Blog</a> typo3blogger.de!</p>
]]></description>
			<content:encoded><![CDATA[<p>Seit der letzten Version von TYPO3 bzw. von ExtBase wurde das Signal/Slot Design Pattern in ExtBase integriert bzw. von FLOW zurückportiert. Ein Feine Sache! Zusammengefasst soll es das Hook-Konzept ergänzen bzw. ersetzen. In diesem Tutorial möchte ich euch zeigen wie ihr das Pattern benutzen könnte.<span id="more-7222"></span></p>
<p>Genauso wie der Hook besteht das Signal/Slot Pattern aus zwei Bausteinen. Auf der einen Seite sind die Slots (Connector, Listener) und auf der anderen Seite die Signale (Dispatcher). Beide Funktionalität sind über die Klasse &#8220;Tx_Extbase_SignalSlot_Dispatcher&#8221; erreichbar, welche wir uns zuerst erstellen müssen. Dies geht entweder über Dependency Injection (z.B. im Controller):</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #009933; font-style: italic;">/** 
 * @var Tx_Extbase_SignalSlot_Dispatcher
 */</span>  
<span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000088;">$signalSlotDispatcher</span><span style="color: #339933;">;</span>  
&nbsp;
<span style="color: #009933; font-style: italic;">/** 
 * @param Tx_Extbase_SignalSlot_Dispatcher $signalSlotDispatcher 
 */</span>  
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> injectSignalSlotDispatcher<span style="color: #009900;">&#40;</span>Tx_Extbase_SignalSlot_Dispatcher <span style="color: #000088;">$signalSlotDispatcher</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>  
    <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">signalSlotDispatcher</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$signalSlotDispatcher</span><span style="color: #339933;">;</span>  
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>oder aber auch über einfaches erstellen der Instanz:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">signalSlotDispatcher</span> <span style="color: #339933;">=</span> t3lib_div<span style="color: #339933;">::</span><span style="color: #004000;">makeInstance</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Tx_Extbase_Object_Manager'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Tx_Extbase_SignalSlot_Dispatcher'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Im Anschluss verfügt ihr über ein &#8220;Tx_Extbase_SignalSlot_Dispatcher&#8221; Objekt mit dem ihr nun Signale senden oder Slots registrieren könnte. Im Folgenden nun die beiden Sichten, welche möglich sind.</p>
<h2>Dispatch / Signal</h2>
<p>Beispiel: Am Ende eurer Action stellt ihr alle nötigen Variablen der View bereit. Nun befindet ihr euch an einer Stelle, welcher gern erweitert wird, weshalb ihr euch für ein &#8220;Signal&#8221; entscheidet. Das Signal wird über den Signal/Slot-Dispatcher getriggert und kann von anderen Extensions benutzt werden, um die eigene Action zu ergänzen. Hier der Beispielcode:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">signalSlotDispatcher</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">dispatch</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">__CLASS__</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'beforeRenderView'</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$data</span><span style="color: #339933;">,</span> <span style="color: #000088;">$this</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Die Funktion hat drei Parameter &#8220;Klassenname&#8221;, &#8220;Signalname&#8221; und &#8220;Parameter&#8221;. Der Klassennamen ist ähnlich einem Namespace zu betrachten. &#8220;__CLASS__&#8221; macht hier meistens Sinn &#8211; möglich wäre aber auch &#8220;get_class($this)&#8221;. Achtung/Tipp: Letzteres hat einen interessanten Vererbungseffekt, sodass eine vererbte Klasse automatisch andere Signale schickt als die Klasse von der geerbt wurde. Evtl. Tricky, deshalb empfehle ich anfangs &#8220;__CLASS__&#8221;.<br />
Der Signalname ist frei wählbar und sollte die Position und Funktion beschreiben. Bei den Parametern sollten alle nötigen Parameter übergeben werden, sodass diese von einem Externen gut verarbeitet werden können.</p>
<h2>Connect / Slot</h2>
<p>Beispiel: Wir haben die Action (oben) gesehen und wollen die von außen (aber auch in der selben Extension wäre es möglich!) bearbeiten. Dazu erstellen wir uns ebenfalls den Signal/Slog-Dispatcher und registrieren eine Callback-Function (Slot / Listener) für das Signal. Hierzu gibt es verschiedene Möglichkeiten:</p>
<p>Anonym mit einem Closure,</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">signalSlotDispatcher</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">connect</span><span style="color: #009900;">&#40;</span>  
      <span style="color: #0000ff;">'Tx_Extension_Controller_NameController'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'beforeRenderView'</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$data</span><span style="color: #339933;">,</span> <span style="color: #000088;">$obj</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #666666; font-style: italic;">/* ... */</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">NULL</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">FALSE</span>  
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>eine Methode aus dem aktuellen Objekt oder</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">signalSlotDispatcher</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">connect</span><span style="color: #009900;">&#40;</span>  
     <span style="color: #0000ff;">'Tx_Extension_Controller_NameController'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'beforeRenderView'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$this</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'addInformation'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">FALSE</span>  
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>eine Methode aus einem anderen Objekt.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">signalSlotDispatcher</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">connect</span><span style="color: #009900;">&#40;</span>  
     <span style="color: #0000ff;">'Tx_Extension_Controller_NameController'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'beforeRenderView'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'Tx_OtherExtension_Controller_NameController'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'addOtherInformation'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">FALSE</span>  
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Wie ihr seht sind die ersten beiden Parameter identisch zu dem &#8220;Signal-Aufruf&#8221;. Diese diesen der Identifikation des Signals. Über die beiden folgenden Parameter wird die Callback-Funktion gesteuert. Der letzte Parameter (welcher hier auf FALSE steht) kann auf TRUE gesetzt werden, wenn ihr in der Slot-Klasse zusätzliche Informationen über das Signal benötigt. Diese stehen dann als erster Parameter in der Zielfunktion zur Verfügung.</p>
<h2>Fazit</h2>
<p>Ein wirklich schönes Pattern &#8211; sauberer und einheitlicher als die &#8220;üblichen&#8221; Hooks. Gerade bei den Hooks war störend, das viele mit &#8220;User&#8221;-Functions benutzt werden mussten, weshalb die Klassen mit &#8220;user_&#8221; beginnen mussten. Das neue Pattern ist leicht zu bedienen und schlank im Einsatz. Felix, Vielen Dank dafür. Weitere Informationen bekommt ihr in der <a href="api.typo3.org/typo3v4/current/html/class_tx___extbase___signal_slot___dispatcher.html" target="_blank">API</a>.</p>
<p>Vielen Dank für die Inspiration: <a href="http://blog.tolleiv.de/2011/11/signal-slots-in-extbase/" target="_blank">blog.tolleiv.de</a> und <a href="http://blog.foertel.com/2011/10/using-signalslots-in-extbase/" target="_blank">blog.foertel.com</a></p>
<p>------------------------------------------------------<br />Dies ist ein Post vom <a href="http://typo3blogger.de/">TYPO3 Blog</a> typo3blogger.de!</p>
]]></content:encoded>
			<wfw:commentRss>http://typo3blogger.de/signal-slot-pattern/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Newsletteranmeldung mit Formhandler &#8211; Türchen 14</title>
		<link>http://typo3blogger.de/newsletteranmeldung-mit-formhandler-turchen-14/</link>
		<comments>http://typo3blogger.de/newsletteranmeldung-mit-formhandler-turchen-14/#comments</comments>
		<pubDate>Wed, 14 Dec 2011 07:00:31 +0000</pubDate>
		<dc:creator>Stefan Frömken</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[Extension]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[TYPO3]]></category>
		<category><![CDATA[TypoScript]]></category>

		<guid isPermaLink="false">http://typo3blogger.de/?p=7035</guid>
		<description><![CDATA[Am 24.11.2011 ist die neue und vor allem stabile Version 1.0.0 von formhandler rausgekommen. Geil finde ich, dass formhandler nun eine eigene Webseite erhalten hat inkl. Doku, News und vielen Beispielen. Ich habe mir diese Extension mal unter den Nagel gerissen und ein Projekt gesucht, das ich damit umsetzen kann. Ein Kontaktformular wäre zu Standard [...]<p>------------------------------------------------------<br />Dies ist ein Post vom <a href="http://typo3blogger.de/">TYPO3 Blog</a> typo3blogger.de!</p>
]]></description>
			<content:encoded><![CDATA[<p>Am 24.11.2011 ist die neue und vor allem stabile Version 1.0.0 von formhandler rausgekommen. Geil finde ich, dass formhandler nun eine eigene <a title="Webseite Formhandler" href="http://www.typo3-formhandler.com/" target="_blank">Webseite</a> erhalten hat inkl. Doku, News und vielen Beispielen. Ich habe mir diese Extension mal unter den Nagel gerissen und ein Projekt gesucht, das ich damit umsetzen kann. Ein Kontaktformular wäre zu Standard außerdem gibt es dafür bessere Lösungen wie powermail und/oder vielleicht auch die neue Formextension innerhalb von TYPO3 4.6. Nein&#8230;ich habe mich für eine Newsletteranmeldung entschieden, da die meisten Newsletteranmelde-Extensions aus 2006 sind, oder viel zu große andere Extensions parallel benötigen.</p>
<p>Im folgenden Tutorial werden wir kaum Angaben im Plugin vom Formhandler machen. Alles was wir benötigen sind 4 Dateien und eine Zeile TypoScript. Vor- und zugleich Nachteil von Formhandler ist, dass jegliche Konfiguration in Dateien ausgelagert werden muss/sollte, was dann aber wiederum den Vorteil hat, dass diese Konfiguration sehr schnell auf ein anderes System portieren kann. Nach der Einbindung der TypoScriptzeile erscheint im Plugin ein neuer Eintrag in der Selectbox für &#8220;Vordefinierte Formulare&#8221;. Einfach auswählen. Fertig.<span id="more-7035"></span></p>
<p>Ich werde hier nicht auf jede einzelne Option von Formhandler eingehen, das würde den Rahmen sprengen. Wenn es Euch interessiert, dann könnt Ihr die <a title="Webseite Formhandler" href="http://www.typo3-formhandler.com/" target="_blank">Webseite von Formhandler</a> oder auch mein erstes Tutorial lesen, dass ich auf meiner Webseite präsentiere: <a title="Stefans TYPO3-Seite" href="http://typo3.sfroemken.de/typo3-tutorials/extensions/formhandler.html" target="_blank">Stefans TYPO3-Seite</a>.</p>
<h3>Ablauf der Anmeldung</h3>
<p>Wir erstellen eine Seite mit einem Formular auf dem sich die beiden Felder name und email befinden. Nach dem Absenden werden die eingetragenen Daten zunächst validiert (Tx_Formhandler_Validator_Default) und bei Erfolg in die Tabelle tt_address abgespeichert (Finisher_DB). Hier setze ich die Spalte hidden per default auf 1, damit der User nicht sofort aktiv ist. Natürlich wäre auch eine Speicherung in fe_users möglich, aber dann müssten wir dem Datensatz noch eine Gruppe, einen Benutzernamen und ein Passwort zuordnen. Zu viel für meinen Geschmack. Nach der Speicherung wird aus den gesammelten Daten ein AuthCode erstellt (Finisher_GenerateAuthCode) und per Mail an der User und als Info auch an den Admin geschickt (Tx_Formhandler_Finisher_Mail). Klickt der User den Link mit dem enthaltenen AuthCode an, wird der PreProcessor aktiv (PreProcessor_LoadGetPost) und läd sich die benötigten Daten aus der URL in den Speicher. An Hand dieser Daten kann der AuthCode-Validator aktiv werden (PreProcessor_ValidateAuthCode). Dieser überprüft, ob der AuthCode gültig ist und setzt den Datensatz bei einer erfolgreichen Überprüfung automatisch auf visible (hidden=0). Außerdem können hier je nach Gültigkeit Page-UIDs angegeben werden auf die weitergeleitet wird.</p>
<h5>newsletter.ts</h5>

<div class="wp_syntax"><div class="code"><pre class="typoscript" style="font-family:monospace;"><span style="color: #990000; font-weight: bold;">plugin</span><span style="color: #339933; font-weight: bold;">.</span>Tx_Formhandler<span style="color: #339933; font-weight: bold;">.</span>settings<span style="color: #339933; font-weight: bold;">.</span>predef<span style="color: #339933; font-weight: bold;">.</span>newsletter <span style="color: #009900;">&#123;</span>
	<span style="color: #aaa; font-style: italic;"># Common configuration</span>
	name <span style="color: #339933; font-weight: bold;">=</span> Newsletterregistrierung
	addErrorAnchors <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #cc0000;">1</span>
	templateFile <span style="color: #339933; font-weight: bold;">=</span> fileadmin<span style="color: #339933; font-weight: bold;">/</span>templates<span style="color: #339933; font-weight: bold;">/</span>formhandler<span style="color: #339933; font-weight: bold;">/</span>newsletter<span style="color: #339933; font-weight: bold;">.</span>html
	langFile<span style="color: #339933; font-weight: bold;">.</span>1 <span style="color: #339933; font-weight: bold;">=</span> fileadmin<span style="color: #339933; font-weight: bold;">/</span>templates<span style="color: #339933; font-weight: bold;">/</span>formhandler<span style="color: #339933; font-weight: bold;">/</span>newsletter<span style="color: #339933; font-weight: bold;">.</span>xml
	cssFile<span style="color: #339933; font-weight: bold;">.</span>1 <span style="color: #339933; font-weight: bold;">=</span> fileadmin<span style="color: #339933; font-weight: bold;">/</span>templates<span style="color: #339933; font-weight: bold;">/</span>formhandler<span style="color: #339933; font-weight: bold;">/</span>newsletter<span style="color: #339933; font-weight: bold;">.</span>css
	formValuesPrefix <span style="color: #339933; font-weight: bold;">=</span> formhandler
&nbsp;
	requiredSign <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #990000; font-weight: bold;">TEXT</span>
	requiredSign<span style="color: #339933; font-weight: bold;">.</span>value <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #339933; font-weight: bold;">*</span>
	requiredSign<span style="color: #339933; font-weight: bold;">.</span>wrap <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #3366CC;">&lt;span style=&quot;color: <span style="color: #3366CC;">#DF9707</span>;&quot;&gt;</span><span style="color: #339933; font-weight: bold;">|</span><span style="color: #3366CC;">&lt;/span&gt;</span>
&nbsp;
	isErrorMarker<span style="color: #339933; font-weight: bold;">.</span>default <span style="color: #339933; font-weight: bold;">=</span> class<span style="color: #339933; font-weight: bold;">=</span>&quot;errorField&quot;
&nbsp;
	<span style="color: #aaa; font-style: italic;"># HTML wrapping by validation error</span>
	errorListTemplate <span style="color: #009900;">&#123;</span>
		totalWrap <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #3366CC;">&lt;div class=&quot;error&quot;&gt;</span><span style="color: #3366CC;">&lt;ul&gt;</span><span style="color: #339933; font-weight: bold;">|</span><span style="color: #3366CC;">&lt;/ul&gt;</span><span style="color: #3366CC;">&lt;/div&gt;</span>
		singleWrap <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #3366CC;">&lt;li&gt;</span><span style="color: #339933; font-weight: bold;">|</span><span style="color: #3366CC;">&lt;/li&gt;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #aaa; font-style: italic;">#PreProcessors</span>
	preProcessors <span style="color: #009900;">&#123;</span>
		<span style="color: #cc0000;">1</span><span style="color: #339933; font-weight: bold;">.</span>class <span style="color: #339933; font-weight: bold;">=</span> PreProcessor_LoadGetPost
		<span style="color: #cc0000;">2</span><span style="color: #339933; font-weight: bold;">.</span>class <span style="color: #339933; font-weight: bold;">=</span> PreProcessor_ValidateAuthCode
		<span style="color: #cc0000;">2</span><span style="color: #339933; font-weight: bold;">.</span>config <span style="color: #009900;">&#123;</span>
			redirectPage <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #cc0000;">234</span>
			errorRedirectPage <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #cc0000;">235</span>
			hiddenField <span style="color: #339933; font-weight: bold;">=</span> hidden
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #aaa; font-style: italic;"># Validators configuration</span>
	validators <span style="color: #009900;">&#123;</span>
		<span style="color: #cc0000;">1</span> <span style="color: #009900;">&#123;</span>
			class <span style="color: #339933; font-weight: bold;">=</span> Tx_Formhandler_Validator_Default
			<span style="color: #000066; font-weight: bold;">config</span> <span style="color: #009900;">&#123;</span>
				fieldConf <span style="color: #009900;">&#123;</span>
					name <span style="color: #009900;">&#123;</span>
						errorCheck<span style="color: #339933; font-weight: bold;">.</span>1 <span style="color: #339933; font-weight: bold;">=</span> required
					<span style="color: #009900;">&#125;</span>
					email <span style="color: #009900;">&#123;</span>
						errorCheck<span style="color: #339933; font-weight: bold;">.</span>1 <span style="color: #339933; font-weight: bold;">=</span> required
						errorCheck<span style="color: #339933; font-weight: bold;">.</span>2 <span style="color: #339933; font-weight: bold;">=</span> email
					<span style="color: #009900;">&#125;</span>
				<span style="color: #009900;">&#125;</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #aaa; font-style: italic;"># Finishers configuration</span>
	finishers <span style="color: #009900;">&#123;</span>
		<span style="color: #cc0000;">1</span><span style="color: #339933; font-weight: bold;">.</span>class <span style="color: #339933; font-weight: bold;">=</span> Finisher_DB
		<span style="color: #cc0000;">1</span><span style="color: #339933; font-weight: bold;">.</span>config <span style="color: #009900;">&#123;</span>
			table <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #000066; font-weight: bold;">tt_address</span>
			key <span style="color: #339933; font-weight: bold;">=</span> uid
			fields <span style="color: #009900;">&#123;</span>
				email<span style="color: #339933; font-weight: bold;">.</span>mapping <span style="color: #339933; font-weight: bold;">=</span> email
				name<span style="color: #339933; font-weight: bold;">.</span>mapping <span style="color: #339933; font-weight: bold;">=</span> name
				pid<span style="color: #339933; font-weight: bold;">.</span>ifIsEmpty <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #cc0000;">57</span>
				hidden<span style="color: #339933; font-weight: bold;">.</span>ifIsEmpty <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #cc0000;">1</span>
				module_sys_dmail_html<span style="color: #339933; font-weight: bold;">.</span>ifIsEmpty <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #cc0000;">1</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #cc0000;">2</span><span style="color: #339933; font-weight: bold;">.</span>class <span style="color: #339933; font-weight: bold;">=</span> Finisher_GenerateAuthCode
		<span style="color: #cc0000;">2</span><span style="color: #339933; font-weight: bold;">.</span>config <span style="color: #009900;">&#123;</span>
			table <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #000066; font-weight: bold;">tt_address</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #cc0000;">3</span><span style="color: #339933; font-weight: bold;">.</span>class <span style="color: #339933; font-weight: bold;">=</span> Tx_Formhandler_Finisher_Mail
		<span style="color: #cc0000;">3</span><span style="color: #339933; font-weight: bold;">.</span>config <span style="color: #009900;">&#123;</span>
			limitMailsToUser <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #cc0000;">5</span>
			admin <span style="color: #009900;">&#123;</span>
				to_email <span style="color: #339933; font-weight: bold;">=</span> AdminEmailAdresse
				to_name <span style="color: #339933; font-weight: bold;">=</span> DeinNamw
				subject <span style="color: #339933; font-weight: bold;">=</span> Neue Newsletterregistrierung auf <span style="color: #009900;">&#91;</span>webseite<span style="color: #009900;">&#93;</span>
				sender_email <span style="color: #339933; font-weight: bold;">=</span> webmaster@xxx
				sender_name <span style="color: #339933; font-weight: bold;">=</span> Webmaster
				htmlEmailAsAttachment <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #cc0000;">0</span>
			<span style="color: #009900;">&#125;</span>
			user <span style="color: #009900;">&#123;</span>
				to_email <span style="color: #339933; font-weight: bold;">=</span> email
				to_name <span style="color: #339933; font-weight: bold;">=</span> name
				subject <span style="color: #339933; font-weight: bold;">=</span> Dein Anliegen von <span style="color: #009900;">&#91;</span>webseite<span style="color: #009900;">&#93;</span>
				sender_email <span style="color: #339933; font-weight: bold;">=</span> webmaster@xxx
				sender_name <span style="color: #339933; font-weight: bold;">=</span> Webmaster
				replyto_email <span style="color: #339933; font-weight: bold;">=</span> DeineEmailAdresse
				replyto_name <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #990000; font-weight: bold;">TEXT</span>
				replyto_name<span style="color: #339933; font-weight: bold;">.</span>value <span style="color: #339933; font-weight: bold;">=</span> Deine Name
				htmlEmailAsAttachment <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #cc0000;">0</span>
		 	<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #cc0000;">4</span><span style="color: #339933; font-weight: bold;">.</span>class <span style="color: #339933; font-weight: bold;">=</span> Finisher_Redirect
		<span style="color: #cc0000;">4</span><span style="color: #339933; font-weight: bold;">.</span>config <span style="color: #009900;">&#123;</span>
			redirectPage <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #cc0000;">233</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<h5>newsletter.xml</h5>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;utf-8&quot;</span> <span style="color: #000066;">standalone</span>=<span style="color: #ff0000;">&quot;yes&quot;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;T3locallang<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;data</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;array&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;languageKey</span> <span style="color: #000066;">index</span>=<span style="color: #ff0000;">&quot;default&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;array&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;label</span> <span style="color: #000066;">index</span>=<span style="color: #ff0000;">&quot;name&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Name<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;label</span> <span style="color: #000066;">index</span>=<span style="color: #ff0000;">&quot;email&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>E-Mail<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;label</span> <span style="color: #000066;">index</span>=<span style="color: #ff0000;">&quot;submit&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Send<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;label</span> <span style="color: #000066;">index</span>=<span style="color: #ff0000;">&quot;is_error&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>One or more errors occoured while filling the form!<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;label</span> <span style="color: #000066;">index</span>=<span style="color: #ff0000;">&quot;error_name_required&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Enter your name!<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;label</span> <span style="color: #000066;">index</span>=<span style="color: #ff0000;">&quot;error_email_required&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Enter your E-mail address!<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;label</span> <span style="color: #000066;">index</span>=<span style="color: #ff0000;">&quot;error_email_email&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>E-mail address must be valid syntax!<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;label</span> <span style="color: #000066;">index</span>=<span style="color: #ff0000;">&quot;required_fields&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Fields marked with * are required!<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/languageKey<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;languageKey</span> <span style="color: #000066;">index</span>=<span style="color: #ff0000;">&quot;de&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;array&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;label</span> <span style="color: #000066;">index</span>=<span style="color: #ff0000;">&quot;name&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Name<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;label</span> <span style="color: #000066;">index</span>=<span style="color: #ff0000;">&quot;email&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>E-Mail<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;label</span> <span style="color: #000066;">index</span>=<span style="color: #ff0000;">&quot;submit&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Absenden<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;label</span> <span style="color: #000066;">index</span>=<span style="color: #ff0000;">&quot;is_error&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Beim Absenden des Formulars sind ein paar Fehler aufgetreten:!<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;label</span> <span style="color: #000066;">index</span>=<span style="color: #ff0000;">&quot;error_name_required&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Bitte gib Deinen Namen an!<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;label</span> <span style="color: #000066;">index</span>=<span style="color: #ff0000;">&quot;error_email_required&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Bitte gib Deine E-Mail-Adresse an!<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;label</span> <span style="color: #000066;">index</span>=<span style="color: #ff0000;">&quot;error_email_email&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Die eingetragene E-Mail-Adresse ist ungültig!<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;label</span> <span style="color: #000066;">index</span>=<span style="color: #ff0000;">&quot;required_fields&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Felder mit * sind Pflichtfelder!<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/languageKey<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/data<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/T3locallang<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<h5>newsletter.html</h5>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;!-- ###TEMPLATE_FORM1### begin --&gt;
&lt;div id=&quot;formhandler_newsletter_form&quot;&gt;
	###ERROR###
	&lt;form method=&quot;post&quot; action=&quot;###REL_URL###&quot;&gt;
		&lt;p&gt;###LLL:required_fields###&lt;/p&gt;
		&lt;input type=&quot;hidden&quot; name=&quot;formhandler[submitted]&quot; value=&quot;1&quot; /&gt;
		&lt;dl&gt;
			&lt;dt&gt;&lt;label for=&quot;name&quot;&gt;###LLL:name### ###required_name###&lt;/label&gt;&lt;/dt&gt;
			&lt;dd&gt;&lt;input type=&quot;text&quot; ###is_error_name### name=&quot;formhandler[name]&quot; id=&quot;name&quot; value=&quot;###value_name###&quot;/&gt;&lt;/dd&gt;
		&lt;/dl&gt;
		&lt;dl&gt;
			&lt;dt&gt;&lt;label for=&quot;email&quot;&gt;###LLL:email### ###required_email###&lt;/label&gt;&lt;/dt&gt;
			&lt;dd&gt;&lt;input type=&quot;text&quot; ###is_error_email### name=&quot;formhandler[email]&quot; id=&quot;email&quot; value=&quot;###value_email###&quot;/&gt;&lt;/dd&gt;
		&lt;/dl&gt;
		&lt;dl&gt;
			&lt;dd&gt;&lt;input type=&quot;submit&quot; value=&quot;###LLL:submit###&quot; ###submit_nextStep###/&gt;&lt;/dd&gt;
		&lt;/dl&gt;
	&lt;/form&gt;
&lt;/div&gt;
&lt;!-- ###TEMPLATE_FORM1### end --&gt;
&nbsp;
&lt;!-- ###TEMPLATE_EMAIL_USER_PLAIN### begin --&gt;
Hallo ###value_name###,
&nbsp;
Du hast Dich soeben für meinen Newsletter auf [webseite] angemeldet.
Bitte klicke auf den folgenden Link, um die Registrierung abzuschließen:
&nbsp;
###value_authCodeUrl###
&lt;!-- ###TEMPLATE_EMAIL_USER_PLAIN### end --&gt;
&nbsp;
&lt;!-- ###TEMPLATE_EMAIL_USER_HTML### begin --&gt;
&lt;p&gt;Hallo ###value_name###&lt;/p&gt;
&lt;p&gt;Du hast Dich soeben für meinen Newsletter auf [webseite] angemeldet.&lt;br /&gt;
Bitte klicke auf den folgenden Link, um die Registrierung abzuschließen:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;###value_authCodeUrl###&quot; target=&quot;_blank&quot;&gt;Newsletteranmeldung bestätigen&lt;/a&gt;&lt;/p&gt;
&lt;!-- ###TEMPLATE_EMAIL_USER_HTML### end --&gt;
&nbsp;
&lt;!-- ###TEMPLATE_EMAIL_ADMIN_PLAIN### begin --&gt;
Hallo Admin,
&nbsp;
Soeben hat sich ###value_name### (###value_email###) für den Newsletter auf [webseite] angemeldet.
&nbsp;
Dein Server
&lt;!-- ###TEMPLATE_EMAIL_ADMIN_PLAIN### end --&gt;
&nbsp;
&lt;!-- ###TEMPLATE_EMAIL_ADMIN_HTML### begin --&gt;
&lt;p&gt;Hallo Admin,&lt;/p&gt;
&lt;p&gt;Soeben hat sich ###value_name### (###value_email###) für den Newsletter auf [webseite] angemeldet&lt;/p&gt;
&lt;p&gt;Dein Server&lt;/p&gt;
&lt;!-- ###TEMPLATE_EMAIL_ADMIN_HTML### end --&gt;
&nbsp;
&lt;!-- ###TEMPLATE_SUBMITTEDOK### begin --&gt;
&lt;table&gt;
  &lt;tr&gt;
    &lt;td&gt;###LLL:name###&lt;/td&gt;
    &lt;td&gt;###value_name###&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;###LLL:email###&lt;/td&gt;
    &lt;td&gt;###value_email###&lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
&lt;!-- ###TEMPLATE_SUBMITTEDOK### end --&gt;</pre></div></div>

<p><f5>newsletter.css</f5></p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#formhandler_newsletter_form</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100%</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#formhandler_newsletter_form</span> <span style="color: #6666ff;">.error</span> ul <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.errorField</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#FF0000</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<h5>Die eine Zeile TypoScript</h5>

<div class="wp_syntax"><div class="code"><pre class="typoscript" style="font-family:monospace;"><span style="color: #3366CC;">&lt;INCLUDE_TYPOSCRIPT: source=&quot;FILE:fileadmin/templates/formhandler/newsletter.ts&quot;&gt;</span></pre></div></div>

<p>------------------------------------------------------<br />Dies ist ein Post vom <a href="http://typo3blogger.de/">TYPO3 Blog</a> typo3blogger.de!</p>
]]></content:encoded>
			<wfw:commentRss>http://typo3blogger.de/newsletteranmeldung-mit-formhandler-turchen-14/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Eigenes Wetter mit der Google-Weather API in TYPO3 einbinden &#8211; Türchen 12</title>
		<link>http://typo3blogger.de/wettereinbindung-in-typo3/</link>
		<comments>http://typo3blogger.de/wettereinbindung-in-typo3/#comments</comments>
		<pubDate>Mon, 12 Dec 2011 07:00:11 +0000</pubDate>
		<dc:creator>Sven Wolfermann</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[TYPO3]]></category>
		<category><![CDATA[TypoScript]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[typo3]]></category>
		<category><![CDATA[typoscript]]></category>
		<category><![CDATA[userfunc]]></category>
		<category><![CDATA[wetter]]></category>

		<guid isPermaLink="false">http://typo3blogger.de/?p=6871</guid>
		<description><![CDATA[Eine Wetter-Vorhersage in der eigenen Website bietet einen nützlichen Mehrwert, wenn z.B. das Thema der Website etwas mit Outdoor-Aktivitäten zu tun hat. Einige Online-Services, die sogenannte Wetter-Widgets anbieten, könnte man dazu verwenden. Diese lassen sich zumeist aber nicht an das Design der Website anpassen und haben vorbestimmte Abmaße. Möchte man das aktuelle Wetter eines Ortes [...]<p>------------------------------------------------------<br />Dies ist ein Post vom <a href="http://typo3blogger.de/">TYPO3 Blog</a> typo3blogger.de!</p>
]]></description>
			<content:encoded><![CDATA[<p><img src="http://typo3blogger.de/wp-content/uploads/2011/11/mostly-sunny.png" alt="sonne icon" title="mostly-sunny" width="172" height="117" class="alignleft size-full wp-image-7173" />Eine Wetter-Vorhersage in der eigenen Website bietet einen nützlichen Mehrwert, wenn z.B. das Thema der Website etwas mit Outdoor-Aktivitäten zu tun hat. Einige Online-Services, die sogenannte Wetter-Widgets anbieten, könnte man dazu verwenden. Diese lassen sich zumeist aber nicht an das Design der Website anpassen und haben vorbestimmte Abmaße. Möchte man das aktuelle Wetter eines Ortes anzeigen und die Ausgabe mit HTML/CSS verändern, eignet sich die <a href="http://developer.yahoo.com/weather/" title="Yahoo Weather API" target="_blank">Yahoo-Weather API</a> recht gut und bietet zudem <a href="http://l.yimg.com/a/lib/ywc/img/wicons.png">ansehnliche Wetter-Icons</a>. <span id="more-6871"></span></p>
<p>Die Google Wetter API ist leider nicht dokumentiert, ist eigentlich auch nur für die Weather-Widgets in iGoogle gedacht. Die Standard-API liefert zudem nicht unbedingt hübsche Icons. Vorteil ist allerdings, dass Sie eine Wetter-Vorhersage über mehrere Tage liefert. Glücklicherweise ist es nicht so schwer die Wetter-Vorhersage auf der eigenen TYPO3-Website anzuzeigen und dazu eigene Symbole zu verwenden.</p>
<p>Man kann natürlich extra eine kleine TYPO3-Extension schreiben, ist aber unnötig, da ja keine Daten (in der Datenbank) gespeichert werden müssen. Es genügt, wenn man eine sogenannte <strong>User-Function</strong> schreibt und diese per Marker in die Website einfügt. Unsere User-Function ist auch schon so vorbereitet, dass man eigene Wetter-Icon verwenden und die Location einfach im TYPOscript editieren kann, aber dazu später mehr.</p>
<h3>Schritt 1: Marker in HTML-Template einfügen</h3>
<p>An die Stelle wo später das Wetter-Modul ausgegeben werden soll, wird ein Marker im Template angelegt, z.B.:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;div&gt;###WETTER###&lt;/div&gt;</pre></div></div>

<h3>Schritt 2: Marker im TYPOscript enbinden</h3>
<p>In dem Tutorial verwenden wir ein klassisches TYPO3 Marker-Template und fügen den Marker im page-Objekt hinzu, in meinem Fall:</p>

<div class="wp_syntax"><div class="code"><pre class="typoscript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">page</span><span style="color: #339933; font-weight: bold;">.</span>10 <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #990000; font-weight: bold;">TEMPLATE</span>
<span style="color: #000066; font-weight: bold;">page</span><span style="color: #339933; font-weight: bold;">.</span>10 <span style="color: #009900;">&#123;</span>
  <span style="color: #339933; font-weight: bold;">...</span>
  marks <span style="color: #009900;">&#123;</span>
    WETTER <span style="color: #339933; font-weight: bold;">&lt;</span> <span style="color: #000066; font-weight: bold;">lib</span><span style="color: #339933; font-weight: bold;">.</span>weather
    <span style="color: #339933; font-weight: bold;">...</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<h3>Schritt 3: Die PHP User-Funktion für die Google-Wetter API Abfrage</h3>
<p>Zwingend notwendig für das Einbinden einer eigenen PHP-Datei über eine User-Function in TYPO3 sind folgende 3 Punkte:</p>
<p>•    Dateiname beginnt mit &#8220;user_&#8221;<br />
•    Die PHP-Datei enthält eine Klasse die mit &#8220;user_&#8221; beginnt<br />
•    die PHP-Funktion übergibt mit &#8220;return&#8221; die Inhalte an TYPO3</p>
<h3>Schritt 4: User-Function in TYPO3 einbinden</h3>
<p>Die User-Function wird jetzt in TYPO3 eingebunden und über die Variablen konfiguriert</p>

<div class="wp_syntax"><div class="code"><pre class="typoscript" style="font-family:monospace;"><span style="color: #aaa; font-style: italic;">/**
* lib.weather
* @description:    wetter ausgabe in html
*/</span>
<span style="color: #000066; font-weight: bold;">includeLibs</span><span style="color: #339933; font-weight: bold;">.</span>weather <span style="color: #339933; font-weight: bold;">=</span> fileadmin<span style="color: #339933; font-weight: bold;">/</span>scripts<span style="color: #339933; font-weight: bold;">/</span><span style="color: #000066; font-weight: bold;">user_weather</span><span style="color: #339933; font-weight: bold;">.</span>php
&nbsp;
<span style="color: #000066; font-weight: bold;">lib</span><span style="color: #339933; font-weight: bold;">.</span>weather <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #990000; font-weight: bold;">USER</span>
<span style="color: #000066; font-weight: bold;">lib</span><span style="color: #339933; font-weight: bold;">.</span>weather <span style="color: #009900;">&#123;</span>
  <span style="color: #ed7d14;">userFunc</span> <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #000066; font-weight: bold;">user_weather</span>-<span style="color: #339933; font-weight: bold;">&gt;</span>get
  poi <span style="color: #339933; font-weight: bold;">=</span> Hamburg
  path <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #339933; font-weight: bold;">/</span>fileadmin<span style="color: #339933; font-weight: bold;">/</span>templates<span style="color: #339933; font-weight: bold;">/</span>img<span style="color: #339933; font-weight: bold;">/</span>wetter-icons<span style="color: #339933; font-weight: bold;">/</span>
  png <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #cc0000;">1</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Im cObject USER können wie schon erwähnt Variablen definiert werden. Für die Location, für den das Wetter über die Weather-API abgerufen werden soll, füllt man die Variable &#8220;poi&#8221; mit dem Ort, in unserem Fall &#8220;Hamburg&#8221;. Zudem kann man in &#8220;path&#8221; den Pfad zu den eigenen Wetter-Symbolen angeben. Ist die Variable nicht gefüllt, werden die Standard Wetter-Symbole von Google verwendet.</p>
<p>Folgende Wetter-Zustände kennt die Google Wetter API (Quelle: <a href="http://www.web-spirit.de/webdesign-tutorial/9/Wetter-auf-eigener-Website-mit-Google-Weather-API">www.web-spirit.de</a>):</p>

<div class="wp_syntax"><div class="code"><pre class="txt" style="font-family:monospace;">chance_of_rain
sunny
mostly_sunny
partly_cloudy
mostly_cloudy
chance_of_storm
showers
rain
chance_of_snow
cloudy
mist
storm
thunderstorm
chance_of_tstorm
sleet
snow
icy
dust
fog
smoke
haze
flurries</pre></div></div>

<p>Wir haben unsere eigenen Wetter-Icons als PNG-Grafiken mit Alpha-Transparenz abgespeichert. In diesem Fall muss die Variable &#8220;png&#8221; auf 1 gesetzt werden, weil dann die Wetter-Dateiendungen von GIF auf PNG in der user_weather.php umgeschrieben wird.</p>
<p>Ein schönes Wetter-Icon Set findet man bei <a href="http://graphicriver.net/item/35-weather-forecast-icons/909404?ref=maddesigns" title="Weather Forecast Icons" target="_blank">graphicriver.net</a>.</p>
<p><a href="http://graphicriver.net/item/35-weather-forecast-icons/909404?ref=maddesigns"><img src="http://typo3blogger.de/wp-content/uploads/2011/11/wetter-icons.jpg" alt="" title="wetter-icons" width="500" height="307" class="alignnone size-full wp-image-7166" /></a></p>
<h2>Demo-Screenshot</h2>
<p>Nachdem das fertige Wetter-Modul mit CSS gestaltet wurde, sieht es so aus:<br />
<img src="http://typo3blogger.de/wp-content/uploads/2011/11/demo-screen.png" alt="" title="demo-screen" width="319" height="45" class="aligncenter size-full wp-image-7167" /></p>
<h2>Download</h2>
<p>PHP-Datei als TXT-Version zum Download: <a href='http://typo3blogger.de/wp-content/uploads/2011/11/user_weather.php_.txt'>user_weather.php.txt</a> </p>
<h3>Hinweis</h3>
<p>Da es keine offizielle Google API ist, ist es nicht sicher wie lange die API noch zur Verfügung steht und ob die Verwendung für die eigene Website erlaubt ist. Bisher sind im Web dazu weder positive noch negative Meinungen zu finden. Wer dazu mehr weiß, kann gerne einen Kommentar posten. Habt ihr die Google Weather API schon in Projekten eingesetzt? Wer Verbesserungsvorschläge für die PHP-Userfunc hat, bitte kommentieren! Ich hatte dabei Unterstützung von Anja, danke dafür!</p>
<p>------------------------------------------------------<br />Dies ist ein Post vom <a href="http://typo3blogger.de/">TYPO3 Blog</a> typo3blogger.de!</p>
]]></content:encoded>
			<wfw:commentRss>http://typo3blogger.de/wettereinbindung-in-typo3/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>tt_news Icon Alternative für Datei Ressourcen &#8211; Türchen 11</title>
		<link>http://typo3blogger.de/tt_news-icon-alternative-fur-datei-ressourcen/</link>
		<comments>http://typo3blogger.de/tt_news-icon-alternative-fur-datei-ressourcen/#comments</comments>
		<pubDate>Sun, 11 Dec 2011 07:00:35 +0000</pubDate>
		<dc:creator>Tim Lochmüller</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[TYPO3]]></category>
		<category><![CDATA[TypoScript]]></category>

		<guid isPermaLink="false">http://typo3blogger.de/?p=7105</guid>
		<description><![CDATA[Die Tage stand ich vor dem Problem, dass die Icons in der Datei-Resourcen-Liste (tt_news-Detail-Ansicht) geändert werden sollten. Nach langem Suchen und vergeblichen Versuchen über &#8220;icon_image_ext_list&#8221; und &#8220;iconCObject&#8221; habe ich eine andere Lösung gefunden. Für das Beispiel unten, müsst ihr die Icons aus dem Ordner &#8220;typo3/sysext/cms/tslib/media/fileicons/&#8221; in euren eigenen Ordner kopieren (Im Beispiel: &#8220;fileadmin/images/icons/&#8221;). Das TypoScript [...]<p>------------------------------------------------------<br />Dies ist ein Post vom <a href="http://typo3blogger.de/">TYPO3 Blog</a> typo3blogger.de!</p>
]]></description>
			<content:encoded><![CDATA[<p>Die Tage stand ich vor dem Problem, dass die Icons in der Datei-Resourcen-Liste (tt_news-Detail-Ansicht) geändert werden sollten. Nach langem Suchen und vergeblichen Versuchen über &#8220;icon_image_ext_list&#8221; und &#8220;iconCObject&#8221; habe ich eine andere Lösung gefunden. Für das Beispiel unten, müsst ihr die Icons aus dem Ordner &#8220;typo3/sysext/cms/tslib/media/fileicons/&#8221; in euren eigenen Ordner kopieren (Im Beispiel: &#8220;fileadmin/images/icons/&#8221;).</p>
<p>Das TypoScript trennt dann mit dem &#8220;substring&#8221; den alten Pfad ab und setzt mit dem &#8220;innerWrap&#8221; einen neuen Pfad vor das Bild. Mit dem HTMLParser werden dann die &#8220;height&#8221; und &#8220;width&#8221; Attribute gelöscht, sodass die Größe durch die Datei selbst bestimmt wird. Auch wenn das Auseinanderschneiden des HTML nicht sauber ist, war es die einzig funktionierende Möglichkeiten eigene Icons für verschiedene Datei-Typen bereitzustellen (nur für tt_news).</p>

<div class="wp_syntax"><div class="code"><pre class="typoscript" style="font-family:monospace;"><span style="color: #990000; font-weight: bold;">plugin</span><span style="color: #339933; font-weight: bold;">.</span>tt_news<span style="color: #339933; font-weight: bold;">.</span>newsFiles <span style="color: #009900;">&#123;</span>
  target <span style="color: #339933; font-weight: bold;">=</span> _blank
  size<span style="color: #339933; font-weight: bold;">.</span>wrap <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #3366CC;">&lt;span&gt;</span><span style="color: #339933; font-weight: bold;">|</span><span style="color: #3366CC;">&lt;/span&gt;</span>
  <span style="font-weight: bold;">stdWrap</span> <span style="color: #009900;">&#123;</span>
    substring <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #cc0000;">49</span>
    innerWrap <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #339933; font-weight: bold;">&lt;</span>img src<span style="color: #339933; font-weight: bold;">=</span>&quot;fileadmin<span style="color: #339933; font-weight: bold;">/</span>images<span style="color: #339933; font-weight: bold;">/</span>icons<span style="color: #339933; font-weight: bold;">/</span> <span style="color: #339933; font-weight: bold;">|</span>
    <span style="font-weight: bold;">HTMLparser</span> <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #cc0000;">1</span>
    <span style="font-weight: bold;">HTMLparser</span> <span style="color: #009900;">&#123;</span>
      allowTags <span style="color: #339933; font-weight: bold;">=</span> a,img,span
      <span style="font-weight: bold;">tags</span><span style="color: #339933; font-weight: bold;">.</span>img<span style="color: #339933; font-weight: bold;">.</span>fixAttrib<span style="color: #339933; font-weight: bold;">.</span>width<span style="color: #339933; font-weight: bold;">.</span>unset <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #cc0000;">1</span>
      <span style="font-weight: bold;">tags</span><span style="color: #339933; font-weight: bold;">.</span>img<span style="color: #339933; font-weight: bold;">.</span>fixAttrib<span style="color: #339933; font-weight: bold;">.</span>height<span style="color: #339933; font-weight: bold;">.</span>unset <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #cc0000;">1</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>------------------------------------------------------<br />Dies ist ein Post vom <a href="http://typo3blogger.de/">TYPO3 Blog</a> typo3blogger.de!</p>
]]></content:encoded>
			<wfw:commentRss>http://typo3blogger.de/tt_news-icon-alternative-fur-datei-ressourcen/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Erweiterung des TYPO3 Berichte Moduls &#8211; Türchen 9</title>
		<link>http://typo3blogger.de/erweiterung-des-typo3-berichte-moduls-turchen-9/</link>
		<comments>http://typo3blogger.de/erweiterung-des-typo3-berichte-moduls-turchen-9/#comments</comments>
		<pubDate>Fri, 09 Dec 2011 07:00:44 +0000</pubDate>
		<dc:creator>Peter Kraume</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[TYPO3]]></category>

		<guid isPermaLink="false">http://typo3blogger.de/?p=6835</guid>
		<description><![CDATA[Seit TYPO3 4.3 gibt es im TYPO3 Backend das Modul &#8220;Berichte&#8221; (englisch &#8220;Reports&#8221;). TYPO3 liefert bereits einen Statusbericht und eine Liste der installierten Dienste mit. Der Statusbericht gibt Informationen über das System, die Sicherheit der Installation und die Konfiguration wieder. Außerdem wird der Status von ein paar Extensions angezeigt. Es gibt mittlerweile auch eine Reihe [...]<p>------------------------------------------------------<br />Dies ist ein Post vom <a href="http://typo3blogger.de/">TYPO3 Blog</a> typo3blogger.de!</p>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://typo3blogger.de/wp-content/uploads/2011/11/Reports01.png"><img class="alignright" title="Reports01" src="http://typo3blogger.de/wp-content/uploads/2011/11/Reports01-300x212.png" alt="" width="300" height="212" /></a>Seit TYPO3 4.3 gibt es im TYPO3 Backend das Modul &#8220;Berichte&#8221; (englisch &#8220;Reports&#8221;). TYPO3 liefert bereits einen Statusbericht und eine Liste der installierten Dienste mit. Der Statusbericht gibt Informationen über das System, die Sicherheit der Installation und die Konfiguration wieder. Außerdem wird der Status von ein paar Extensions angezeigt. Es gibt mittlerweile auch eine Reihe von Extensions, die das Berichts Modul um eigene Berichte erweitern, z.B. <a href="http://typo3.org/extensions/repository/view/memcached_reports/current/" target="_blank">memcached_reports</a>, <a href="http://typo3.org/extensions/repository/view/additional_reports/current/" target="_blank">additional_reports</a> oder <a href="http://typo3.org/extensions/repository/view/solr/current/" target="_blank">solr</a>.</p>
<p>Dieser Artikel soll einen kurzen Einblick geben, wie leicht sich das Modul um eigene Berichte erweitern lässt.</p>
<p><span id="more-6835"></span></p>
<p>Die System Extension reports liefert zwei Interfaces mit, je nach dem, was man tun möchte.</p>
<p>&nbsp;</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">interface</span> tx_reports_StatusProvider <span style="color: #009900;">&#123;</span> <span style="color: #009900;">&#125;</span></pre></div></div>

<p>tx_reports_StatusProvider wird verwendet, wenn man sich in den bestehenden Statusbericht einklinken möchte und diesen um einen eigenen Test erweitern möchte.</p>
<p>&nbsp;</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">interface</span> tx_reports_Report <span style="color: #009900;">&#123;</span> <span style="color: #009900;">&#125;</span></pre></div></div>

<p>Mit tx_reports_Report kann ein komplett eigenständiger Bericht erstellt werden.</p>
<h2></h2>
<h2>Statusbericht erweitern</h2>
<p>In der eigenen Extension wird eine Datei class.tx_myext_report_mystatus.php angelegt, der Ordnung halber idealerweise in einem Unterordner &#8220;reports&#8221;. Die Grundstuktur kann so aussehen:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">class</span> tx_myext_report_MyStatus implements tx_reports_StatusProvider <span style="color: #009900;">&#123;</span>
	<span style="color: #009933; font-style: italic;">/**
	 * Constructor for class tx_myext_report_MyStatus
	 */</span>
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> __construct<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$GLOBALS</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'LANG'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>includeLLFile<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'EXT:myext/report/locallang.xml'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #009933; font-style: italic;">/**
	 * do custom check
	 *
	 * @see typo3/sysext/reports/interfaces/tx_reports_StatusProvider::getStatus()
	 * @return array
	 */</span>
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> getStatus<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$reports</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #000088;">$status</span> <span style="color: #339933;">=</span> t3lib_div<span style="color: #339933;">::</span><span style="color: #004000;">makeInstance</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'tx_reports_reports_status_Status'</span><span style="color: #339933;">,</span>
			<span style="color: #000088;">$GLOBALS</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'LANG'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>getLL<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'title'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
			<span style="color: #000088;">$GLOBALS</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'LANG'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>getLL<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'value'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
			<span style="color: #000088;">$GLOBALS</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'LANG'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>getLL<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'message'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
			tx_reports_reports_status_Status<span style="color: #339933;">::</span><span style="color: #004000;">OK</span>
		<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #000088;">$reports</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$status</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$reports</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Außer der im Beispiel verwendeten Severity OK gibt es noch WARNING, ERROR, INFO und NOTICE.<br />
Damit die neue Klasse von TYPO3 erkannt wird, muss noch eine ext_autoload.php erstellt werden. Über die Extension <a href="http://typo3.org/extensions/repository/view/extdeveval/current/" target="_blank">extdeveval</a> kann man das auch automatisch erledigen lassen.</p>
<p>Zum Schluss muss nur noch in ext_tables.php der neue Status Provider registriert werden:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>TYPO3_MODE <span style="color: #339933;">==</span> <span style="color: #0000ff;">'BE'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$GLOBALS</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'TYPO3_CONF_VARS'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'SC_OPTIONS'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'reports'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'tx_reports'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'status'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'providers'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'myext'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'tx_myext_report_MyStatus'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<h2></h2>
<h2>eigenständiger Bericht</h2>
<p>Für einen neuen Bericht muss ext_tables.php wie folgt erweitert werden:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>TYPO3_MODE <span style="color: #339933;">==</span> <span style="color: #0000ff;">'BE'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$GLOBALS</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'TYPO3_CONF_VARS'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'SC_OPTIONS'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'reports'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'tx_myext'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'myreport'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
		<span style="color: #0000ff;">'title'</span>       <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #0000ff;">'LLL:EXT:myext/locallang.xml:report_myreport_title'</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'description'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #0000ff;">'LLL:EXT:myext/locallang.xml:report_myreport_description'</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'report'</span>      <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #0000ff;">'tx_myext_report_MyReport'</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'icon'</span>        <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #0000ff;">'EXT:myext/reports/tx_myext_report.gif'</span>
	<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Die dazugehörige class.tx_myext_report_myreport.php sieht dann so aus:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">class</span> tx_myext_report_MyReport implements tx_reports_Report <span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000088;">$reportsModule</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #009933; font-style: italic;">/**
	 * constructor for class tx_myext_report_MyReport
	 */</span>
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> __construct<span style="color: #009900;">&#40;</span>tx_reports_Module <span style="color: #000088;">$reportsModule</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>reportsModule <span style="color: #339933;">=</span> <span style="color: #000088;">$reportsModule</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>reportsModule<span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>doc<span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>addStyleSheet<span style="color: #009900;">&#40;</span>
			<span style="color: #0000ff;">'tx_myext'</span><span style="color: #339933;">,</span>
			<span style="color: #0000ff;">'../'</span> <span style="color: #339933;">.</span> t3lib_extMgm<span style="color: #339933;">::</span><span style="color: #004000;">siteRelPath</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'myext'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'resources/css/reports/myreport.css'</span>
		<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> getReport<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$content</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Content of my report'</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$content</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Auch hier muss die ext_autoload.php entsprechend angepasst werden.</p>
<h2>Fazit</h2>
<p>Mit wenigen Zeilen Code können der Statusbericht erweitert oder eigenständige Berichte erstellt werden. Für die Admins von TYPO3 Webseiten bieten die Berichte einen großen Mehrwert, da sie so schnell neue oder geänderte Zustände erkennen können.</p>
<p>Die eingangs genannten Extensions bieten Inspirationen, was man alles machen kann. Viel Spaß beim ausprobieren!</p>
<p>(Achtung: in meinen Code Beispielen hat es die Pfeile zerlegt. &amp;gt; muss entsprechend durch einen Pfeil nach rechts ersetzt werden!)</p>
<p>------------------------------------------------------<br />Dies ist ein Post vom <a href="http://typo3blogger.de/">TYPO3 Blog</a> typo3blogger.de!</p>
]]></content:encoded>
			<wfw:commentRss>http://typo3blogger.de/erweiterung-des-typo3-berichte-moduls-turchen-9/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

