<?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, 07 Feb 2012 21:39:48 +0000</lastBuildDate>
	<language>de-de</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<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>4</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>17</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>6</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>
		<item>
		<title>FlexForm Autoloader &#8211; Türchen 5</title>
		<link>http://typo3blogger.de/flexform-autoloader/</link>
		<comments>http://typo3blogger.de/flexform-autoloader/#comments</comments>
		<pubDate>Mon, 05 Dec 2011 07:00:51 +0000</pubDate>
		<dc:creator>Tim Lochmüller</dc:creator>
				<category><![CDATA[ExtBase/Fluid]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[TYPO3blogger]]></category>

		<guid isPermaLink="false">http://typo3blogger.de/?p=7069</guid>
		<description><![CDATA[Erneut ein schönes Snippet, welches inzwischen in den meisten eigenen Extensions untergebracht ist. Die Funktion ist statisch und kann in diesem Beispiel mit Tx_ExtensionName_Utility_Helper::flexFormAutoLoader() aufgerufen werden. Dieser Aufruf kommt an das Ende eurer ext_tables.php Datei und sorgt dafür, dass eure FlexForms automatisch mit euren Plugins verknüpft werden. Sehr praktisch, wenn es viele Plugins gibt. Habt [...]<p>------------------------------------------------------<br />Dies ist ein Post vom <a href="http://typo3blogger.de/">TYPO3 Blog</a> typo3blogger.de!</p>
]]></description>
			<content:encoded><![CDATA[<p>Erneut ein schönes Snippet, welches inzwischen in den meisten eigenen Extensions untergebracht ist. Die Funktion ist statisch und kann in diesem Beispiel mit Tx_ExtensionName_Utility_Helper::flexFormAutoLoader() aufgerufen werden. Dieser Aufruf kommt an das Ende eurer ext_tables.php Datei und sorgt dafür, dass eure FlexForms automatisch mit euren Plugins verknüpft werden. Sehr praktisch, wenn es viele Plugins gibt.</p>
<p>Habt ihr vielleicht Ideen für die Ergänzung oder weitere Ideen für ähnliche Funktionalitäten?!</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">class</span> Tx_ExtensionName_Utility_Helper <span style="color: #009900;">&#123;</span>
    <span style="color: #009933; font-style: italic;">/**
     * Call this function at the end of your ext_tables.php to autoregister the flexforms
     * of the extension to the given plugins.
     */</span>
    <span style="color: #000000; font-weight: bold;">public</span> static <span style="color: #000000; font-weight: bold;">function</span> flexFormAutoLoader<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$TCA</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_EXTKEY</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$FlexFormPath</span> <span style="color: #339933;">=</span> t3lib_extMgm<span style="color: #339933;">::</span><span style="color: #004000;">extPath</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_EXTKEY</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'Configuration/FlexForms/'</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$extensionName</span> <span style="color: #339933;">=</span> t3lib_div<span style="color: #339933;">::</span><span style="color: #004000;">underscoredToUpperCamelCase</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_EXTKEY</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000088;">$FlexForms</span> <span style="color: #339933;">=</span> t3lib_div<span style="color: #339933;">::</span><span style="color: #004000;">getFilesInDir</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$FlexFormPath</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'xml'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$FlexForms</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$FlexForm</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000088;">$fileKey</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'.xml'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000088;">$FlexForm</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #000088;">$pluginSignature</span> <span style="color: #339933;">=</span> <span style="color: #990000;">strtolower</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$extensionName</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'_'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$fileKey</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$TCA</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'tt_content'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'types'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'list'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'subtypes_excludelist'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$pluginSignature</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'layout,select_key,recursive'</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$TCA</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'tt_content'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'types'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'list'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'subtypes_addlist'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$pluginSignature</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'pi_flexform'</span><span style="color: #339933;">;</span>
            t3lib_extMgm<span style="color: #339933;">::</span><span style="color: #004000;">addPiFlexFormValue</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$pluginSignature</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'FILE:EXT:'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$_EXTKEY</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/Configuration/FlexForms/'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$fileKey</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'.xml'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</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/flexform-autoloader/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>SASS / SCSS &amp; sassify Extension &#8211; Türchen 3</title>
		<link>http://typo3blogger.de/sass-scss-sassify-extension/</link>
		<comments>http://typo3blogger.de/sass-scss-sassify-extension/#comments</comments>
		<pubDate>Sat, 03 Dec 2011 07:00:09 +0000</pubDate>
		<dc:creator>Sandra Tyrchan</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=6935</guid>
		<description><![CDATA[Sass (Syntactically Awesome Stylesheets) ist eine Stylesheet-Sprache, welche in gut formatierte standard CSS umgewandelt wird. Mit dieser ist es möglich Variables, Nesting, Mixings und Selector Inheritance und vieles mehr zu verwenden. Die Dateiendung ist &#8220;.scss&#8221;. Anbei einige Beispiele&#8230; Variablen Man definiert einen Wert, welcher dann an entsprechender Stelle im Code immer wieder eingefügt werden kann. [...]<p>------------------------------------------------------<br />Dies ist ein Post vom <a href="http://typo3blogger.de/">TYPO3 Blog</a> typo3blogger.de!</p>
]]></description>
			<content:encoded><![CDATA[<p>Sass (Syntactically Awesome Stylesheets) ist eine Stylesheet-Sprache, welche in gut formatierte standard CSS umgewandelt wird.<br />
Mit dieser ist es möglich Variables, Nesting, Mixings und Selector Inheritance und vieles mehr zu verwenden. Die Dateiendung ist &#8220;.scss&#8221;. Anbei einige Beispiele&#8230;<span id="more-6935"></span></p>
<h2>Variablen</h2>
<p>Man definiert einen Wert, welcher dann an entsprechender Stelle im Code immer wieder eingefügt werden kann.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">$black<span style="color: #00AA00;">:</span>       <span style="color: #cc00cc;">#222222</span><span style="color: #00AA00;">;</span>
$blue<span style="color: #00AA00;">:</span>        <span style="color: #cc00cc;">#083672</span><span style="color: #00AA00;">;</span>
$white<span style="color: #00AA00;">:</span>       <span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span>
$arrow_white<span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'../img/arrow_white.png'</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
$arrow_blue<span style="color: #00AA00;">:</span>  <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'../img/arrow_blue.png'</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
body <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> Arial<span style="color: #00AA00;">,</span> Verdana<span style="color: #00AA00;">,</span> <span style="color: #993333;">sans-serif</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span>   <span style="color: #933;">0.8em</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span>       $black<span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span>  <span style="color: #993333;">center</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span>  $white<span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
a <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> $blue $arrow_white <span style="color: #993333;">no-repeat</span> <span style="color: #933;">205px</span> <span style="color: #933;">13px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<h2>Nesting</h2>
<p>Mit dieser Methode kann man sich super viel Schreibarbeit ersparen. Es werden einfach die Elemente ineinander verschachtelt.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">nav <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span> 
  <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span>  <span style="color: #cc66cc;">0</span> <span style="color: #933;">240px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">710px</span><span style="color: #00AA00;">;</span>
&nbsp;
  li <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">inline</span><span style="color: #00AA00;">;</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>
&nbsp;
    a <span style="color: #00AA00;">&#123;</span>
     <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</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;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">10px</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
     <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0.85em</span><span style="color: #00AA00;">;</span>
     <span style="color: #00AA00;">&#125;</span>
&nbsp;
   <span style="color: #00AA00;">&#125;</span> <span style="color: #808080; font-style: italic;">/* li */</span>
&nbsp;
 <span style="color: #00AA00;">&#125;</span> <span style="color: #808080; font-style: italic;">/* nav */</span></pre></div></div>

<h2>Mixins</h2>
<p>Mit dieser Methode ist es möglich mehrere CSS-Definitionen einzufügen. Sehr hilfreich z.B. bei den CSS3 Definitionen, die für jeden Browser speziell definiert werden müssen.<br />
<strong>Definition Mixin</strong></p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #a1a100;">@mixin verlaufZweiFarben($hauptfarbe, $farbe1) { </span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> $hauptfarbe<span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* Old browsers */</span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> -moz-linear-gradient<span style="color: #00AA00;">&#40;</span><span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">,</span> $hauptfarbe <span style="color: #933;">0%</span><span style="color: #00AA00;">,</span> $farbe1 <span style="color: #933;">100%</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* FF3.6+ */</span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> -webkit-gradient<span style="color: #00AA00;">&#40;</span>linear<span style="color: #00AA00;">,</span> <span style="color: #000000; font-weight: bold;">left</span> <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">,</span> <span style="color: #000000; font-weight: bold;">left</span> <span style="color: #000000; font-weight: bold;">bottom</span><span style="color: #00AA00;">,</span> color-stop<span style="color: #00AA00;">&#40;</span><span style="color: #933;">0%</span><span style="color: #00AA00;">,</span>$hauptfarbe<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">,</span> color-stop<span style="color: #00AA00;">&#40;</span><span style="color: #933;">100%</span><span style="color: #00AA00;">,</span>$farbe1<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* Chrome,Safari4+ */</span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> -webkit-linear-gradient<span style="color: #00AA00;">&#40;</span><span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">,</span> $hauptfarbe <span style="color: #933;">0%</span><span style="color: #00AA00;">,</span>$farbe1 <span style="color: #933;">100%</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* Chrome10+,Safari5.1+ */</span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> -o-linear-gradient<span style="color: #00AA00;">&#40;</span><span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">,</span> $hauptfarbe <span style="color: #933;">0%</span><span style="color: #00AA00;">,</span>$farbe1 <span style="color: #933;">100%</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* Opera11.10+ */</span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> -ms-linear-gradient<span style="color: #00AA00;">&#40;</span><span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">,</span> $hauptfarbe <span style="color: #933;">0%</span><span style="color: #00AA00;">,</span>$farbe1 <span style="color: #933;">100%</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* IE10+ */</span>
  filter<span style="color: #00AA00;">:</span> <span style="color: #ff0000;">&quot;progid:DXImageTransform.Microsoft.gradient( startColorstr='$hauptfarbe', endColorstr='$farbe1',GradientType=0 )&quot;</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* IE6-9 */</span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> linear-gradient<span style="color: #00AA00;">&#40;</span><span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">,</span> $hauptfarbe <span style="color: #933;">0%</span><span style="color: #00AA00;">,</span>$farbe1 <span style="color: #933;">100%</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* W3C */</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p><strong>Integration Mixin</strong></p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">article <span style="color: #00AA00;">&#123;</span> 
  <span style="color: #a1a100;">@include verlaufZweiFarben;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<h2>Selector Inheritance</h2>
<p>Mit dieser Methode ist es möglich Stile zu kopieren, ohne die CSS Eigenschaften zu duplizieren.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.infobox</span> <span style="color: #00AA00;">&#123;</span> 
  <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#000</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#dddddd</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#000</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Hier werden jetzt alle Styles, die bereits in “.infobox” definiert wurden integriert.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.teaser</span> <span style="color: #00AA00;">&#123;</span> 
  <span style="color: #a1a100;">@extend .infobox;</span>
  <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1em</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<h2>Funktionen</h2>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">$color<span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#777777</span><span style="color: #00AA00;">;</span>
<span style="color: #cc00cc;">#content</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span>-<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> darken<span style="color: #00AA00;">&#40;</span>$color<span style="color: #00AA00;">,</span><span style="color: #933;">20%</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> lighten<span style="color: #00AA00;">&#40;</span>$color<span style="color: #00AA00;">,</span><span style="color: #933;">50%</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
Definition als CSS
<span style="color: #cc00cc;">#content</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;">#444444</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#f6f6f6</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Weitere Informationen sind auf der offiziellen SASS Homepage zu finden unter <a href="http://sass-lang.com" target="_blank">sass-lang.com</a>. Für alle, die die Firebug Extension für den Firefox nutzen, gibt es zudem die Erweiterung <a href="https://addons.mozilla.org/en-US/firefox/addon/firesass-for-firebug/" target="_blank">FireSass</a>.</p>
<h2>SASS in TYPO3</h2>
<p>Die Extension <a href="http://typo3.org/extensions/repository/?tx_terfe_pi1%5Bview%5D=search&#038;no_cache=1&#038;tx_terfe_pi1%5Bsword%5D=sassify" target="_blank">sassify</a> unterstützt die Integration von SASS in TYPO3. Einfach herunter laden, installieren, Include static Template einbinden und Ts Code definieren. z.B.:</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_sassify_plugin <span style="color: #009900;">&#123;</span>  
  debugInfo <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #cc0000;">0</span>
  showExceptions <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #cc0000;">1</span>
  cache <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #cc0000;">0</span>
  stylesheets <span style="color: #009900;">&#123;</span>    
    <span style="color: #cc0000;">10</span> <span style="color: #339933; font-weight: bold;">=</span> reset<span style="color: #339933; font-weight: bold;">.</span>scss
    <span style="color: #cc0000;">10</span> <span style="color: #009900;">&#123;</span>
      filenameWrap<span style="color: #339933; font-weight: bold;">.</span>wrap <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>scss<span style="color: #339933; font-weight: bold;">/|</span>    
      media <span style="color: #339933; font-weight: bold;">=</span> screen    
    <span style="color: #009900;">&#125;</span>
    <span style="color: #cc0000;">20</span> <span style="color: #339933; font-weight: bold;">=</span> screen<span style="color: #339933; font-weight: bold;">.</span>scss
    <span style="color: #cc0000;">20</span> <span style="color: #009900;">&#123;</span>
      filenameWrap<span style="color: #339933; font-weight: bold;">.</span>wrap <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>scss<span style="color: #339933; font-weight: bold;">/|</span>    
      media <span style="color: #339933; font-weight: bold;">=</span> screen    
    <span style="color: #009900;">&#125;</span>
    <span style="color: #cc0000;">50</span> <span style="color: #339933; font-weight: bold;">=</span> print<span style="color: #339933; font-weight: bold;">.</span>scss
    <span style="color: #cc0000;">50</span> <span style="color: #009900;">&#123;</span>
      filenameWrap<span style="color: #339933; font-weight: bold;">.</span>wrap <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>scss<span style="color: #339933; font-weight: bold;">/|</span>    
      media <span style="color: #339933; font-weight: bold;">=</span> print    
    <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Seitenspezifische CSS können einfach mittels Conditions definiert werden</p>

<div class="wp_syntax"><div class="code"><pre class="typoscript" style="font-family:monospace;"><span style="color: #009900;">&#91;</span><span style="color: #ed7d14;">PIDinRootline</span> <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #cc0000;">2</span><span style="color: #009900;">&#93;</span>
  <span style="color: #990000; font-weight: bold;">plugin</span><span style="color: #339933; font-weight: bold;">.</span>tx_sassify_plugin<span style="color: #339933; font-weight: bold;">.</span>stylesheets<span style="color: #339933; font-weight: bold;">.</span>21 <span style="color: #339933; font-weight: bold;">=</span> home<span style="color: #339933; font-weight: bold;">.</span>scss
  <span style="color: #990000; font-weight: bold;">plugin</span><span style="color: #339933; font-weight: bold;">.</span>tx_sassify_plugin<span style="color: #339933; font-weight: bold;">.</span>stylesheets<span style="color: #339933; font-weight: bold;">.</span>21<span style="color: #339933; font-weight: bold;">.</span>filenameWrap<span style="color: #339933; font-weight: bold;">.</span>wrap <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>scss<span style="color: #339933; font-weight: bold;">/|</span>
<span style="color: #009900;">&#91;</span><span style="color: #ed7d14;">end</span><span style="color: #009900;">&#93;</span></pre></div></div>

<p>Wer von euch auf den Geschmack gekommen ist und SASS ausprobieren möchte, kann auch ganz einfach seine bisherigen css Dateien umbenennen in .scss und die neuen Sachen Stück für Stück integrieren. Man kann klein anfangen – z.B. erst einmal nur die Farben als Variablen definieren und sich dann allmählich weiter entwickeln. Ich habe mich super schnell dran gewöhnt und mag SASS absolut nicht mehr missen.</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/sass-scss-sassify-extension/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Der neue Seitenbaum seit TYPO3 4.5 &#8211; Türchen 1</title>
		<link>http://typo3blogger.de/der-neue-seitenbaum-seit-typo3-4-5-turchen-1/</link>
		<comments>http://typo3blogger.de/der-neue-seitenbaum-seit-typo3-4-5-turchen-1/#comments</comments>
		<pubDate>Thu, 01 Dec 2011 07:00:42 +0000</pubDate>
		<dc:creator>Peter Kraume</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[TYPO3]]></category>

		<guid isPermaLink="false">http://typo3blogger.de/?p=6035</guid>
		<description><![CDATA[Bereits mit TYPO3 4.5 wurde im Januar 2011 ein neuer Seitenbaum auf Basis von ExtJS und Ext.Direct im TYPO3 Backend eingeführt. Dieser neue Seitenbaum bringt einige Vorteile, die aber zum Teil nicht auf den ersten Blick ersichtlich sind. Auf die vielen neuen Features will ich im ersten Adventskalender Türchen eingehen. Neue Seiten per Drag &#38; [...]<p>------------------------------------------------------<br />Dies ist ein Post vom <a href="http://typo3blogger.de/">TYPO3 Blog</a> typo3blogger.de!</p>
]]></description>
			<content:encoded><![CDATA[<p>Bereits mit TYPO3 4.5 wurde im Januar 2011 ein neuer Seitenbaum auf Basis von ExtJS und Ext.Direct im TYPO3 Backend eingeführt.</p>
<p>Dieser neue Seitenbaum bringt einige Vorteile, die aber zum Teil nicht auf den ersten Blick ersichtlich sind. Auf die vielen neuen Features will ich im ersten Adventskalender Türchen eingehen.<br />
<span id="more-6035"></span><br />
<h2>Neue Seiten per Drag &amp; Drop anlegen</h2>
<p><a href="http://typo3blogger.de/wp-content/uploads/2011/11/pagetree01.png"><img class="alignright size-full wp-image-7001" title="pagetree01" src="http://typo3blogger.de/wp-content/uploads/2011/11/pagetree01.png" alt="" width="296" height="408" /></a>Die wohl nützlichste Neuerung dürfte das Drag &amp; Drop Feature sein, mit dem sich Seiten anlegen, verschieben, löschen und kopieren lassen. Nach einem Klick auf das Icon mit dem grünen Plus links oben im Seitenbaum erscheint ein Toolbar mit Icons für die verschiedenen Seitentypen. Mit klicken und ziehen kann man das Icon dann an die Stelle im Seitenbaum ziehen, wo eine neue Seite oder ein neuer Ordner angelegt werden soll. Eine dünne grau Linie zeigt die Stelle, an der die neue Seite eingefügt wird. Direkt nach dem Einfügen der Seite in den Seitenbaum wird der Seitenbaum aktualisiert und es erscheint die neue Seite, per Default versteckt. Außerdem hat man direkt im Seitenbaum die Möglichkeit, den Titel der Seite zu setzen, da automatisch ein editierbares Textfeld erscheint.</p>
<h2>Seitentitel direkt im Seitenbaum ändern</h2>
<p>Auch die Titel von bestehenden Seiten lassen sich im Seitenbaum ganz fix ändern. Dazu muss nur doppelt auf den Seitentitel geklickt werden und voilà, wieder erscheint das Textfeld zum Ändern des Titels. Mit Enter wird die Änderung des Titels bestätigt, mit Escape kann man den Bearbeitungsmodus ohne Änderung verlassen.</p>
<h2>Seiten verschieben und kopieren</h2>
<p>Um eine Seite an eine andere Stelle im Seitenbaum zu verschieben, zieht man den Seitentitel einfach an die gewünschte neue Stelle und lässt die Seite dort los. Wenn die Seite kopiert werden soll, muss während des Ziehens nur ein Mal die Strg Taste gedrückt werden.</p>
<p>Der Drag &amp; Drop Vorgang kann jederzeit mit der Escape Taste abgebrochen werden.</p>
<h2>Löschen von Seiten</h2>
<p><a href="http://typo3blogger.de/wp-content/uploads/2011/11/pagetree02.png"><img class="alignright size-full wp-image-7006" title="pagetree02" src="http://typo3blogger.de/wp-content/uploads/2011/11/pagetree02.png" alt="" width="299" height="261" /></a>Per Drag &amp; Drop können auch Seiten aus dem Seitenbaum gelöscht werden. Während eine Seite gezogen wird, erscheint unterhalb des Seitenbaums eine dunkelgraue Fläche. Dort abgelegte Seiten werden gelöscht. Falls eine Seite dort versehentlich abgelegt wurde, kann der Löschvorgang noch einige Sekunden lang rückgängig gemacht werden. Danach muss der Papierkorb von TYPO3 bemüht werden.</p>
<h2>TYPO3 merkt sich den Zustand des Seitenbaums</h2>
<p>Wie auch schon in früheren Versionen von TYPO3 merkt sich der Seitenbaum den aktuellen Zustand, also welche Teilbäume ausgeklappt sind. Zusätzlich merkt sich TYPO3 jetzt auch die zuletzt angeklickte Seite und öffnete diese auch nach einem erneuten Login als erstes.</p>
<h2>Filtern des Seitenbaums</h2>
<p><a href="http://typo3blogger.de/wp-content/uploads/2011/11/pagetree03.png"><img class="alignright size-full wp-image-7008" title="pagetree03" src="http://typo3blogger.de/wp-content/uploads/2011/11/pagetree03.png" alt="" width="298" height="220" /></a>Ein großartiges neues Feature sind die Möglichkeiten, die Seiten im Seitenbaum zu filtern. Bislang funktionierte die Filterung nur für Seiten, die auch ausgeklappt und somit sichtbar waren. Jetzt wird wirklich der gesamte Seitenbaum durchsucht.</p>
<p>Die Filterfunktion wird über das Filter Icon über dem Seitenbaum gestartet. Sobald mehr als drei Zeichen eingegeben wurden, wird der Filter Modus gestartet und es werden nur noch Seiten im Seitenbaum angezeigt, die die gesuchte Zeichenkette enthalten bzw. der Klickpfad zu diesen Seiten. Die genauen Treffer werden farblich hervorgehoben. Anstelle von Buchstaben können auch Seiten IDs direkt eingegeben werden. In diesem Fall entfällt das drei Zeichen Limit zum Starten des Filter Modus.</p>
<h2>Kontext Menü</h2>
<p><a href="http://typo3blogger.de/wp-content/uploads/2011/11/pagetree04.png"><img class="alignright size-full wp-image-7012" title="pagetree04" src="http://typo3blogger.de/wp-content/uploads/2011/11/pagetree04.png" alt="" width="328" height="290" /></a>Zusätzlich zum eigentlichen Seitenbaum wurde auch das Kontext Menü überarbeitet. Es ist über einen Links- oder Rechtsklick auf das Icon oder den Seitentitel aufrufbar. Sofort sichtbar sind die Funktionen, die nicht über die Drag &amp; Drop Funktionalität abgedeckt sind. Dazu gehören die Vorschau, das Aktivieren oder Deaktivieren von Seiten und andere Funktionen. Im Bereich &#8220;Seitenaktionen&#8221; befinden sich die Funktionen, die auch per Drag &amp; Drop genutzt werden können. Unter &#8220;Teilbereichsaktionen&#8221; verbergen sich noch nützliche weitere Funktionen wie das Ein- und Ausblenden gesamter Teilbäume inklusiver aller Unterbäume und der Import und Export als t3d Datei.</p>
<p>Das Kontext Menü kann durch eigene Aktionen erweitert werden. Im TYPO3Wiki findet sich ein <a href="http://wiki.typo3.org/Pagetree#How_to_add_custom_actions" target="_blank">Artikel</a> mit einer Demo Extension und Beispielcode.</p>
<h2>Temporäre Datenbankfreigabe</h2>
<p><a href="http://typo3blogger.de/wp-content/uploads/2011/11/pagetree05.png"><img class="alignright size-full wp-image-7013" title="pagetree05" src="http://typo3blogger.de/wp-content/uploads/2011/11/pagetree05.png" alt="" width="288" height="148" /></a>Wer oft mit umfangreichen Seitenbäumen zu tun hat, wird sich über eine weitere Funktion aus dem Untermenü &#8220;Teilbereichsaktionen&#8221; freuen. Über den Menüpunkt &#8220;Als Startpunkt für den Seitenbaum festlegen&#8221; kann eine beliebige Unterseite als Startseite festgelegt werden. Der restliche Seitenbaum wird dann ausgeblendet. Der Zustand der temporären Datenbankfreigabe bleibt natürlich auch nach einem erneuten Login erhalten.</p>
<h2>Datenbankfreigaben für Redakteure</h2>
<p><a href="http://typo3blogger.de/wp-content/uploads/2011/11/pagetree06.png"><img class="alignright size-full wp-image-7017" title="pagetree06" src="http://typo3blogger.de/wp-content/uploads/2011/11/pagetree06.png" alt="" width="243" height="120" /></a>Bei Datenbankfreigaben für Redakteure funktionieren alle oben beschriebenen Funktionen genauso.</p>
<p>Eine kleine Verbesserung bietet die Benutzer TypoScript Option &#8220;options.pageTree.showPathAboveMounts = 1&#8243;. Sie kann sowohl auf Benutzer- als auch auf Gruppenebene benutzt werden und sorgt dafür, dass der Pfad zur jeweiligen Startseite der Datenbankfreigabe über dem Teilbaum angezeigt wird.</p>
<h2>Weitere Anpassungsmöglichkeiten über Seiten TS</h2>
<p><a href="http://typo3blogger.de/wp-content/uploads/2011/11/pagetree07.png"><img class="alignright size-full wp-image-7019" title="pagetree07" src="http://typo3blogger.de/wp-content/uploads/2011/11/pagetree07.png" alt="" width="286" height="142" /></a>Bereits beim letzten Adventskalender wurden Möglichkeiten vorgestellt, die Darstellung des Seitenbaums zu beeinflussen (<a title="Seiten anhand der UID schneller finden – Türchen 3" href="http://typo3blogger.de/seiten-anhand-der-uid-schneller-finden-turchen-3/" target="_blank">Türchen 3</a> &amp; <a title="Darstellung des Seitenbaums im Backend verändern – Türchen 10" href="http://typo3blogger.de/darstellung-des-seitenbaums-im-backend-verandern-turchen-10/" target="_blank">Türchen 10</a>). Diese Möglichkeiten funktionieren auch weiterhin (im TS Config Feld der Gruppe oder des Benutzers).</p>
<p>Folgende Optionen gibt es:</p>
<ul>
<li>options.pageTree.showPathAboveMounts = 1<br />
Zeigt wie bereits oben beschrieben den den Pfad einer Datenbankfreigabe an</li>
<li>options.pageTree.showPageIdWithTitle = 1<br />
Zeigt die Seiten ID in eckigen Klammern vor dem Seitentitel an</li>
<li>options.pageTree.showNavTitle = 1<br />
Zeigt den Navigationstitel statt dem Seitentitel im Seitenbaum an</li>
<li>options.pageTree.disableIconLinkToContextmenu = 1<br />
Schaltet die Aktivierung des Kontext Menüs mit der linken Maustaste aus</li>
<li>options.pageTree.hideFilter = 1<br />
Versteckt die Filter Funktion</li>
<li>options.pageTree.showDomainNameWithTitle = 1<br />
Zeigt den Namen des Domain Datensatzes im Seitentitel an (siehe Screenshot)</li>
<li>options.contextMenu.table.pages.disableItems =<br />
Kommaseparierte Liste von Elementen, die nicht im Kontext Menü verfügbar sein sollen (view, disable, enable, edit, info, history, new, cut, copy, pasteInto, pasteAfter, delete, mountAsTreeroot, expandBranch, collapseBranch)</li>
<li>options.pageTree.doktypesToShowInNewPageDragArea =<br />
Kommaseparierte Liste von Doktype IDs, die in dem Toolbar mit Icons für neue Seiten angezeigt werden sollen. Default Werte sind 1, 6, 4, 7, 3, 254, 255, 199</li>
</ul>
<h2>Preloading des Seitenbaums</h2>
<p>Damit sich der Seitenbaum ohne große Verzögerungen benutzen lässt, wird er zum Teil voraus geladen. Per default sind das 50 Seiten. Der Wert kann über einen Eintrag in der localconf.php verändert werden:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><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;">'BE'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'pageTree'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'preloadLimit'</span><span style="color: #009900;">&#93;</span></pre></div></div>

<p>Beim Ändern dieses Wertes ist aber Vorsicht geboten, da sich die Anzahl der Datenbankabfragen entsprechend erhöht.</p>
<h2>Weiterentwicklung des Seitenbaums</h2>
<p>Mit Version 4.6 wurden Bugs behoben und die Performance verbessert. Für TYPO3 4.7 ist die Portierung auf ExtJS 4 geplant.</p>
<p>Sehr praktisch fände ich es, wenn es möglich wäre, die Technologie, die hinter dem neuen Seitenbaum steckt, auch für eigene Bäume nutzen zu können. Dies ist momentan aber leider noch nicht möglich.</p>
<p>Ein großes Dankeschön geht auf jeden Fall an alle Entwickler, die an der Implementierung des neuen Seitenbaums beteiligt waren! Super Arbeit!</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/der-neue-seitenbaum-seit-typo3-4-5-turchen-1/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>FLOW3 in Managed Hosting Umgebungen nutzen</title>
		<link>http://typo3blogger.de/flow3-in-managed-hosting-umgebungen-nutzen/</link>
		<comments>http://typo3blogger.de/flow3-in-managed-hosting-umgebungen-nutzen/#comments</comments>
		<pubDate>Mon, 31 Oct 2011 08:47:45 +0000</pubDate>
		<dc:creator>Peter Kraume</dc:creator>
				<category><![CDATA[FLOW3]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://typo3blogger.de/?p=6786</guid>
		<description><![CDATA[In Managed Hosting Umgebungen ist es manchmal nicht ganz so einfach, ein komplexes PHP Framework wie FLOW3 zu installieren und zu nutzen. Der Vorteil von Managed Hosting ist, dass man sich nicht um die Administration und Wartung des Servers kümmern muss. Damit der Server für den Hoster aber wartbar bleibt, muss er die Rechte des [...]<p>------------------------------------------------------<br />Dies ist ein Post vom <a href="http://typo3blogger.de/">TYPO3 Blog</a> typo3blogger.de!</p>
]]></description>
			<content:encoded><![CDATA[<p>In Managed Hosting Umgebungen ist es manchmal nicht ganz so einfach, ein komplexes PHP Framework wie FLOW3 zu installieren und zu nutzen. Der Vorteil von Managed Hosting ist, dass man sich nicht um die Administration und Wartung des Servers kümmern muss. Damit der Server für den Hoster aber wartbar bleibt, muss er die Rechte des Benutzers einschränken. So ist in den meisten Fällen kein direkter Zugriff auf die Konfiguration des Webservers und von PHP möglich.<br />
Am Beispiel eines Managed Servers bei domainfactory will ich in diesem Artikel zeigen, wie es funktionieren kann.<br />
<span id="more-6786"></span></p>
<h2>Vorüberlegungen</h2>
<p>Als erstes müssen die Systemvoraussetzungen und die Möglichkeiten des Hosting Pakets geprüft werden. FLOW3 stellt folgende Mindestanforderungen:</p>
<ul>
<li>Webserver (Apache mit aktiviertem mod_rewrite Modul wird empfohlen)</li>
<li>PHP 5.3.2 oder höher (mit den Einstellungen memory_limit &gt;= 128M und magic_quotes_gpc = Off)</li>
<li>Zugriff auf die Kommandozeile (Shell mit SSH Zugang)</li>
<li>Eine PDO kompatible Datenbank wie z.B. MySQL</li>
</ul>
<p>Der Webserver dürfte in den wenigsten Fällen ein Problem darstellen, da nahezu alle Hoster auf Apache setzen und mod_rewrite in den meisten Fällen aktiviert ist. Allerdings muss der Hoster es erlauben, den Document Root für eine (Sub-)Domain frei zu setzen.</p>
<p>Schwieriger wird es bei der PHP Version. Noch nicht jeder Hoster bietet seinen Kunden PHP 5.3 an obwohl es PHP 5.3 jetzt schon seit einiger Zeit in einer stabilen Version gibt.</p>
<p>Nach diesen Vorüberlegungen kann jetzt mit der eigentlichen Installation von FLOW3 gestartet werden.</p>
<h2>Download von FLOW</h2>
<p>Nach dem <a href="http://flow3.typo3.org/download.html" target="_blank">Download</a> wird FLOW3 auf dem Webserver entpackt. Am schnellsten geht das über die Shell:<br />
<code>wget http://sourceforge.net/projects/flow3/files/FLOW3/1.0.0/FLOW3-1.0.0.tar.bz2/download -O FLOW3-1.0.0.tar.bz2</code><br />
<code>tar xjf FLOW3-1.0.0.tar.bz2</code></p>
<p>Man erhält dann folgende Dateistruktur:</p>
<p><a href="http://typo3blogger.de/wp-content/uploads/2011/10/FLOW3_Dateien1.png"><img title="FLOW3_Dateien" src="http://typo3blogger.de/wp-content/uploads/2011/10/FLOW3_Dateien1.png" alt="" width="139" height="168" /></a></p>
<h2>Dateirechte setzen</h2>
<p>Das <a href="http://flow3.typo3.org/documentation/quickstart.html" target="_blank">Quickstart Tutorial</a> von FLOW3 schlägt als nächsten Schritt die Anpassung der Dateirechte vor.<br />
In Managed Hosting Umgebungen wird das in der Regel nicht funktionieren, da man keine root Rechte hat und den sudo Befehl nicht nutzen kann.<br />
Bei domainfactory laufen der SSH User und der Webserver unter der gleichen Benutzergruppe, wodurch das Anpassen der Dateirechte in diesem Fall entfallen kann.</p>
<h2>Einstellungen über das Kundenmenü</h2>
<p>Danach wird der Document Root der (Sub-)Domain auf das Unterverzeichnis <strong>Web</strong> gesetzt. Bei domainfactory können über das Kundenmenü auch die PHP Version eingestellt sowie PHP.ini Einstellungen verändert werden. Wie schon oben geschrieben sollte das memory_limit auf einen Wert größer 128M gesetzt und magic_quotes_gpc deaktiviert werden. Als PHP Version sollte 5-53LATEST-STANDARD (derzeit v5.3.8) genommen werden.</p>
<h2>Zurück auf der Shell</h2>
<p>Da domainfactory zum einen mehrere verschiedene PHP Versionen anbieten und zum zweiten auch einen anderen Pfad nutzt, ist eine kleine Anpassung des FLOW3 Shellscripts nötig.<br />
Die erste Zeile in der Datei flow3 muss gegen diese ausgetauscht werden:<br />
<code>#!/usr/local/bin/php5-53LATEST-CLI</code><br />
Als nächstes muss im Verzeichnis <strong>Configuration</strong> die Datei <strong>Settings.yaml.example</strong> nach <strong>Settings.yaml</strong> kopiert werden. In der Datei werden dann die letzten beiden Zeilen (&#8220;core:&#8221; und &#8220;phpBinaryPathAndFilename&#8221;) einkommentiert. phpBinaryPathAndFilename wird dann auf &#8220;/usr/local/bin/php5-53LATEST-CLI&#8221; gesetzt.</p>
<p>Möglicherweise erhält man später beim Aufruf von FLOW3 über die Shell diese Fehlermeldung:<br />
<code>FLOW3 requires the PHP setting "magic_quotes_gpc" set to Off. (Error #1224003190)</code><br />
Bei meinen Tests hatte ich dieses Problem. Nach Rückspsrache mit dem domainfactory Support konnte das Problem aber gelöst werden, da magic_quotes_gpc in der neuesten PHP Version bei domainfactory gar nicht mehr enthalten ist, die PHP.ini dies aber behauptet. Die entsprechende Konfigurationsänderung sollte aber jetzt bei allen domainfactory Kunden greifen, so dass es nicht mehr zu dieser Fehlermeldung kommt.</p>
<p>Falls doch, kann man sich mit diesem Workaround behelfen: An den beiden oben genannten Stellen, wo der Pfad zu PHP geändert wird, trägt man folgendes ein:<br />
<code>/usr/local/bin/php5-53LATEST-CLI -d magic_quotes_gpc=Off</code><br />
Damit wird magic_quotes_gpc explizit abgeschaltet.</p>
<h2>Erste Tests</h2>
<p>Wenn man alle genannten Schritte ausgeführt hat, kann man FLOW3 das erste Mal über die Shell aufrufen:<br />
<code>./flow3 help</code><br />
Achtung: der erste Aufruf kann einige Zeit dauern!</p>
<p>Dafür wird man dann mit diesem Ergebnis belohnt:</p>
<p><a href="http://typo3blogger.de/wp-content/uploads/2011/10/FLOW3_Output.png"><img class="size-medium wp-image-6817 alignnone" title="FLOW3_Output" src="http://typo3blogger.de/wp-content/uploads/2011/10/FLOW3_Output-300x175.png" alt="" width="300" height="175" /></a></p>
<p>Danach kann das erste Package mit dem Kickstarter angelegt werden:</p>
<p><code>./flow3 kickstart:package MyCompany.MyPackage</code></p>
<h2>FLOW3 im Browser</h2>
<p>Beim Aufruf von FLOW 3 über den Browser sollte dann diese Seite angezeigt werden:</p>
<p><a href="http://typo3blogger.de/wp-content/uploads/2011/10/FLOW3_Browser.png"><img class="size-medium wp-image-6819 alignnone" title="FLOW3_Browser" src="http://typo3blogger.de/wp-content/uploads/2011/10/FLOW3_Browser-300x165.png" alt="" width="300" height="165" /></a></p>
<p>Nachdem jetzt alle Hürden der Installation von FLOW3 hoffentlich genommen sind, kann man mit der Programmierung des ersten eigenen FLOW3 Pakets starten.</p>
<h2>FLOW3 bei anderen Providern</h2>
<p>Die Firma jweiland.net bietet ein angepasstes FLOW3 Paket und eine <a href="http://jweiland.net/flow3/erste_schritte.html" target="_blank">Kurzanleitung</a> an. Auch Mittwald bietet <a href="http://www.mittwald.de/webhosting/flow3-hosting/" target="_blank">FLOW3 Hosting</a> an. FLOW3 kann über den Softwaremanager (Bereich Frameworks) installiert werden.</p>
<h2>Fazit</h2>
<p>Mit ein wenig Handarbeit und wenn die Provider PHP 5.3 unterstützen lässt sich FLOW3 auch in Managed Hosting Umgebungen nutzen.</p>
<p>Mich würde jetzt interessieren, welche Erfahrungen ihr bei der Installation und Nutzung von FLOW3 in Managed Hosting Umgebungen gemacht habt. Über Feedback und eure Kommentare freue ich mich.</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/flow3-in-managed-hosting-umgebungen-nutzen/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Hilfetexte in Extension einbinden &#8211; Context Sensitive Help (CSH)</title>
		<link>http://typo3blogger.de/hilfetexte-in-extension-einbinden-context-sensitive-help-csh/</link>
		<comments>http://typo3blogger.de/hilfetexte-in-extension-einbinden-context-sensitive-help-csh/#comments</comments>
		<pubDate>Wed, 28 Sep 2011 17:57:54 +0000</pubDate>
		<dc:creator>Christian Wolfram</dc:creator>
				<category><![CDATA[Extension]]></category>
		<category><![CDATA[myExt]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[TYPO3]]></category>

		<guid isPermaLink="false">http://typo3blogger.de/?p=6606</guid>
		<description><![CDATA[Um Redakteuren das Leben mit TYPO3 zu vereinfachen bietet es sich an, in selbst entwickelten Extentions Hilfetexte zu den Eingabefeldern zu verfassen. Die Feldbezeichnung selbst, sollte schon Aussagekräftig genug sein, allerdings kann man an dieser Stelle nicht immer ausreichend Informationen hinerlassen. Um Context Sensitive Help nun aktivieren zu können, sind 2 Schritte nötig. Es muss [...]<p>------------------------------------------------------<br />Dies ist ein Post vom <a href="http://typo3blogger.de/">TYPO3 Blog</a> typo3blogger.de!</p>
]]></description>
			<content:encoded><![CDATA[<p>Um Redakteuren das Leben mit TYPO3 zu vereinfachen bietet es sich an, in selbst entwickelten Extentions Hilfetexte zu den Eingabefeldern zu verfassen. Die Feldbezeichnung selbst, sollte schon Aussagekräftig genug sein, allerdings kann man an dieser Stelle nicht immer ausreichend Informationen hinerlassen.</p>
<p><span id="more-6606"></span>Um Context Sensitive Help nun aktivieren zu können, sind 2 Schritte nötig.</pre>
<ol>
<li>Es muss eine entsprechende Datei mit den Hilfetexten erstellen werden</li>
<li>Die Datei ext_tables.php der Extension muss modifiziert bzw. erweitert werden</li>
</ol>
<p>Im Root-Verzeichnis der Extension erstellt man sich eine XML-Datei oder kopiert sich die locallang.xml und benennt diese in "locallang_csh_ExtensionKey_DBTabelle.xml" um. In diese XML-Datei werden wie gewohnt die verschiedenen Übersetzungen der Sprachen angelegt. Lediglich die META-Angabe unterscheidet sich und sollte in etwa wie folgt aussehen:</p>

<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;meta</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;description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>CSH for your own table.<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;type<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>CSH<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/type<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;csh_table<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>tx_meineExtension_DBTabelle<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/csh_table<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/meta<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Der Index der Label-Tags setzt sich aus dem Tabellenfeld und ".description" zusammen, z.B.</p>

<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;label</span> <span style="color: #000066;">index</span>=<span style="color: #ff0000;">&quot;subtitle.description&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Eine Beschreibung für das Beschreibungsfeld.<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Im zweiten Schritt muss die XML-Datei TYPO3 bekannt gemacht werden und dies erfolgt in der Datei ext_tables.php (ebenfalls im Root-Verzeichnis der Extension). Hier wird nun die folgende Zeile (bei mir am Ende der Datei) eingefügt:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">t3lib_extMgm<span style="color: #339933;">::</span><span style="color: #004000;">addLLrefForTCAdescr</span><span style="color: #009900;">&#40;</span>
  <span style="color: #0000ff;">'tx_meineExtension_DBTabelle'</span><span style="color: #339933;">,</span>
  <span style="color: #0000ff;">'EXT:ExtensionKey/locallang_csh_ExtensionKey_DBTabelle.xml'</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Danach werden die Hilfetexte beim überfahren der Feldbeschriftung mit der Maus nachgeladen. Ich persönlich finde es nicht gerade praktisch, dass es keinen Hinweis in Form eines Icons mehr gibt. Dadurch muss man immer Raten hinter welcher Feldbezeichnung vll. auch eine Beschreibung verborgen ist.</p>
<p>Die genannten 2 Schritte kann man nun für weitere DB-Tabellen wiederholen und somit für jedes Eingabefeld eine entsprechende Beschreibung einbinden.</p>
<p>P.S.: Wer bereits mit Extbase programmiert, muss sich darum nicht mehr kümmern, sofern mit dem Extension Builder gearbeitet wird. Dieser erstellt die CSH-Dateien bereits beim anlegen der Extension unter /Resources/Private/Language/. Insofern braucht man nur noch die Beschreibungstexte tippen und hineinkopieren.</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/hilfetexte-in-extension-einbinden-context-sensitive-help-csh/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

