<?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>Development Blog of PowerHour.at - Austrias first Happy Hour Search Engine</title>
	<atom:link href="http://devblog.powerhour.at/feed/" rel="self" type="application/rss+xml" />
	<link>http://devblog.powerhour.at</link>
	<description>This Blog is about all kind of technical stuff from www.powerhour.at</description>
	<lastBuildDate>Mon, 06 Feb 2012 12:29:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Zend Translate with gettext (Poedit)</title>
		<link>http://devblog.powerhour.at/zend-translate-with-gettext-poedit/</link>
		<comments>http://devblog.powerhour.at/zend-translate-with-gettext-poedit/#comments</comments>
		<pubDate>Mon, 06 Feb 2012 10:48:18 +0000</pubDate>
		<dc:creator>thomas</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://devblog.powerhour.at/?p=648</guid>
		<description><![CDATA[As we plan to provide our services for more countries, we need to translate our website in several languages. The Zend Framework already includes several adapters for translation like e.g. Array, Csv, Gettext, etc. As we already had a basic knowledge about the gettext version, and it is also used by wordpress, we decided to [...]]]></description>
			<content:encoded><![CDATA[<p>As we plan to provide our services for more countries, we need to translate our website in several languages. The Zend Framework already includes several adapters for translation like e.g. Array, Csv, Gettext, etc. As we already had a basic knowledge about the gettext version, and it is also used by wordpress, we decided to use this type:</p>
<p>To translate the page with gettext it is necessary to install Poedit (Download here: <a title="Poedit" href="http://www.poedit.net/download.php" target="_blank">http://www.poedit.net/download.php</a>)</p>
<p>After successfully downloading and installing Poedit you will need to <strong>make some changes to make it work with Zend Framework</strong>.</p>
<ol>
<li>Open Poedit and go to <em>Poedit &gt; Preferences</em></li>
<li>Choose the tab &#8220;<em>Parsers</em>&#8220;</li>
<li>Select &#8220;<em>PHP</em>&#8221; and click &#8220;<em>edit</em>&#8220;</li>
<li>Extend the textbox for extensions by <em>&#8220;.phtml&#8221;</em> (see Screenshot)</li>
<li>Extend the textbox parser command by <em>&#8220;-L php&#8221;</em> (see Screenshot)</li>
<li>Save settings</li>
</ol>
<p><a href="http://devblog.powerhour.at/wp-content/uploads/2012/02/Screenshot-Poedit-Parser-Setup.png"><img class="alignnone size-full wp-image-659" title="Poedit Parser Setup" src="http://devblog.powerhour.at/wp-content/uploads/2012/02/Screenshot-Poedit-Parser-Setup.png" alt="" width="556" height="398" /></a></p>
<p>In the next step you need create an instance of Zend_Translate in the bootstrap process as follows to your bootstrap.php:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> _initTranslation<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">// Define the path where the language files are</span>
    <span style="color: #000088;">$langPath</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'/Users/yourname/your/zend/workspace/yourapplication/languages/'</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// Create an instance of Zend's gettext adapter</span>
    <span style="color: #000088;">$translate</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Zend_Translate_Adapter_Gettext<span style="color: #009900;">&#40;</span><span style="color: #000088;">$langPath</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'powerhour-en.mo'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'en'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #666666; font-style: italic;">// Set the location to 'en' just to check wheter the english translation is working</span>
    <span style="color: #000088;">$translate</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>setLocale<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'en'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// Set this Translation as global translation for the view helper</span>
    Zend_Registry<span style="color: #339933;">::</span><span style="color: #004000;">set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Zend_Translate'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$translate</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>After setting all necessary preferences in the bootstrap process we can now make use of Zend&#8217;s ViewHelper for translation as follows:</p>
<ol>
<li>Open any view with text you want to translate</li>
<li>Wrap any piece of text with <code>&lt;?php echo $this-&gt;translate(""); ?&gt;</code></li>
<li>e.g.

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

<p>will from now on be</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;strong&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">translate</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Wohin&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/strong&gt;</pre></div></div>

</li>
</ol>
<p>Our Zend application is now ready to be translated. To do the translation open Poedit click <em>File &gt; New catalog</em> and follow this steps:</p>
<p>1. Enter some information about your project and your translation<br />
<a href="http://devblog.powerhour.at/wp-content/uploads/2012/02/Screenshot-Poedit-New-Catalog-1.png"><img class="alignnone size-full wp-image-657" title="Poedit New Catalog - Project info" src="http://devblog.powerhour.at/wp-content/uploads/2012/02/Screenshot-Poedit-New-Catalog-1.png" alt="" width="523" height="441" /></a></p>
<p>2. Enter the path to your project on your computer, so that Poedit knows where to look for your files to translate.<br />
<a href="http://devblog.powerhour.at/wp-content/uploads/2012/02/Screenshot-Poedit-New-Catalog-2.png"><img class="alignnone size-full wp-image-658" title="Poedit New Catalog - Paths" src="http://devblog.powerhour.at/wp-content/uploads/2012/02/Screenshot-Poedit-New-Catalog-2.png" alt="" width="523" height="441" /></a></p>
<p>3. Next we need to add the keywords for which Poedit has to look to find the phrases to translate<br />
<a href="http://devblog.powerhour.at/wp-content/uploads/2012/02/Screenshot-Poedit-New-Catalog-3.png"><img class="alignnone size-full wp-image-665" title="Poedit New Catalog - Keywords" src="http://devblog.powerhour.at/wp-content/uploads/2012/02/Screenshot-Poedit-New-Catalog-3.png" alt="" width="523" height="441" /></a></p>
<p>4. Now choose <em>Catalog > Update from sources</em>. That should show a result like this:<br />
<a href="http://devblog.powerhour.at/wp-content/uploads/2012/02/Screenshot-Poedit-Update-Catalog-From-Sources.png"><img src="http://devblog.powerhour.at/wp-content/uploads/2012/02/Screenshot-Poedit-Update-Catalog-From-Sources.png" alt="" title="Poedit Update Catalog From Sources" width="596" height="358" class="alignnone size-full wp-image-685" /></a></p>
<p>5. Last but not least save the files to e.g. <em>/Users/yourname/your/zend/workspace/yourapplication/languages</em><br />
(in the case of the example above the filename is powerhour-en.po and powerhour-en.mo)</p>
]]></content:encoded>
			<wfw:commentRss>http://devblog.powerhour.at/zend-translate-with-gettext-poedit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Clear Facebook Like Cache</title>
		<link>http://devblog.powerhour.at/clear-facebook-like-cache/</link>
		<comments>http://devblog.powerhour.at/clear-facebook-like-cache/#comments</comments>
		<pubDate>Sun, 27 Nov 2011 09:30:09 +0000</pubDate>
		<dc:creator>thomas</dc:creator>
				<category><![CDATA[Facebook]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[facebook cache]]></category>
		<category><![CDATA[like]]></category>
		<category><![CDATA[share]]></category>

		<guid isPermaLink="false">http://devblog.powerhour.at/?p=627</guid>
		<description><![CDATA[You changed the values for your Open Graph tags on your website but Facebook still shows an old (obviously cached) version of your shared or liked page? We came across that problem and here is what you can do: 1. Add query parameter to liked/shared URL One way is to simply change the URL of [...]]]></description>
			<content:encoded><![CDATA[<p>You changed the values for your Open Graph tags on your website but Facebook still shows an old (obviously cached) version of your shared or liked page?<br />
<span id="more-627"></span><br />
We came across that problem and here is what you can do:</p>
<h3>1. Add query parameter to liked/shared URL</h3>
<p>One way is to simply change the URL of your page by adding a URL query parameter e.g. ?v=1<br />
This means you&#8217;ve got to share <em>http://www.mypage.com/fbapp/?v=1</em> instead of <em>http://www.mypage.com/fbapp/</em></p>
<h3>2. Use <a title="Facebook Debugger" href="https://developers.facebook.com/tools/debug" target="_blank">Facebook URL Linter</a> (now called debugger)</h3>
<p>Facebook offers the possibility to display the values it extracts from your page. This values are used in the timeline when a friend likes or shares your page. Facebook seems to refresh the cache if you submit your page&#8217;s URL to the debugger.</p>
<p>This is what a link looks like in Facebook&#8217;s debugger:</p>
<p><a href="http://devblog.powerhour.at/wp-content/uploads/2011/11/Bildschirmfoto-2011-11-23-um-23.35.05.png"><img class="alignnone size-full wp-image-640" title="Facebook like/share in debugger" src="http://devblog.powerhour.at/wp-content/uploads/2011/11/Bildschirmfoto-2011-11-23-um-23.35.05.png" alt="" width="371" height="235" /></a></p>
<p>And this is what it looks like in your newsfeed:</p>
<p><a href="http://devblog.powerhour.at/wp-content/uploads/2011/11/Bildschirmfoto-2011-11-23-um-23.34.27.png"><img class="alignnone size-full wp-image-639" title="Facebook share/like in newsfeed" src="http://devblog.powerhour.at/wp-content/uploads/2011/11/Bildschirmfoto-2011-11-23-um-23.34.27.png" alt="" width="471" height="234" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://devblog.powerhour.at/clear-facebook-like-cache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Including Google Map into jQuery Mobile websites</title>
		<link>http://devblog.powerhour.at/including-google-map-into-jquery-mobile-websites/</link>
		<comments>http://devblog.powerhour.at/including-google-map-into-jquery-mobile-websites/#comments</comments>
		<pubDate>Sat, 19 Nov 2011 19:24:24 +0000</pubDate>
		<dc:creator>stefan</dc:creator>
				<category><![CDATA[Google API]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery Mobile]]></category>
		<category><![CDATA[Google Map]]></category>

		<guid isPermaLink="false">http://devblog.powerhour.at/?p=606</guid>
		<description><![CDATA[As I explained already in this blog entry, we came across a problem as we wanted to use a Google Map on our mobile website. The problem again: The Google Map just worked fine for the first time, if we loaded another page, with other data and a new map, it did not worked. Why? [...]]]></description>
			<content:encoded><![CDATA[<p>As I explained already <a href="http://devblog.powerhour.at/jquery-mobile-execute-javascript-after-loading-a-page-with-ajax">in this blog entry</a>, we came across a problem as we wanted to use a Google Map on our mobile website.<span id="more-606"></span><br />
The problem again:<br />
The Google Map just worked fine for the first time, if we loaded another page, with other data and a new map, it did not worked.<br />
Why? You are asking. Yeah we needed a bit of time to realize too. But in fact it is really logic. The Google Map is bond to a div with an unique ID. So there is the problem. If we open one page after another, all of these pages have this ID and stay in our HTML-DOM. So we needed to handle this&#8230;<br />
I  think there are maybe better and more beautiful solutions for that but I did not had the time to make it more beautiful &#8211; it just should work, and it did at the end <img src='http://devblog.powerhour.at/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /><br />
So what did I do? Right, I just removed the Google Map Div and included it just on the active page of the jQuery Mobile framework.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">// Remove Google Map Divs - there is only one allowed (= ID)</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.gMaps'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">remove</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// Add a new Google Map Div at the active page</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'&lt;div id=&quot;divGoogleMap&quot; class=&quot;gMaps removeMarginTop&quot;&gt;loading Map...&lt;/div&gt;'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">insertBefore</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.ui-page-active .googleMapFunctions'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// Initialize the Google Map with a marker</span>
map <span style="color: #339933;">=</span> PowerHour.<span style="color: #660066;">GoogleMap</span>.<span style="color: #660066;">initializeWithMarker</span><span style="color: #009900;">&#40;</span>	<span style="color: #3366CC;">&quot;divGoogleMap&quot;</span><span style="color: #339933;">,</span>	locationMarker<span style="color: #339933;">,</span> <span style="color: #CC0000;">16</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>This code has to be executed on the same site you want to display your Google Map and of course before you initialize the Google Map. Of course you need to include the Google Map javascript API files.<br />
And now we can load page after page and the Map is shown on the right (and active) page.</p>
]]></content:encoded>
			<wfw:commentRss>http://devblog.powerhour.at/including-google-map-into-jquery-mobile-websites/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>jQuery Mobile &#8211; Execute javascript after loading a page with AJAX</title>
		<link>http://devblog.powerhour.at/jquery-mobile-execute-javascript-after-loading-a-page-with-ajax/</link>
		<comments>http://devblog.powerhour.at/jquery-mobile-execute-javascript-after-loading-a-page-with-ajax/#comments</comments>
		<pubDate>Fri, 18 Nov 2011 19:24:40 +0000</pubDate>
		<dc:creator>stefan</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery Mobile]]></category>
		<category><![CDATA[ajax calls]]></category>
		<category><![CDATA[execute javascript]]></category>
		<category><![CDATA[javascript in jQuery Mobile]]></category>

		<guid isPermaLink="false">http://devblog.powerhour.at/?p=599</guid>
		<description><![CDATA[As we developed our mobile WebApp we came across some minor problems. One of them was that we need a Google Map in one of our pages. But all pages are loaded via AJAX. So the Google Map did not load, we had to refresh it, with custom data which was provided via PHP. So [...]]]></description>
			<content:encoded><![CDATA[<p>As we developed our mobile WebApp we came across some minor problems. One of them was that we need a Google Map in one of our pages. But all pages are loaded via AJAX. So the Google Map did not load, we had to refresh it, with custom data which was provided via PHP.<span id="more-599"></span><br />
So we used a little trick to execute all of our custom javascript on these pages. We just loaded a javascript file (which we needed anyway) via the $.getScript method from jQuery and put all of our magic javascript code into the callback function of it.<br />
It looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$.<span style="color: #660066;">getScript</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'/minify/?g=countdown'</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>	
	<span style="color: #003366; font-weight: bold;">var</span> similarLocationsVisible <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
	<span style="color: #003366; font-weight: bold;">var</span> userAddress <span style="color: #339933;">=</span> PowerHour.<span style="color: #660066;">User</span>.<span style="color: #660066;">GetGeolocation</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">lat</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">','</span> <span style="color: #339933;">+</span> PowerHour.<span style="color: #660066;">User</span>.<span style="color: #660066;">GetGeolocation</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">lng</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #003366; font-weight: bold;">var</span> locationLatLng <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> GLatLng<span style="color: #009900;">&#40;</span><span style="color: #339933;">&lt;?</span>php echo $this<span style="color: #339933;">-&gt;</span>locationData<span style="color: #339933;">-&gt;</span>positionX.<span style="color: #3366CC;">&quot;,&quot;</span>.$this<span style="color: #339933;">-&gt;</span>locationData<span style="color: #339933;">-&gt;</span>positionY<span style="color: #339933;">;</span> <span style="color: #339933;">?&gt;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #003366; font-weight: bold;">var</span> map<span style="color: #339933;">;</span>
        <span style="color: #006600; font-style: italic;">// Add a new Google Map Div at the active page</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'&lt;div id=&quot;divGoogleMap&quot; class=&quot;gMaps removeMarginTop&quot;&gt;loading Map...&lt;/div&gt;'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">insertBefore</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.ui-page-active .googleMapFunctions'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	map <span style="color: #339933;">=</span> PowerHour.<span style="color: #660066;">GoogleMap</span>.<span style="color: #660066;">initializeWithMarker</span><span style="color: #009900;">&#40;</span>	<span style="color: #3366CC;">&quot;divGoogleMap&quot;</span><span style="color: #339933;">,</span> locationMarker<span style="color: #339933;">,</span> <span style="color: #CC0000;">16</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #006600; font-style: italic;">// and so on...</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>And now our Google Map loaded without any problems. STOP. There was another problem. It just worked fine for the first time, if we loaded another page, with other data and a new map, it did not worked.<br />
Why? You are asking. Yeah, we needed a bit of time to realize that too. But in fact is really logic. The Google Map is bond to a div with an unique ID. So there is the problem. If we open one page after another, all of these pages have this ID and stay in our HTML-DOM. So we needed to handle this&#8230;<br />
I put that solution in a new blog entry, because I think this is another problem which should be answered on its own. Click <a href="http://devblog.powerhour.at/including-google-map-into-jquery-mobile-websites">HERE</a> to read the solution.</p>
]]></content:encoded>
			<wfw:commentRss>http://devblog.powerhour.at/jquery-mobile-execute-javascript-after-loading-a-page-with-ajax/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Creating plugins for TinyMCE</title>
		<link>http://devblog.powerhour.at/creating-plugins-for-tinymce/</link>
		<comments>http://devblog.powerhour.at/creating-plugins-for-tinymce/#comments</comments>
		<pubDate>Thu, 10 Nov 2011 10:45:00 +0000</pubDate>
		<dc:creator>thomas</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[tiny mce]]></category>
		<category><![CDATA[tinymce]]></category>

		<guid isPermaLink="false">http://devblog.powerhour.at/?p=614</guid>
		<description><![CDATA[The official TinyMCE website offers a documentation/tutorial to develop a plugin for the popular WYSIWYG Editor. Unfortunately the tutorial is quite poor and we&#8217;d love to have a template instead of a step-by-step tutorial. Hence we created a kind of boilerplate for TinyMCE plugin development you can download here: &#62;&#62; DOWNLOAD TinyMCE plugin boilerplate &#60;&#60; [...]]]></description>
			<content:encoded><![CDATA[<p>The official TinyMCE website offers a <a href="http://www.tinymce.com/wiki.php/Creating_a_plugin" target="_blank">documentation/tutorial</a> to develop a plugin for the popular WYSIWYG Editor. Unfortunately the tutorial is quite poor and we&#8217;d love to have a template instead of a step-by-step tutorial.<span id="more-614"></span></p>
<p>Hence we created a kind of boilerplate for TinyMCE plugin development you can download here:</p>
<p><a href='http://devblog.powerhour.at/wp-content/uploads/2011/11/tiny-mce-plugin-boilerplate.zip'>&gt;&gt; DOWNLOAD TinyMCE plugin boilerplate &lt;&lt;</a></p>
<p>To register your plugin to TinyMCE you need to create a folder in tiny_mce/plugins/ for your plugin and copy the boilerplates content to that folder. After modifying your plugin&#8217;s files you can add your plugin to your editor by adding your plugin in advanced mode to the init method.<br />
For example:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">tinyMCE.<span style="color: #006633;">init</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
	mode <span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;textareas&quot;</span>,
	theme <span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;advanced&quot;</span>,
	plugins <span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;example&quot;</span>,
        theme_advanced_buttons1 <span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;save,newdocument,|,bold,italic,underline,strikethrough&quot;</span>,
	theme_advanced_buttons2 <span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;justifyleft,justifycenter,justifyright,justifyfull,|,example&quot;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://devblog.powerhour.at/creating-plugins-for-tinymce/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery Mobile &#8211; Scrolling with a swipe</title>
		<link>http://devblog.powerhour.at/jquery-mobile-scrolling-with-a-swipe/</link>
		<comments>http://devblog.powerhour.at/jquery-mobile-scrolling-with-a-swipe/#comments</comments>
		<pubDate>Sat, 05 Nov 2011 19:22:15 +0000</pubDate>
		<dc:creator>stefan</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery Mobile]]></category>
		<category><![CDATA[mobile website]]></category>
		<category><![CDATA[scroll through lists]]></category>
		<category><![CDATA[swipe]]></category>

		<guid isPermaLink="false">http://devblog.powerhour.at/?p=592</guid>
		<description><![CDATA[In our new mobile WebApp for our website www.powerhour.at which we realized with the popular jQuery Mobile Framework, we included some cool stuff. One of them is the possibility to scroll through the result entries with an easy swipe to left on the mobile phone. With jQuery Mobile this isn´t really a problem, you just [...]]]></description>
			<content:encoded><![CDATA[<p>In our new mobile WebApp for our website www.powerhour.at which we realized with the popular jQuery Mobile Framework, we included some cool stuff. One of them is the possibility to scroll through the result entries with an easy swipe to left on the mobile phone.<span id="more-592"></span><br />
With jQuery Mobile this isn´t really a problem, you just have to do implement the following code:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">bind</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'mobileinit'</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.swipePage.ui-page-active'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">live</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'swipeleft'</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> 
    <span style="color: #009900;">&#123;</span>
        $.<span style="color: #660066;">mobile</span>.<span style="color: #660066;">changePage</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'/url/to/your/website?page=2);
    });
});</span></pre></div></div>

