<?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>Christian Balaguer Jehle</title>
	<atom:link href="http://www.crisi.ch/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.crisi.ch</link>
	<description>magnolia, java and more.</description>
	<lastBuildDate>Sat, 27 Apr 2013 19:21:20 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Klett Con Gusto A2 Vokabular App</title>
		<link>http://www.crisi.ch/klett-con-gusto-a2-vokabular-app/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=klett-con-gusto-a2-vokabular-app</link>
		<comments>http://www.crisi.ch/klett-con-gusto-a2-vokabular-app/#comments</comments>
		<pubDate>Sat, 27 Apr 2013 19:21:20 +0000</pubDate>
		<dc:creator>Christian Balaguer Jehle</dc:creator>
				<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Klett]]></category>
		<category><![CDATA[Spanisch]]></category>

		<guid isPermaLink="false">http://www.crisi.ch/?p=318</guid>
		<description><![CDATA[Wenn ihr euer Spanisch-Vokabular stets dabei haben wollt, um im ÖV, oder wo auch immer, lernen zu können, habe ich eine Überraschung für euch. Da der Klett-Verlag für Ihr 2. Buch in der Con Gusto-Reihe; Con Gusto A2, noch keine &#8230; <a href="http://www.crisi.ch/klett-con-gusto-a2-vokabular-app/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Wenn ihr euer Spanisch-Vokabular stets dabei haben wollt, um im ÖV, oder wo auch immer, lernen zu können, habe ich eine Überraschung für euch.<br />
Da der Klett-Verlag für Ihr 2. Buch in der Con Gusto-Reihe; Con Gusto A2, noch keine App veröffentlicht hat, habe ich selber eine für Android geschrieben. Mit der App könnt ihr Auswählen welche Lektionen ihr lernen möchtet und euch auch die spanische Aussprache anhören. Gelernt wird das Vokabular mittels Boxen-Prinzip. Habt ihr ein Kärtchen richtig übersetzt, kommt es in die nächste Box und wird nicht mehr abgefragt, bis ihr fast alle Kärtchen der Box 1 durch habt usw.</p>
<p>Am besten ihr installiert die App auf euer Android Smartphone und seht selbst <img src='http://www.crisi.ch/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="https://play.google.com/store/apps/details?id=ch.crisi.congusto_a2">Zur Con Gusto A2 Vokabular App</a>.</p>
<p>Klett wird übrigens diesen Sommer eine App für das Con Gusto A2-Buch liefern. Meine App ist also mehr eine Übergangslösung <img src='http://www.crisi.ch/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.crisi.ch/klett-con-gusto-a2-vokabular-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML markup in activation alert of Magnolia CMS</title>
		<link>http://www.crisi.ch/html-markup-in-activation-alert-of-magnolia-cms/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=html-markup-in-activation-alert-of-magnolia-cms</link>
		<comments>http://www.crisi.ch/html-markup-in-activation-alert-of-magnolia-cms/#comments</comments>
		<pubDate>Thu, 25 Apr 2013 14:10:34 +0000</pubDate>
		<dc:creator>Christian Balaguer Jehle</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Magnolia]]></category>

		<guid isPermaLink="false">http://www.crisi.ch/?p=312</guid>
		<description><![CDATA[I recently ran into a problem I&#8217;d like to quickly outline in this post. At some point after activating a page in Magnolia the activation alert started to display HTML markup appended to the activation message. The activation alert looked &#8230; <a href="http://www.crisi.ch/html-markup-in-activation-alert-of-magnolia-cms/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I recently ran into a problem I&#8217;d like to quickly outline in this post. At some point after activating a page in Magnolia the activation alert started to display HTML markup appended to the activation message. The activation alert looked like this:</p>
<div id="attachment_313" class="wp-caption alignnone" style="width: 310px"><a href="http://www.crisi.ch/wp-content/uploads/2013/04/magnolia_activation.jpeg" rel="lightbox[312]" title="HTML markup in activation alert of Magnolia CMS"><img class="size-medium wp-image-313" alt="Activation Alert" src="http://www.crisi.ch/wp-content/uploads/2013/04/magnolia_activation-300x42.jpeg" width="300" height="42" /></a><p class="wp-caption-text">Magnolia CMS activation alert</p></div>
<p>After some diving into the frontend code we found the lines where the error got triggered. The problem came from the function mgnlAlertCallbackMessage(html) in the tree.js which tries to extract the activation message from the html markup.</p>
<pre class="brush: jscript; title: ; notranslate">
function mgnlAlertCallbackMessage(html) {
 var messagePattern = '&lt;input type=&quot;hidden&quot; id=&quot;mgnlMessage&quot; value=&quot;';
 // check if alert message was sent back
 if (html.indexOf(messagePattern) != -1) {
 var start = html.indexOf(messagePattern);
 var end = html.indexOf(&quot;\&quot; /&gt;&quot;, start);
 var msg = html.slice(start + messagePattern.length, end);
 alert(msg);
 html = html.slice(end);
 }
 return html;
}
</pre>
<p>First this function gets the start index, which is 0, and then tries to get the end index with the help of the end tag markup which is defined like this:</p>
<p><code>" /&gt;</code></p>
<p>Unfortunately the Apache module <a title="Apache module mod_pagespeed" href="https://developers.google.com/speed/docs/mod_pagespeed">mod_pagespeed</a> strips unnecessary whitespace from the html source. And exactly this end tag markup which the javascript is looking for, contains such an unnecessary whitespace. So after mod_pagespeed runs through the code the end tag looks like this:</p>
<p><code>"/&gt;</code></p>
<p>The problem now is that the function mgnlAlertCallbackMessage(html) can&#8217;t retrieve the end index of the input tag, meaning it results in -1. Therefore the slice function doesn&#8217;t slice the string but takes the whole string starting at the previously fetched start index.</p>
<p>I&#8217;d say that disabling the whitespace filter in the mod_pagespeed.conf would be enough:</p>
<p><code>#ModPagespeedEnableFilters collapse_whitespace</code></p>
<p>but unfortunately it didn&#8217;t work for me. I had to disable the whole module with:</p>
<p><code>ModPagespeed off</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.crisi.ch/html-markup-in-activation-alert-of-magnolia-cms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Change gitflow settings in SourceTree</title>
		<link>http://www.crisi.ch/change-git-flow-settings-in-sourcetree/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=change-git-flow-settings-in-sourcetree</link>
		<comments>http://www.crisi.ch/change-git-flow-settings-in-sourcetree/#comments</comments>
		<pubDate>Fri, 15 Mar 2013 10:10:11 +0000</pubDate>
		<dc:creator>Christian Balaguer Jehle</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[GitFlow]]></category>
		<category><![CDATA[SourceTree]]></category>

		<guid isPermaLink="false">http://www.crisi.ch/?p=299</guid>
		<description><![CDATA[After setting up gitflow in SourceTree I realized that it calls its development branches develop by default. Since our development branch is called development I was wondering where I could reconfigure gitflow. There is no option for this in SourceTree &#8230; <a href="http://www.crisi.ch/change-git-flow-settings-in-sourcetree/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>After setting up gitflow in SourceTree I realized that it calls its development branches <code>develop</code> by default. Since our development branch is called <code>development</code> I was wondering where I could reconfigure gitflow. There is no option for this in SourceTree itself. If you want to remap branch names in gitflow you have to do it via Git&#8217;s configuration file.</p>
<p>The config file is located in the <code>.git</code> folder of your repository:</p>
<ul>
<li><code>
<path-to-your-repo>/.git/config</code></li>
</ul>
<p>Information about submodules and branches is saved to this file. And gitflow also creates a few entries here:</p>
<pre class="brush: plain; title: ; notranslate">
[gitflow &quot;branch&quot;]
        master = master
        develop = develop
[gitflow &quot;prefix&quot;]
        feature = feature/
        release = release/
        hotfix = hotfix/
        support = support/
        versiontag =
</pre>
<p>You can see that gitflow mapped its develop branch usage to a branch named the same.</p>
<ul>
<li><code>develop = develop</code></li>
</ul>
<p>I can now change this entry to the following and git flow will start using the branch called <code>development</code> for its workflows.</p>
<ul>
<li><code>develop = development</code></li>
</ul>
<p>Save the file and go back to SourceTree. You&#8217;re done.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.crisi.ch/change-git-flow-settings-in-sourcetree/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Magnolia Form Confirmation Mail</title>
		<link>http://www.crisi.ch/magnolia-form-confirmation-mail/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=magnolia-form-confirmation-mail</link>
		<comments>http://www.crisi.ch/magnolia-form-confirmation-mail/#comments</comments>
		<pubDate>Fri, 22 Feb 2013 10:44:10 +0000</pubDate>
		<dc:creator>Christian Balaguer Jehle</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Magnolia]]></category>

		<guid isPermaLink="false">http://www.crisi.ch/?p=290</guid>
		<description><![CDATA[If you want to create a form which sends the user a confirmation mail, you can configure this behaviour in the last tab Confirmation E-Mail of the form settings dialog. Now for the confirmation mail to really be sent you &#8230; <a href="http://www.crisi.ch/magnolia-form-confirmation-mail/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>If you want to create a form which sends the user a confirmation mail, you can configure this behaviour in the last tab <code>Confirmation E-Mail</code> of the form settings dialog. Now for the confirmation mail to really be sent you also need to activate the <code>sendConfirmationEMail</code> form processor. It is disabled by default.</p>
<p>To enable the <code>sendConfirmationEMail</code> form processor do the following:</p>
<ol>
<li>Navigate to the form processor</li>
<ul>
<li>Magnolia 4.4.x <code>/modules/form/paragraphs/form/formProcessors/sendConfirmationEMail</code></li>
<li>Magnolia 4.5.x <code>/modules/form/templates/components/form/formProcessors/sendConfirmationEMail</code></li>
</ul>
<li>Add a new property called <code>enabled</code> and set its value to <code>true</code></li>
<li>Set its type to <code>Boolean</code></li>
</ol>
<p>Your confirmation mails will now be sent. You can find more info about the form module and other form processors in the <a href="http://documentation.magnolia-cms.com/modules/form.html" title="Magnolia Form Documentation">documentation</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.crisi.ch/magnolia-form-confirmation-mail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shared FreeMarker variables in Magnolia CMS</title>
		<link>http://www.crisi.ch/shared-freemarker-variables-in-magnolia-cms/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=shared-freemarker-variables-in-magnolia-cms</link>
		<comments>http://www.crisi.ch/shared-freemarker-variables-in-magnolia-cms/#comments</comments>
		<pubDate>Fri, 25 Jan 2013 10:13:45 +0000</pubDate>
		<dc:creator>Christian Balaguer Jehle</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Freemarker]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Magnolia]]></category>

		<guid isPermaLink="false">http://www.crisi.ch/?p=259</guid>
		<description><![CDATA[To introduce a new global variable like stkfn or cmsfn into your FreeMarker templates you can add a new entry to the Magnolia shared variables configuration. In AdminCentral go to Cofiguration &#124; server &#124; rendering &#124; freemarker &#124; sharedVariables Create &#8230; <a href="http://www.crisi.ch/shared-freemarker-variables-in-magnolia-cms/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>To introduce a new global variable like stkfn or cmsfn into your <a href="http://freemarker.sourceforge.net/">FreeMarker </a>templates you can add a new entry to the Magnolia shared variables configuration.</p>
<ol>
<li>In AdminCentral go to <strong>Cofiguration | server | rendering | freemarker | sharedVariables</strong></li>
<li>Create a new content node for example <strong>myfn </strong>(your functions will be called through this name)</li>
<li>Create a new property <strong>class</strong> below the myfn node and set the value of the property to your class name including the packages. For example <strong>ch.crisi.MyTemplatingFunctions.class</strong>.</li>
</ol>
<p><a href="http://www.crisi.ch/wp-content/uploads/2013/01/magnolia_shared_variables1.png" rel="lightbox[259]" title="Shared FreeMarker variables in Magnolia CMS"><img src="http://www.crisi.ch/wp-content/uploads/2013/01/magnolia_shared_variables1.png" alt="magnolia_shared_variables" width="482" height="297" class="alignnone size-full wp-image-268" /></a></p>
<p>From now on you&#8217;re able to call all the methods of your MyTemplatingFunctions class from  freemarker.</p>
<pre class="brush: java; title: MyTemplatingFunctions.class; notranslate">
public class MyTemplatingFunctions {
    
    public String helloWorld() {
        return &quot;Hello World!&quot;;
    }

}
</pre>
<pre class="brush: plain; title: someTemplate.ftl; notranslate">
${myfn.helloWorld()}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.crisi.ch/shared-freemarker-variables-in-magnolia-cms/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Media Center with Asrock VisionX and XBMC on Windows 7</title>
		<link>http://www.crisi.ch/media-center-with-asrock-visionx-and-xbmc-on-windows-7/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=media-center-with-asrock-visionx-and-xbmc-on-windows-7</link>
		<comments>http://www.crisi.ch/media-center-with-asrock-visionx-and-xbmc-on-windows-7/#comments</comments>
		<pubDate>Wed, 23 Jan 2013 20:50:58 +0000</pubDate>
		<dc:creator>Christian Balaguer Jehle</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Asrock VisionX]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[XBMC]]></category>

		<guid isPermaLink="false">http://www.crisi.ch/?p=211</guid>
		<description><![CDATA[This post shows you how to setup and configure your XBMC Media Center on a Windows 7 HTPC. The Hardware My XBMC runs on an Asrock VisionX which costs about CHF 960 and is available in black and white. There&#8217;s also &#8230; <a href="http://www.crisi.ch/media-center-with-asrock-visionx-and-xbmc-on-windows-7/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>This post shows you how to setup and configure your XBMC Media Center on a Windows 7 HTPC.</p>
<h1>The Hardware</h1>
<p>My XBMC runs on an <a href="http://www.asrock.com/nettop/Intel/VisionX%20Series/">Asrock VisionX</a> which costs about CHF 960 and is available in black and white. There&#8217;s also a cheaper model called <a href="http://www.asrock.com/nettop/Intel/Vision%20HT%20Series/">Asrock VisionHT</a>which costs about CHF 760. The difference between these two models is that the Asrock VisionX ships with a AMD Radeon HD7850M (1 GB GDDR5 VRAM) and the Asrock VisionHT with an integrated Intel HD Graphics 4000. The package contains the following extras:</p>
<ul>
<li>Windows Media Center Remote (we will use the built-in IR-receiver with the Logitech Harmony)</li>
<li>Full version of PowerDVD (since XBMC does not support real-time Bluray playback)</li>
<li>Driver installation CD</li>
<li>Power cable</li>
</ul>
<p>Below you see the Asrock VisionX interfaces:</p>
<p><a href="http://www.crisi.ch/wp-content/uploads/2013/01/visionx_interfaces.jpg" rel="lightbox[211]" title="Asrock VisionX Interfaces"><img class="alignnone size-medium wp-image-245" title="Asrock VisionX Interfaces" src="http://www.crisi.ch/wp-content/uploads/2013/01/visionx_interfaces-300x143.jpg" alt="" width="300" height="143" /></a></p>
<p>The Asrock Vision products come with a 2.5&#8243; 750GB HDD and also has a 2nd slot for another SATA3 HD. Since I store all my media on my Synology DS212J NAS I used the free slot to install a Crucial m4 SSD 128GB on which I&#8217;ll install Windows 7. To install the 2nd HD just follow the provided instructions.</p>
<h1>Remote managing the HTPC</h1>
<p>If you have no mouse and keyboard plugged in to your HTPC you should at least be able to manage it remotely. There are several options for this. Here are two suggestions:</p>
<ul>
<li>Windows Remote Desktop</li>
<li>RealVNC</li>
</ul>
<h2>Windows Remote Desktop</h2>
<p>Windows Remote Desktop is included in every Windows installation and can be used without a big setup. Just be sure to enable the Remote Desktop Firewall exceptions on the HTPC under <em>Start | Control Panel | System and Security | Windows Firewall | Allow a program or feature through Windows Firewall</em>. <a href="http://www.crisi.ch/wp-content/uploads/2013/01/remote_desktop_fw_exceptions.png" rel="lightbox[211]" title="Remote Desktop Firewall Exceptions"><img class="alignnone" title="Remote Desktop Firewall Exceptions" src="http://www.crisi.ch/wp-content/uploads/2013/01/remote_desktop_fw_exceptions.png" alt="" width="567" height="40" /></a></p>
<p>Now you will be able to login to your HTPC remotely. Just click on the Windows Start-Button, type Remote Desktop and click on Remote Desktop Connection. If you have trouble doing so please see the<a href="http://windows.microsoft.com/en-US/windows7/Remote-Desktop-Connection-frequently-asked-questions"> Windows Remote Desktop Connection FAQ</a>. There&#8217;s even a video which shows how to do it exactly. <strong>Note:</strong> Windows Remote Desktop logs you off Windows on the HTPC when connecting to it. So it is not suited to demonstrate something to your friends which are looking at the TV.</p>
<h2>RealVNC</h2>
<p>RealVNC is able to mirror the Windows Desktop and does not log you off Windows to do so. There&#8217;s a free edition of RealVNC which does not allow you to encrypt the connection between the PCs though. For more information on RealVNC and it&#8217;s features check <a href="http://www.realvnc.com">their website</a>. To set it up have a look at <a href="http://www.realvnc.com/products/vnc/documentation/latest/">their documentation</a>.</p>
<h1>Configuring Windows</h1>
<h2>Autologon</h2>
<p>After installing Windows 7 we will configure it to automatically log in even if the user has a password.</p>
<ol>
<li>Press [Win] + [R]</li>
<li>Enter <em>netplwiz</em></li>
<li>Click on the user you&#8217;d like to automatically log in</li>
<li>Uncheck the box <em>Users must enter a user name and password to use this computer.</em></li>
<li>Click<em> OK</em></li>
</ol>
<h2>Mapping network drives</h2>
<p>Since my media is stored on my Synology NAS I created the following batch file to connect the network drives at startup. Create a file called <em>xbmc_shares.bat</em> paste the content below into it and place a shortcut to the file inside startup folder <em>C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup</em>.</p>
<pre>@echo off
 net use * /del /yes
 net use w: \\nas\music /USER:pcname\user password
 net use x: \\nas\photos /USER:pcname\user password
 net use y: \\nas\series /USER:pcname\user password
 net use z: \\nas\movies /USER:pcname\user password</pre>
<p>This is useful for easier access in XBMC and if you have HDD Hibernation enabled on your NAS because it will wake up the HDD if it is sleeping before you try to play a movie from XBMC. If you try to play a movie from a sleeping HDD XBMC will tell you that the file is not available and ask if you want to delete the library entry until the HDD is awake.</p>
<h1>Installing and configuring XBMC</h1>
<p>Go to the XBMC website and download the latest stable release. Follow the installation instructions, startup XBMC.</p>
<h2>Adding media</h2>
<p>To add media to the XBMC library follow <a href="http://wiki.xbmc.org/index.php?title=Adding_videos_to_the_library#Adding_videos_to_the_library">these instructions</a>.</p>
<p><strong>Tip:</strong> When configuring the TV Shows scraper enable <em>Prefer Posters</em> in the settings. Your series library will look nicer than with banners. For this to work the setting <em>Skin | General | Use &#8220;Posters&#8221; instead of &#8220;Banners&#8221; for TV Shows</em> has to be enabled too. <a href="http://www.crisi.ch/wp-content/uploads/2013/01/xbmc_series_posters.png" rel="lightbox[211]" title="XBMC TV Show Posters"><img class="alignnone size-medium wp-image-226" title="XBMC TV Show Posters" src="http://www.crisi.ch/wp-content/uploads/2013/01/xbmc_series_posters-300x168.png" alt="" width="300" height="168" /></a></p>
<p>You can change the poster by right clicking the current series poster, selecting <em>TV show information</em> and then clicking <em>Get thumb</em>.</p>
<h2>XBMC Settings</h2>
<p>Below are my personal settings.</p>
<ul>
<li>Appeareance | Skin | Skin -&gt; Confluence</li>
<li>Appeareance | Skin | Show RSS news feeds -&gt; OFF</li>
<li>Video | DVDs | Play DVDs automatically -&gt; ON</li>
<li>Video | DVDs | Attempt to skip introduction before DVD menu -&gt; ON</li>
<li>Skin | General | Use &#8220;Posters&#8221; instead of &#8220;Banners&#8221; for TV Shows -&gt; ON</li>
<li>Skin | Home Window | Show weather info -&gt; OFF</li>
<li>Skin | Home Window | Hide videos -&gt; ON</li>
<li>Skin | Home Window | Hide movies -&gt; OFF</li>
<li>Skin | Home Window | Hide TV shows -&gt; OFF</li>
</ul>
<h2>XBMC startup</h2>
<p>Download the XBMC Launcher from <a href="http://forum.xbmc.org/showthread.php?tid=136798">here</a> and install it according to your needs. Check<a href="http://forum.xbmc.org/showthread.php?tid=136798&amp;pid=1155232#pid1155232"> this post</a> for an explanation of the install options. After the installation XBMC Launcher will be configured to repeatedly request focus of XBMC every 10 seconds. To temporarily disable this and be able to configure the launcher press [Win] + [F9]. I configured my launcher to startup XBMC with Windows and to request its focus only once after 10 seconds in case it gets minimized because of other starting services. <a href="http://www.crisi.ch/wp-content/uploads/2013/01/xbmc_launcher.png" rel="lightbox[211]" title="XBMC Launcher configuration"><img title="XBMC Launcher configuration" src="http://www.crisi.ch/wp-content/uploads/2013/01/xbmc_launcher.png" alt="" width="300" height="573" /></a></p>
<p>For people looking to minimize the boot up time you can replace the Windows Shell with XBMC Launcher. Windows will then directly start XBMC without starting the Explorer first. After exiting XBMC Windows will normally start the Explorer. For this to work you have to enable the following two options in the XBMC Launcher:</p>
<ul>
<li>Start Windows Explorer when XBMC is closed</li>
<li>Change Windows Shell</li>
</ul>
<h2>XBMC Addons</h2>
<h3>Subtitles</h3>
<ul>
<li><a href="http://wiki.xbmc.org/index.php?title=Add-on:XBMC_Subtitles">http://wiki.xbmc.org/index.php?title=Add-on:XBMC_Subtitles</a></li>
<li><a href="http://forum.xbmc.org/showthread.php?tid=126495">http://forum.xbmc.org/showthread.php?tid=126495</a></li>
</ul>
<h1>Remote controls for XBMC</h1>
<h2>Logitech Harmony</h2>
<p>Since the Asrock VisionX comes with a Windows Media Center remote we already have an IR-Receiver and only need to configure the Logitech Harmony Remote. To setup the remote follow<a href="http://forum.xbmc.org/showthread.php?tid=95063"> these steps</a>.</p>
<h2>Yatse Android Remote</h2>
<p>My personal favorite is the Android application <a href="https://play.google.com/store/apps/details?id=org.leetzone.android.yatsewidgetfree&amp;hl=en">Yatse</a>. For this to work enable the following setting in XBMC:</p>
<ul>
<li>System | Settings | Network | Services | Allow control of XBMC via HTTP</li>
</ul>
<p>If you have trouble setting it up check out <a href="http://yatse.leetzone.org/redmine/projects/androidwidget/wiki?Source=XbmcWiki">their wiki</a>.</p>
<h2>Logitech DiNovo Mini</h2>
<p><img class="alignnone" title="Logitech DiNovo Mini" src="http://www.logitech.com/assets/14495/14495.png" alt="" width="455" height="500" /></p>
<p>The <a href="http://www.logitech.com/en-ch/product/dinovo-mini?crid=26">Logitech DiNovo Mini</a> comes with 2 modes. One media center mode with arrow keys for easy navigation inside XBMC and one mode with a touch pad to easily navigate in Windows. The keyboard works right out of the box with XBMC. There is no configuration needed.</p>
<p>If you want to remap the MediaCenter-Key on the bottom right of the keyboard take a look at <a href="http://uberoptions.net/">http://uberoptions.net</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.crisi.ch/media-center-with-asrock-visionx-and-xbmc-on-windows-7/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Magnolia Workflow: Passing parameters from XML to Java and contrariwise</title>
		<link>http://www.crisi.ch/magnolia-workflow-passing-parameters-from-xml-to-java-and-contrariwise/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=magnolia-workflow-passing-parameters-from-xml-to-java-and-contrariwise</link>
		<comments>http://www.crisi.ch/magnolia-workflow-passing-parameters-from-xml-to-java-and-contrariwise/#comments</comments>
		<pubDate>Fri, 30 Nov 2012 10:01:55 +0000</pubDate>
		<dc:creator>Christian Balaguer Jehle</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Command]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Magnolia]]></category>
		<category><![CDATA[Workflow]]></category>

		<guid isPermaLink="false">http://www.crisi.ch/?p=200</guid>
		<description><![CDATA[There may come a day when you&#8217;re in need of letting the workflow author be able to decide which input values should go into your custom command and also let him decide how to act on the output value you &#8230; <a href="http://www.crisi.ch/magnolia-workflow-passing-parameters-from-xml-to-java-and-contrariwise/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>There may come a day when you&#8217;re in need of letting the workflow author be able to decide which input values should go into your custom command and also let him decide how to act on the output value you inject back into the workflow xml. Thanks to this article you&#8217;ll be perfectly prepared in case of emergency.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;!-- set an input parameter in the workflow xml --&gt;
&lt;set field=&quot;myField&quot; value=&quot;myValue&quot;/&gt;
 
&lt;!-- call custom command in the workflow xml --&gt;
&lt;participant ref=&quot;command-catalogName-myCommand&quot;/&gt;
</pre>
<pre class="brush: java; title: ; notranslate">
// in your java command class get the input param of the workflow
String myField = (String) ctx.get(&quot;myField&quot;);

// do some processing
 
// inject result into the workflow xml
ctx.put(&quot;myCustomField&quot;, &quot;myCustomValue&quot;);
</pre>
<pre class="brush: xml; title: ; notranslate">

&lt;!-- access the injected command result in the workflow xml --&gt;
${field:myCustomField}

&lt;!-- or maybe wrap it into a conditional --&gt;
&lt;if test=&quot;${field:myCustomField}&quot;&gt;
    &lt;!-- do if myCustomField is true --&gt;
    &lt;!-- do if myCustomField is false --&gt;
&lt;/if&gt;

&lt;if test=&quot;${field:myCustomField} == someString&quot;&gt;
    &lt;!-- do if comparison is equal --&gt;
    &lt;!-- do if comparison is not equal --&gt;
&lt;/if&gt;
</pre>
<p>You can find further resources below:</p>
<ul>
<li><a href="http://dev.magnolia-cms.com/openwfe_manual/manual">OpenWFE Manual</a></li>
<li><a href="http://wiki.magnolia-cms.com/display/WIKI/Debugging+custom+workflow">Debugging workflows: outputting log message</a></li>
<li><a href="http://documentation.magnolia-cms.com/technical-guide/commands.html">Magnolia Commands</a></li>
<li><a href="http://documentation.magnolia-cms.com/workflow.html">Magnolia Workflow</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.crisi.ch/magnolia-workflow-passing-parameters-from-xml-to-java-and-contrariwise/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Magnolia Node Types</title>
		<link>http://www.crisi.ch/magnolia-node-types/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=magnolia-node-types</link>
		<comments>http://www.crisi.ch/magnolia-node-types/#comments</comments>
		<pubDate>Wed, 07 Nov 2012 15:39:04 +0000</pubDate>
		<dc:creator>Christian Balaguer Jehle</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Magnolia]]></category>

		<guid isPermaLink="false">http://www.crisi.ch/?p=191</guid>
		<description><![CDATA[Since I always have to look up which node type I&#8217;m looking for, I wrote this post hoping that this information now will remain in my memory Most of the times you can either filter by using a String like &#8230; <a href="http://www.crisi.ch/magnolia-node-types/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Since I always have to look up which node type I&#8217;m looking for, I wrote this post hoping that this information now will remain in my memory <img src='http://www.crisi.ch/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /><br />
<a href="http://www.crisi.ch/wp-content/uploads/2012/11/magnolia_node_types.png" rel="lightbox[191]" title="Magnolia Node Types"><img src="http://www.crisi.ch/wp-content/uploads/2012/11/magnolia_node_types.png" alt="" title="Magnolia Node Types" width="391" height="529" class="size-full wp-image-192" /></a></p>
<p>Most of the times you can either filter by using a String like <code>mgnl:content</code> or the static fields of the class <code>info.magnolia.cms.core.ItemType</code> like <code>ItemType.CONTENT</code>.</p>
<p>Sometimes you also have to wrap the type with a <code>info.magnolia.cms.util.NodeTypeFilter</code> for example when using <code>info.magnolia.cms.util.ContentUtil#visit</code>.</p>
<pre class="brush: java; title: ; notranslate">
                ContentUtil.visit(content, new ContentUtil.Visitor() {
                    @Override
                    public void visit(Content node) throws Exception {
                        //To change body of implemented methods use File | Settings | File Templates.
                    }
                }, new NodeTypeFilter(ItemType.CONTENT));
</pre>
<p>Or when writing a Task and you&#8217;are extending from <code>info.magnolia.module.templatingkit.setup.VisitAllChildrenOperation</code>.</p>
<p>For more information about all the different node types there exist check <a href="http://documentation.magnolia-cms.com/reference/node-types.html" title="Magnolia Node Types">this link</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.crisi.ch/magnolia-node-types/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bidirectional Dialogs in Magnolia CMS</title>
		<link>http://www.crisi.ch/bidirectional-dialogs-in-magnolia-cms/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=bidirectional-dialogs-in-magnolia-cms</link>
		<comments>http://www.crisi.ch/bidirectional-dialogs-in-magnolia-cms/#comments</comments>
		<pubDate>Tue, 16 Oct 2012 14:37:24 +0000</pubDate>
		<dc:creator>Christian Balaguer Jehle</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Magnolia]]></category>

		<guid isPermaLink="false">http://www.crisi.ch/?p=173</guid>
		<description><![CDATA[For an arabic or hebrew website it would be convenient to have some of the dialog controls being read and written from the right to the left. Here I show you how to mirror the Magnolia edit control. The labels &#8230; <a href="http://www.crisi.ch/bidirectional-dialogs-in-magnolia-cms/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>For an arabic or hebrew website it would be convenient to have some of the dialog controls being read and written from the right to the left. Here I show you how to mirror the Magnolia edit control. The labels and other controls stay the same.</p>
<p>The principle behind this modification is as follows: Everytime an edit field appears in the dialog, we check the locale and depending on it instantiate the regular <code>info.magnolia.cms.gui.control.Edit</code> control or our custom one, called <code>RTLEdit</code>.</p>
<p>For this to work we have to reset the <code>class</code> property of the control under <code>/modules/adminInterface/controls/edit</code> to <code>my.package.BidirectionalDialogEdit</code>.</p>
<p>The class content looks as follows:</p>
<pre class="brush: java; title: ; notranslate">
public class BidirectionalDialogEdit extends DialogEdit {

    List&lt;String&gt; rtlLanguages = Arrays.asList(new String[]{&quot;ar&quot;, &quot;iw&quot;, &quot;he&quot;}); // he = iw = hebrew, ar = arabic

    @Override
    public void drawHtml(Writer out) throws IOException {
        Edit control = getLocaleDependentEditControl();

        //rest of this method is copied from info.magnolia.cms.gui.dialog.DialogEdit.drawHtml()
        control.setType(this.getConfigValue(&quot;type&quot;, PropertyType.TYPENAME_STRING));
        if (this.getConfigValue(&quot;saveInfo&quot;).equals(&quot;false&quot;)) {
            control.setSaveInfo(false);
        }
        control.setCssClass(CssConstants.CSSCLASS_EDIT);
        control.setRows(this.getConfigValue(&quot;rows&quot;, &quot;1&quot;));
        control.setCssStyles(&quot;width&quot;, this.getConfigValue(&quot;width&quot;, &quot;100%&quot;));
        if (this.getConfigValue(&quot;onchange&quot;, null) != null) {
            control.setEvent(&quot;onchange&quot;, this.getConfigValue(&quot;onchange&quot;));
        }
        this.drawHtmlPre(out);
        out.write(control.getHtml());
        this.drawHtmlPost(out);
    }

    private Edit getLocaleDependentEditControl() {
        Edit control;
        String localeString = MgnlContext.getAttribute(&quot;mgnlLocale&quot;).toString();
        String language = StringUtils.substringBefore(localeString, &quot;_&quot;);

        if (rtlLanguages.contains(language))
            control = new RTLEdit(this.getName(), this.getValue());
        else
            control = new Edit(this.getName(), this.getValue());

        return control;
    }
}
</pre>
<p>The really new thing here is the method <code>getLocaleDependentEditControl()</code> which checks for the locales &#8220;ar&#8221;, &#8220;iw&#8221; and &#8220;he&#8221;. If such a locale is found I instantiate the <code>RTLEdit</code> class. This class overrides the <code>getHtml()</code> method of it&#8217;s superclass and inserts the dir attribute as follows: <code>dir="rtl"</code>. This will mirror the rendered text box in the dialog.</p>
<pre class="brush: java; title: ; notranslate">
public class RTLEdit extends Edit {

    public RTLEdit() {
        super();
    }

    public RTLEdit(String name, Content websiteNode) {
        super(name, websiteNode);
    }

    public RTLEdit(String name, String value) {
        super(name, value);
    }

    @Override
    public String getHtml() {
        StringBuilder html = new StringBuilder(super.getHtml());
        html.insert(html.indexOf(&quot; &quot;), &quot; dir=\&quot;rtl\&quot;&quot;);

        return html.toString();
    }
}
</pre>
<p>The final result looks like this:<br />
<a href="http://www.crisi.ch/wp-content/uploads/2012/10/rtledit.png" rel="lightbox[173]" title="Bidirectional Edit Control"><img src="http://www.crisi.ch/wp-content/uploads/2012/10/rtledit.png" alt="" title="Bidirectional Edit Control" width="771" height="163" class="size-full wp-image-176" /></a></p>
<p>For more information on RTL-Webpages in Magnolia see <a href="http://wiki.magnolia-cms.com/display/WIKI/Right-to-left+languages" title="Right-to-left languages">this wiki page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.crisi.ch/bidirectional-dialogs-in-magnolia-cms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom control CategoryCheckboxes in Magnolia CMS</title>
		<link>http://www.crisi.ch/custom-control-categorycheckboxes-in-magnolia-cms/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=custom-control-categorycheckboxes-in-magnolia-cms</link>
		<comments>http://www.crisi.ch/custom-control-categorycheckboxes-in-magnolia-cms/#comments</comments>
		<pubDate>Fri, 12 Oct 2012 09:39:54 +0000</pubDate>
		<dc:creator>Christian Balaguer Jehle</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Magnolia]]></category>

		<guid isPermaLink="false">http://www.crisi.ch/?p=157</guid>
		<description><![CDATA[In this post I&#8217;ll show you how I created a custom control called &#8220;CategoryCheckboxes&#8221;. It displays all categories of a selected data-folder as checkboxes, to easily select and save them. This control may also replace the categorization tab /modules/categorization/dialogs/generic/tabCategorization which &#8230; <a href="http://www.crisi.ch/custom-control-categorycheckboxes-in-magnolia-cms/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>In this post I&#8217;ll show you how I created a custom control called &#8220;CategoryCheckboxes&#8221;. It displays all categories of a selected data-folder as checkboxes, to easily select and save them. This control may also replace the categorization tab <code>/modules/categorization/dialogs/generic/tabCategorization</code> which is delivered with the categorization module, as it saves the selected categories exactly the same way.</p>
<p>For our custom control we only need one new class as we will use an existing save handler to save the selected categories. With the 2 control properties <code>controlType</code> and <code>saveHandler</code> we will refer to our custom control class and to the save handler <code>info.magnolia.module.admininterface.MultiValueSaveHandler</code>. The control class tells Magnolia how to render the control. The save handler class tells Magnolia how to save the selected categories.</p>
<p>The control setup will be as follows:<br />
<a href="http://www.crisi.ch/wp-content/uploads/2012/10/categoryCheckboxes1.png" rel="lightbox[157]" title="Control setup"><img class="alignleft size-full wp-image-159" title="Control setup" src="http://www.crisi.ch/wp-content/uploads/2012/10/categoryCheckboxes1.png" alt="" width="802" height="185" /></a></p>
<p>So, let&#8217;s start with our control class <code>CategoryCheckboxesControl.java</code></p>
<pre class="brush: java; title: ; notranslate">
public class CategoryCheckboxesControl extends DialogBox {
 
    private Content categoryFolder;
    private List&lt;Content&gt; existingCategoriesInJcr = new ArrayList&lt;Content&gt;();
 
    @Override
    public void init(HttpServletRequest request, HttpServletResponse response, Content storageNode, Content configNode) throws RepositoryException {
        super.init(request, response, storageNode, configNode);
         
        setLabel(&quot;Categories&quot;);
        setOptions(ListUtils.EMPTY_LIST);   
    }
 
    @Override
    public void setOptions(List options) {
        Content siteRoot = null;

        if (newParagraph()) {
            Content currentContent = ContentUtil.getContent(ContentRepository.WEBSITE, MgnlContext.getParameter(&quot;mgnlPath&quot;));
            siteRoot = getSiteRoot(currentContent);
        } else {
            siteRoot = getSiteRoot(getStorageNode());
            existingCategoriesInJcr = CategoryUtil.getCategories(getStorageNode(), CategoryUtil.DEFAULT_STORAGE_NAME);
        }
        
        String categoryFolderUuid = NodeDataUtil.getString(siteRoot, &quot;availableCategories&quot;);
        categoryFolder = ContentUtil.getContentByUUID(&quot;data&quot;, categoryFolderUuid);
    }

    private boolean newParagraph() {
        return getStorageNode() == null;
    }
 
    private Content getSiteRoot(Content content) {
        try {
            Content root = TemplateCategoryUtil.findParentWithTemplateCategory(content, TemplateCategory.HOME);
            if (root == null) {
                return content.getAncestor(0);
            }
            return root;
        } catch (RepositoryException e) {
            throw new RuntimeException(&quot;Can't access site root.&quot;, e);
        }
    }
 
    @Override
    public void drawHtml(Writer out) throws IOException {
        drawHtmlPre(out);
        out.write(drawCheckboxes());
        drawHtmlPost(out);
    }
 
    private String drawCheckboxes() {
        if (categoryFolder == null)
            return &quot;&lt;p style='color:red'&gt;Please select a news categories folder in the Home Template Settings.&lt;/p&gt;&quot;;

        StringBuffer htmlBuffer = new StringBuffer();
        if (categoryFolder.hasChildren(&quot;category&quot;)) {
            renderCheckboxes(categoryFolder, htmlBuffer);
        }

        return htmlBuffer.toString();
    }

    private void renderCheckboxes(Content categoryFolder, StringBuffer htmlBuffer) {
        for (Content category : categoryFolder.getChildren(&quot;category&quot;)) {
            Button categoryCheckbox = new Button();
            categoryCheckbox.setButtonType(ControlImpl.BUTTONTYPE_CHECKBOX);
            categoryCheckbox.setName(&quot;categories&quot;); //has to be the same as the control name, else the custom saveHandler is not found
            categoryCheckbox.setLabel(category.getName());
            categoryCheckbox.setValue(category.getUUID());
            categoryCheckbox.setId(category.getUUID()); //this is needed for the checkbox label to be able to select the corresponding checkbox
            categoryCheckbox.setCssClass(&quot;mgnlDialogButtonsetButton&quot;);

            for (Content existingCategoryInJcr : existingCategoriesInJcr) {
                if (uuidsAreEqual(existingCategoryInJcr, category))
                    preselect(categoryCheckbox);
            }

            htmlBuffer.append(categoryCheckbox.getHtml());

            if (categoryFolder.hasChildren(&quot;category&quot;)) {
                htmlBuffer.append(&quot;&lt;div style='margin-left:20px'&gt;&quot;);
                renderCheckboxes(category, htmlBuffer);
                htmlBuffer.append(&quot;&lt;/div&gt;&quot;);
            }
        }
    }
 
    private void preselect(Button b) {
        b.setState(ControlImpl.BUTTONSTATE_PUSHED);
    }
 
    private boolean uuidsAreEqual(Content c1, Content c2) {
        return c1.getUUID().equals(c2.getUUID());
    }
}
</pre>
<p>As I commented in the <code>setOptions()</code> method, you are free to implement any way of fetching the uuid of a folder containing categories.</p>
<p>With the save handler property set to <code>info.magnolia.module.admininterface.MultiValueSaveHandler</code> the selected checkboxes are saved the way the categorization tab control would do it. Like that we can change between those 2 components without any complications. The save handler will save the selected categories as comma separated uuid&#8217;s in a property called <code>categories</code>.</p>
<p><strong>UPDATE</strong><br />
The control now supports sub categories and will display them as a tree. See Screenshot below.</p>
<p>Our final control will then look like this:<br />
<a href="http://www.crisi.ch/wp-content/uploads/2012/10/categoryCheckboxes_dialog.png" rel="lightbox[157]" title="CategoryCheckboxes Dialog"><img src="http://www.crisi.ch/wp-content/uploads/2012/10/categoryCheckboxes_dialog.png" alt="" title="CategoryCheckboxes Dialog" width="598" height="141" class="size-full wp-image-167" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.crisi.ch/custom-control-categorycheckboxes-in-magnolia-cms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