<p>Include this few javascript lines of code into your mobile jQuery Website. We bind the swipe Event to the active page with the class “swipePage” (because not all of our sub sites need to scroll).<br />
If the event is triggered you just have to load the new page withe the changePage method from the jQuery Mobile framework. For a productive usage of this, the url may be dynamic and not hard coded like in our example.<br />
A swipe able page would look something like that:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;div class=&quot;swipePage&quot; data-role=&quot;page&quot; data-theme=&quot;b&quot;&gt;
    // other page objects
&lt;/div&gt;</pre></div></div>

<p>Of course you can also use other events to trigger the loading of a new site. For example if you would like to scroll back to the last page, you can use the “swiperight” event, so the user can switch between both pages, just with a simple swipe on the smartphone display.</p>
<p>A detailled documentation of the events in jQuery  Mobile you can find here: <a href="http://jquerymobile.com/demos/1.0rc2/docs/api/events.html" target="_blank">http://jquerymobile.com/demos/1.0rc2/docs/api/events.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://devblog.powerhour.at/jquery-mobile-scrolling-with-a-swipe/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making a phone call with your Windows Phone 7 App</title>
		<link>http://devblog.powerhour.at/making-a-phone-call-with-your-windows-phone-7-app/</link>
		<comments>http://devblog.powerhour.at/making-a-phone-call-with-your-windows-phone-7-app/#comments</comments>
		<pubDate>Sun, 30 Oct 2011 19:40:39 +0000</pubDate>
		<dc:creator>stefan</dc:creator>
				<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[phone call]]></category>
		<category><![CDATA[windows phone]]></category>

		<guid isPermaLink="false">http://devblog.powerhour.at/?p=564</guid>
		<description><![CDATA[Making a phone call with your Windows Phone 7 App Calling a phone number from your App is really easy. You just need a text field (in our case: txtTelephone) with the value of the number you want to call. Then add the following code to the C# code of this page: private void txtTelephone_MouseLeftButtonDown&#40;object [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://devblog.powerhour.at/wp-content/uploads/2011/10/call_via_windows_phone7.png"><img class="alignright size-full wp-image-568" title="Make a call with your Windows Phone 7 App" src="http://devblog.powerhour.at/wp-content/uploads/2011/10/call_via_windows_phone7.png" alt="Make a call with your Windows Phone 7 App" width="350" height="147" /></a>Making a phone call with your Windows Phone 7 App<br />
Calling a phone number from your App is really easy. You just need a text field (in our case: txtTelephone) with the value of the number you want to call.<span id="more-564"></span><br />
Then add the following code to the C# code of this page:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000066; font-weight: bold;">void</span> txtTelephone_MouseLeftButtonDown<span style="color: #009900;">&#40;</span>object sender, MouseButtonEventArgs e<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">Call</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">ViewModel</span>.<span style="color: #006633;">Telephone</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>In our example the phone number comes from our view model, but of course you can take the value directly from your text field.</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000066; font-weight: bold;">void</span> Call<span style="color: #009900;">&#40;</span>string number<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    PhoneCallTask t <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> PhoneCallTask<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    t.<span style="color: #006633;">PhoneNumber</span> <span style="color: #339933;">=</span> number<span style="color: #339933;">;</span>
    t.<span style="color: #006633;">DisplayName</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">ViewModel</span>.<span style="color: #003399;">Name</span><span style="color: #339933;">;</span>
    t.<span style="color: #006633;">Show</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>

]]></content:encoded>
			<wfw:commentRss>http://devblog.powerhour.at/making-a-phone-call-with-your-windows-phone-7-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Customizing Bing Map Marker for your Phone 7 App</title>
		<link>http://devblog.powerhour.at/customizing-bing-map-marker-for-your-phone-7-app/</link>
		<comments>http://devblog.powerhour.at/customizing-bing-map-marker-for-your-phone-7-app/#comments</comments>
		<pubDate>Sun, 16 Oct 2011 19:05:18 +0000</pubDate>
		<dc:creator>stefan</dc:creator>
				<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[Bing Map Marker]]></category>
		<category><![CDATA[Phone 7 App]]></category>

		<guid isPermaLink="false">http://devblog.powerhour.at/?p=365</guid>
		<description><![CDATA[To define an individual style for your pushpins add the following code (created with Microsoft Expression Blend) to your App.xaml: &#60;!-- Pushpin Style --&#62; &#60;Style x:Key=&#34;PushpinStyle&#34; TargetType=&#34;m:Pushpin&#34;&#62; &#60;Setter Property=&#34;BorderBrush&#34; Value=&#34;#FFF4F4F5&#34; /&#62; &#60;Setter Property=&#34;Template&#34;&#62; &#60;Setter.Value&#62; &#60;ControlTemplate&#62; &#60;Canvas Height=&#34;0&#34; RenderTransformOrigin=&#34;0.5,0.5&#34; Width=&#34;0&#34;&#62; &#60;Canvas RenderTransformOrigin=&#34;0.5,0.5&#34; Height=&#34;1&#34; Width=&#34;1&#34;&#62; &#60;Path Data=&#34;M22.5,1 C34.374123,1 44,10.625878 44,22.5 C44,31.034525 39.027256,38.407604 31.821138,41.879868 L31.359026,42.095631 L22.702744,60.864998 L13.900847,42.209641 L13.651964,42.100761 [...]]]></description>
			<content:encoded><![CDATA[<p>To define an individual style for your pushpins add the following code (created with Microsoft Expression Blend) to your <strong>App.xaml</strong>:<br />
<span id="more-365"></span></p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"> <span style="color: #808080; font-style: italic;">&lt;!-- Pushpin Style --&gt;</span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Style</span> <span style="color: #000066;">x:Key</span>=<span style="color: #ff0000;">&quot;PushpinStyle&quot;</span> <span style="color: #000066;">TargetType</span>=<span style="color: #ff0000;">&quot;m:Pushpin&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Setter</span> <span style="color: #000066;">Property</span>=<span style="color: #ff0000;">&quot;BorderBrush&quot;</span> <span style="color: #000066;">Value</span>=<span style="color: #ff0000;">&quot;#FFF4F4F5&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Setter</span> <span style="color: #000066;">Property</span>=<span style="color: #ff0000;">&quot;Template&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Setter.Value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ControlTemplate<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Canvas</span> <span style="color: #000066;">Height</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">RenderTransformOrigin</span>=<span style="color: #ff0000;">&quot;0.5,0.5&quot;</span> <span style="color: #000066;">Width</span>=<span style="color: #ff0000;">&quot;0&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Canvas</span> <span style="color: #000066;">RenderTransformOrigin</span>=<span style="color: #ff0000;">&quot;0.5,0.5&quot;</span> <span style="color: #000066;">Height</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">Width</span>=<span style="color: #ff0000;">&quot;1&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Path</span> <span style="color: #000066;">Data</span>=<span style="color: #ff0000;">&quot;M22.5,1 C34.374123,1 44,10.625878 44,22.5 C44,31.034525 39.027256,38.407604 31.821138,41.879868 L31.359026,42.095631 L22.702744,60.864998 L13.900847,42.209641 L13.651964,42.100761 C6.1912994,38.727623 0.99999976,31.220058 1,22.5 C0.99999976,10.625878 10.625878,1 22.5,1 z&quot;</span>                                <span style="color: #000066;">Fill</span>=<span style="color: #ff0000;">&quot;{TemplateBinding BorderBrush}&quot;</span>                                <span style="color: #000066;">Height</span>=<span style="color: #ff0000;">&quot;61.865&quot;</span>                                <span style="color: #000066;">Stretch</span>=<span style="color: #ff0000;">&quot;Fill&quot;</span>                                <span style="color: #000066;">Stroke</span>=<span style="color: #ff0000;">&quot;Black&quot;</span>                                <span style="color: #000066;">StrokeThickness</span>=<span style="color: #ff0000;">&quot;2&quot;</span>                                <span style="color: #000066;">StrokeLineJoin</span>=<span style="color: #ff0000;">&quot;Miter&quot;</span>                                <span style="color: #000066;">UseLayoutRounding</span>=<span style="color: #ff0000;">&quot;False&quot;</span>                                <span style="color: #000066;">Width</span>=<span style="color: #ff0000;">&quot;45&quot;</span>                                <span style="color: #000066;">RenderTransformOrigin</span>=<span style="color: #ff0000;">&quot;0.5,0.5&quot;</span>                                <span style="color: #000066;">Canvas.Left</span>=<span style="color: #ff0000;">&quot;-2.703&quot;</span>                                <span style="color: #000066;">Canvas.Top</span>=<span style="color: #ff0000;">&quot;-7.187&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span></span>
                                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Path.RenderTransform<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;CompositeTransform</span> <span style="color: #000066;">TranslateX</span>=<span style="color: #ff0000;">&quot;-20&quot;</span> <span style="color: #000066;">TranslateY</span>=<span style="color: #ff0000;">&quot;-55&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Path.RenderTransform<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Path<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Path</span> <span style="color: #000066;">Data</span>=<span style="color: #ff0000;">&quot;M35,17.5 C35,27.164984 27.164984,35 17.5,35 C7.8350167,35 0,27.164984 0,17.5 C0,7.8350167 7.8350167,0 17.5,0 C27.164984,0 35,7.8350167 35,17.5 z&quot;</span>                                <span style="color: #000066;">Fill</span>=<span style="color: #ff0000;">&quot;{TemplateBinding Background}&quot;</span>                                <span style="color: #000066;">HorizontalAlignment</span>=<span style="color: #ff0000;">&quot;Left&quot;</span>                                <span style="color: #000066;">Height</span>=<span style="color: #ff0000;">&quot;35&quot;</span>                                <span style="color: #000066;">Stretch</span>=<span style="color: #ff0000;">&quot;Fill&quot;</span>                                <span style="color: #000066;">StrokeThickness</span>=<span style="color: #ff0000;">&quot;2&quot;</span>                                <span style="color: #000066;">VerticalAlignment</span>=<span style="color: #ff0000;">&quot;Top&quot;</span>                                <span style="color: #000066;">RenderTransformOrigin</span>=<span style="color: #ff0000;">&quot;0.5,0.5&quot;</span>                                <span style="color: #000066;">Width</span>=<span style="color: #ff0000;">&quot;35&quot;</span>                                <span style="color: #000066;">UseLayoutRounding</span>=<span style="color: #ff0000;">&quot;False&quot;</span>                                <span style="color: #000066;">Canvas.Top</span>=<span style="color: #ff0000;">&quot;-7.4&quot;</span>                                <span style="color: #000066;">Canvas.Left</span>=<span style="color: #ff0000;">&quot;-2.888&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span></span>
                                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Path.RenderTransform<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;CompositeTransform</span> <span style="color: #000066;">TranslateX</span>=<span style="color: #ff0000;">&quot;-15&quot;</span> <span style="color: #000066;">TranslateY</span>=<span style="color: #ff0000;">&quot;-50&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Path.RenderTransform<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Path<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Canvas<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ContentPresenter</span> <span style="color: #000066;">Width</span>=<span style="color: #ff0000;">&quot;35&quot;</span> <span style="color: #000066;">Height</span>=<span style="color: #ff0000;">&quot;35&quot;</span> <span style="color: #000066;">RenderTransformOrigin</span>=<span style="color: #ff0000;">&quot;0.5,0.5&quot;</span> <span style="color: #000066;">Canvas.Top</span>=<span style="color: #ff0000;">&quot;-3.5&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ContentPresenter.RenderTransform<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;CompositeTransform</span> <span style="color: #000066;">TranslateX</span>=<span style="color: #ff0000;">&quot;-18&quot;</span> <span style="color: #000066;">TranslateY</span>=<span style="color: #ff0000;">&quot;-54&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ContentPresenter.RenderTransform<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ContentPresenter<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Canvas<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ControlTemplate<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Setter.Value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Setter<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Style<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>In the XAML-File of your page add a map with the following code:</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;controls:PivotItem</span> <span style="color: #000066;">x:Name</span>=<span style="color: #ff0000;">&quot;pvMap&quot;</span> <span style="color: #000066;">Header</span>=<span style="color: #ff0000;">&quot;map&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
&nbsp;
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;my:Map</span> <span style="color: #000066;">Mode</span>=<span style="color: #ff0000;">&quot;Road&quot;</span> <span style="color: #000066;">x:Name</span>=<span style="color: #ff0000;">&quot;mapLocation&quot;</span> </span>
<span style="color: #009900;">                            <span style="color: #000066;">Center</span>=<span style="color: #ff0000;">&quot;{Binding Position, Mode=OneWay}&quot;</span> </span>
<span style="color: #009900;">                            <span style="color: #000066;">ZoomLevel</span>=<span style="color: #ff0000;">&quot;16&quot;</span> <span style="color: #000066;">ScaleVisibility</span>=<span style="color: #ff0000;">&quot;Collapsed&quot;</span> </span>
<span style="color: #009900;">                            <span style="color: #000066;">LogoVisibility</span>=<span style="color: #ff0000;">&quot;Collapsed&quot;</span> <span style="color: #000066;">ZoomBarVisibility</span>=<span style="color: #ff0000;">&quot;Visible&quot;</span> </span>
<span style="color: #009900;">                            <span style="color: #000066;">IsEnabled</span>=<span style="color: #ff0000;">&quot;True&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
&nbsp;
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;my:MapItemsControl</span> <span style="color: #000066;">ItemsSource</span>=<span style="color: #ff0000;">&quot;{Binding Pushpins}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;my:MapItemsControl.ItemTemplate<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DataTemplate<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;my:Pushpin</span></span>
<span style="color: #009900;">                                    <span style="color: #000066;">Style</span>=<span style="color: #ff0000;">&quot;{StaticResource PushpinStyle}&quot;</span></span>
<span style="color: #009900;">                                    <span style="color: #000066;">Location</span>=<span style="color: #ff0000;">&quot;{Binding Location}&quot;</span> </span>
<span style="color: #009900;">                                    <span style="color: #000066;">IsEnabled</span>=<span style="color: #ff0000;">&quot;True&quot;</span> </span>
<span style="color: #009900;">                                    <span style="color: #000066;">Background</span>=<span style="color: #ff0000;">&quot;{Binding BackgroundColor}&quot;</span> </span>
<span style="color: #009900;">                                    <span style="color: #000066;">Foreground</span>=<span style="color: #ff0000;">&quot;Red&quot;</span> <span style="color: #000066;">MouseLeftButtonDown</span>=<span style="color: #ff0000;">&quot;Pushpin_MouseLeftButtonDown&quot;</span> <span style="color: #000066;">DataContext</span>=<span style="color: #ff0000;">&quot;{Binding}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;my:Pushpin.BorderBrush<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;LinearGradientBrush</span> <span style="color: #000066;">EndPoint</span>=<span style="color: #ff0000;">&quot;0.5,1&quot;</span> <span style="color: #000066;">StartPoint</span>=<span style="color: #ff0000;">&quot;0.5,0&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;GradientStop</span> <span style="color: #000066;">Color</span>=<span style="color: #ff0000;">&quot;#FFB8B8B8&quot;</span> <span style="color: #000066;">Offset</span>=<span style="color: #ff0000;">&quot;0&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;GradientStop</span> <span style="color: #000066;">Color</span>=<span style="color: #ff0000;">&quot;White&quot;</span> <span style="color: #000066;">Offset</span>=<span style="color: #ff0000;">&quot;1&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/LinearGradientBrush<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/my:Pushpin.BorderBrush<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Image</span> <span style="color: #000066;">Source</span>=<span style="color: #ff0000;">&quot;{Binding Icon}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/my:Pushpin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/DataTemplate<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/my:MapItemsControl.ItemTemplate<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/my:MapItemsControl<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/my:Map<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/controls:PivotItem<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/controls:Pivot<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<h2>Class PushpinModel</h2>
<p>Now add a new class (we called it PushpinModel) to your project. This class contains several properties to restyle your pushpin.</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> PushpinModel
<span style="color: #009900;">&#123;</span>
<span style="color: #666666; font-style: italic;">/// &lt;summary&gt; </span>
<span style="color: #666666; font-style: italic;">/// Coordinates of the object represented by the pushpin </span>
<span style="color: #666666; font-style: italic;">/// &lt;/summary&gt;</span>
<span style="color: #000000; font-weight: bold;">public</span> GeoCoordinate Location <span style="color: #009900;">&#123;</span> get<span style="color: #339933;">;</span> set<span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> 
&nbsp;
<span style="color: #666666; font-style: italic;">/// &lt;summary&gt; </span>
<span style="color: #666666; font-style: italic;">/// URL of the icon that should be displayed within the pushpin </span>
<span style="color: #666666; font-style: italic;">/// &lt;/summary&gt;</span>
<span style="color: #000000; font-weight: bold;">public</span> Uri <span style="color: #003399;">Icon</span> <span style="color: #009900;">&#123;</span> get<span style="color: #339933;">;</span> set<span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> 
&nbsp;
<span style="color: #666666; font-style: italic;">/// &lt;summary&gt; </span>
<span style="color: #666666; font-style: italic;">/// Data that is held by the Pushpin (e.g. address, name,...) </span>
<span style="color: #666666; font-style: italic;">/// &lt;/summary&gt;</span>
<span style="color: #000000; font-weight: bold;">public</span> object PushpinData <span style="color: #009900;">&#123;</span> get<span style="color: #339933;">;</span> set<span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">protected</span> SolidColorBrush _backgroundColor <span style="color: #339933;">=</span> Application.<span style="color: #003399;">Current</span>.<span style="color: #006633;">Resources</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;PhoneAccentBrush&quot;</span><span style="color: #009900;">&#93;</span> as SolidColorBrush<span style="color: #339933;">;</span> 
&nbsp;
<span style="color: #666666; font-style: italic;">/// &lt;summary&gt; </span>
<span style="color: #666666; font-style: italic;">/// The fill color of the pushpin (default: PhoneAccentBrush) </span>
<span style="color: #666666; font-style: italic;">/// &lt;/summary&gt;</span>
<span style="color: #000000; font-weight: bold;">public</span> SolidColorBrush BackgroundColor <span style="color: #009900;">&#123;</span> get <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000000; font-weight: bold;">this</span>._backgroundColor<span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> set <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">this</span>._backgroundColor <span style="color: #339933;">=</span> value<span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> <span style="color: #009900;">&#125;</span> <span style="color: #009900;">&#125;</span></pre></div></div>

<p>To fill the MapItemsControl with individual pushpins you need to provide an ObservableCollection of PushpinModels like the following:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> ObservableCollection Pushpins
<span style="color: #009900;">&#123;</span>
    get
    <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000000; font-weight: bold;">new</span> ObservableCollection
        <span style="color: #009900;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">new</span> PushpinModel <span style="color: #009900;">&#123;</span> Location <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> GeoCoordinate<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">48.2</span>, <span style="color: #cc66cc;">16.3</span><span style="color: #009900;">&#41;</span>, <span style="color: #003399;">Icon</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Uri<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;http://yourwebsite.com/images/pushpin1.png&quot;</span><span style="color: #009900;">&#41;</span>, BackgroundColor <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> SolidColorBrush<span style="color: #009900;">&#40;</span><span style="color: #003399;">Color</span>.<span style="color: #006633;">FromArgb</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">255</span>, <span style="color: #cc66cc;">226</span>, <span style="color: #cc66cc;">57</span>, <span style="color: #cc66cc;">133</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#125;</span>,
            <span style="color: #000000; font-weight: bold;">new</span> PushpinModel <span style="color: #009900;">&#123;</span> Location <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> GeoCoordinate<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">48.3</span>, <span style="color: #cc66cc;">16.35</span><span style="color: #009900;">&#41;</span>, <span style="color: #003399;">Icon</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Uri<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;http://yourwebsite.com/images/pushpin2.png&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<h2>Example of our customized Map Marker in our Windows Phone 7 App</h2>
<p><a href="http://devblog.powerhour.at/wp-content/uploads/2011/10/powerhour_customized_windows_phone7_map_marker.png"><img class="size-full wp-image-544" title="Example of customized Bing Map Marker for your Phone 7 App" src="http://devblog.powerhour.at/wp-content/uploads/2011/10/powerhour_customized_windows_phone7_map_marker.png" alt="Customizing Bing Map Marker for your Phone 7 App" width="348" height="640" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://devblog.powerhour.at/customizing-bing-map-marker-for-your-phone-7-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How is it possible to get latitude/longitude from an address via php? &#8211; Part 2</title>
		<link>http://devblog.powerhour.at/how-is-it-possible-to-get-latitudelongitude-from-an-address-via-php-part-2/</link>
		<comments>http://devblog.powerhour.at/how-is-it-possible-to-get-latitudelongitude-from-an-address-via-php-part-2/#comments</comments>
		<pubDate>Mon, 10 Oct 2011 09:15:20 +0000</pubDate>
		<dc:creator>thomas</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[geocoding api]]></category>
		<category><![CDATA[google api]]></category>
		<category><![CDATA[google geocoding]]></category>
		<category><![CDATA[php geocode]]></category>

		<guid isPermaLink="false">http://devblog.powerhour.at/?p=573</guid>
		<description><![CDATA[Some time ago I wrote an article giving answer to the question &#8220;how can I get latitude/longitude from an address via php?&#8220;. I wrote in that article that we created a php library, based on Google&#8217;s geocoding API, to solve that problem. As Google released version 3 of their API we also updated our library. [...]]]></description>
			<content:encoded><![CDATA[<p>Some time ago I wrote an article giving answer to the question &#8220;<a title="How is it possible to get latitude/longitude from an address via php?" href="http://devblog.powerhour.at/how-is-it-possible-to-get-latitudelongitude-from-an-address-via-php/">how can I get latitude/longitude from an address via php?</a>&#8220;. I wrote in that article that we created a php library, based on Google&#8217;s geocoding API, to solve that problem. As Google released version 3 of their API we also updated our library.</p>
<p>You can now download version 2.0 of our geocoding library including an example script here:<br />
<a href="http://devblog.powerhour.at/wp-content/uploads/2011/10/powerhour-geocoder-2.zip">http://devblog.powerhour.at/wp-content/uploads/2011/10/powerhour-geocoder-2.zip</a></p>
<p><strong>Note: This version does not require a Google Maps Key anymore!</strong></p>
<p>If you are using a script similar to the example we provided with our first version you won&#8217;t have to change anything (in this case only the include path was changed):</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: #990000;">set_include_path</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">get_include_path</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> PATH_SEPARATOR <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;PowerHour_Geocoder_v2.0&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">require_once</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Geocoder.php&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        try
		<span style="color: #009900;">&#123;</span>
			<span style="color: #666666; font-style: italic;">// Create new instance</span>
			<span style="color: #000088;">$geocoder</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> PowerHour_Geocoder<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #666666; font-style: italic;">// Get geocode information</span>
			<span style="color: #000088;">$geocoder</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">mapFromAddress</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Salzgries 1, Wien&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #666666; font-style: italic;">// show geo information</span>
			<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$geocoder</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getLatitude</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;, &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$geocoder</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getLongitude</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;
			&quot;</span><span style="color: #339933;">;</span>
			<span style="color: #666666; font-style: italic;">// show zip</span>
			<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;zip is: &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$geocoder</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getZip</span><span style="color: #009900;">&#40;</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>PowerHour_Geocoder_UnknownAddressException <span style="color: #000088;">$unknownAddressException</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;could not find address&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		catch<span style="color: #009900;">&#40;</span>PowerHour_Geocoder_Exception <span style="color: #000088;">$geocodeException</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;sorry, an error occured during address lookup&quot;</span><span style="color: #339933;">;</span>	
		<span style="color: #009900;">&#125;</span></pre></div></div>

<p>The above example should return the following result:<br />
48.2125693, 16.3737802 zip is: 1010</p>
]]></content:encoded>
			<wfw:commentRss>http://devblog.powerhour.at/how-is-it-possible-to-get-latitudelongitude-from-an-address-via-php-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jqrotate &#8211; Rotate DOM elements</title>
		<link>http://devblog.powerhour.at/jqrotate-rotate-dom-elements/</link>
		<comments>http://devblog.powerhour.at/jqrotate-rotate-dom-elements/#comments</comments>
		<pubDate>Sun, 02 Oct 2011 19:09:40 +0000</pubDate>
		<dc:creator>thomas</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[cross browser compatibility]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[jquery plugin]]></category>
		<category><![CDATA[rotate]]></category>

		<guid isPermaLink="false">http://devblog.powerhour.at/?p=521</guid>
		<description><![CDATA[We love CSS3 and all the new opportunities it offers. But as CSS3 always comes with the question for cross browser compatibility we are constantly looking for solutions. We like the possibility to rotate DOM elements by CSS3 and hence developed a jQuery plugin that let&#8217;s you do that if your visitors use one of [...]]]></description>
			<content:encoded><![CDATA[<p>We love CSS3 and all the new opportunities it offers. But as CSS3 always comes with the question for cross browser compatibility we are constantly looking for solutions.<br />
<span id="more-521"></span><br />
We like the possibility to rotate DOM elements by CSS3 and hence developed a jQuery plugin that let&#8217;s you do that if your visitors use one of the following browsers:</p>
<ul>
<li>Mozilla Firefox 3.5+</li>
<li>Safari 5.0+</li>
<li>Internet Explorer 6+</li>
<li>Google Chrome 10+</li>
</ul>
<p>
The following example show&#8217;s our plugin in action:
</p>
<p><script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script><br />
<script src="http://plugins.jquery.com/files/jquery.rotate-0.1.js__1.txt"></script><br />
<script>
$(document).ready(function()
			{
				$('div.rotation').jqrotate(90);
			});
</script></p>
<div class="rotation" style="height: 50px; width: 100px">
I am rotated by 90 degrees.
</div>
<p>&nbsp;</p>
<p>To reproduce that use the following piece of code:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text/javascript&quot;</span> src<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js&quot;</span><span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>script src<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://plugins.jquery.com/files/jquery.rotate-0.1.js__1.txt&quot;</span><span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>script<span style="color: #339933;">&gt;</span>
     $<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #006633;">ready</span><span style="color: #009900;">&#40;</span>function<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
     <span style="color: #009900;">&#123;</span>
          $<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'div.rotation'</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">jqrotate</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">90</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
     <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>div <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;rotation&quot;</span> style<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;height: 50px; width: 100px&quot;</span><span style="color: #339933;">&gt;</span>
     I am rotated by <span style="color: #cc66cc;">90</span> degrees.
<span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span></pre></div></div>

<p>
To grab the latest version of jqrotate visit our jQuery plugin page: <a href="http://plugins.jquery.com/content/jqrotate-01" target="_blank">http://plugins.jquery.com/content/jqrotate-01</a>
</p>
<p>
Note: To check cross browser compatibility we prefer Adobe&#8217;s Browserlab: <a href="https://browserlab.adobe.com" target="_blank">https://browserlab.adobe.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://devblog.powerhour.at/jqrotate-rotate-dom-elements/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

