Schladming 2013 Mobile App

Really proud, that our dedicated team of developers managed to release the official mobile Application for the FIS Ski WMS 2013 supporting iPhones, iPads and Android Devices natively as well as various other devices using mobile HTML5.

See at all the Apps Features at ulrich.tao.at, download the App for iPads, iPhones as well as Android Devices or try the HTML5 Version in your Browser.


HTML5 or Native

It’s a fact that mobile applications these days demand support for multiple platforms. The current iOS as well as Android deliver a really solid user experience, each with it’s own advantages as well as shortcomings. Hence their userbases are quite equally distributed.

Now in essence there are only two possible ways to support both platforms. Either write two separate applications using (mostly) Java for Android and Cocoa/Objective-C for iOS or use HTML5 to share a large part of your codebase for both platforms. Mark Zuckerberg just declared the latter approach dead and claims that Facebook wasted two years trying to go the HTML5 route. On the other hand Linkedin is really happy with their gourgeous HTML5 apps and only needs 5% of native code to fulfill the needs of their userbase.

I for one, really think that Facebooks move to go all native is just plain wrong. First of all it speaks volumes, that Facebook only managed to finish a native iOS version up until now. The native Android version is still in development with no fixed release date available. Second, and more important, going all native looks, smells and tastes like premature optimization in my book. I can think of no valid argument against rapid development of plain HTML Applications, identifying the performance critical parts and only implementing those using native code. Chances are, you only need to optimize a tiny fraction of your code.

On the other hand I can think of plenty of arguments to use HTML for your applications:

  • code-reuse across platforms as well as your web app
  • Less iOS / Android knowledge needed on your development team
  • Surprisingly well standardized development environment (in essence webkit mobile)
  • stick with your existing web app workflows and toolchains

And last but not least there are tons of ressources available these days to build native HTML Apps. Some keywords for your next google search:

  • jQuery Mobile
  • Sencha Touch
  • Apache Cordova
  • Phonegap
  • Zend Studios new UI Based App Generator

Just saying

Let users experience, discover and conquer your application. Don’t try to force your way on them. Watch and learn.


Mac OSX Trackpad click not working

Ever so often my OSX Trackpack suddenly stops working in a strange way. Moving the cursor is possible, but clicks are ignored. Turns out the root of all evil is the osx bluetooth stack – again! By simply disabling and reenabling bluetooth connectivity the trackpad magicly starts working again …


Zerg Rush

Google revives old Starcraft memories HERE


jQueryUI nested Sortable still bugs out on Internet Explorer – easy to fix

Using jQueryUI’s nested Sortables again I was surprised to see, that a rather stupid ie bug still exists for ie8+. In essence, dragging some nested Elements also starts dragging the parent Elements. In most cases this can be fixed quite easily unsing this piece of code from Stackoverflow.

http://stackoverflow.com/questions/1789169/jquery-unexpected-sortable-behaviour/1789775#1789775

Still i would suggest wrapping the code with if( $.browser.msie ) { } because the fix is not needed on other browsers. Mind you that $.browser is deprecated.


Wordpress: qTranslate and Shopp Plugin II

Just a quick reminder: Shopp Plugin and qTranslate don’t play nice when it comes to Pretty Links / Permalinks. In this case the root of all evil seems to be Wordpress because with a typical setup bloginfo('url') displays http://mydomain.com/en i.e. the correct qTranslate URL, but get_bloginfo('url') returns http://mydomain.com.

One possible fix includes hacking shoppurl in the functions.php file of the Shopp plugin – simply replace get_bloginfo('url') with get_bloginfo('url', 'display').


Wordpress: qTranslate and Shopp Plugin

qTranslate is a lets say sufficient free plugin that enables multilingual wordpress setups. For a free plugin it is really feature rich, but when it comes to interact with the really nice shopp plugin, there are a few shortcommings. Especially, there is no way (besides writing qtranslate’s comments by hand) to translate the product summaries. This however can be resolved rather easy, because the product-summary field is more or less identical to wordpress own postexcerpt field. The later can be translated by qTranslate with qTranslates internal qtrans_modifyExcerpt() function.

So if we want to add translation für shopp product summaries, we simply have to take that function, adjust it to our needs and call it at the right spot. Without further ado – add the code below to your functions.php and you are done.

function tao_qtrans_modifyProductSummary() {
	global $q_config;
	echo "<script type="text/javascript">\n";
	echo "if(jQuery('#summary').size()>0) {";
	echo $q_config['js']['qtrans_is_array'];
	echo $q_config['js']['qtrans_xsplit'];
	echo $q_config['js']['qtrans_split'];
	echo $q_config['js']['qtrans_integrate'];
	echo $q_config['js']['qtrans_switch_postbox'];
	echo $q_config['js']['qtrans_use'];
	$el = qtrans_getSortedLanguages();
	foreach($el as $language) {
		echo qtrans_createTitlebarButton('product-summary', $language, 'summary', 'qtrans_switcher_product-summary_'.$language);
		echo qtrans_createTextArea('product-summary', $language, 'summary', 'qtrans_switcher_product-summary_'.$language);
	}
	echo "qtrans_switch_postbox('product-summary','summary','".$q_config['default_language']."');";
	echo "jQuery('#summary').hide();";
	echo "}";
	echo "\n</script>\n";
}

if( function_exists('qtrans_createTitlebarButton') &&
	function_exists('qtrans_createTextArea') ) {
	add_filter('admin_footer', 'tao_qtrans_modifyProductSummary');
}


Mailchimp API listSubscribe / listBatchSubscribe and Groups

Commonly, larger mailchimp lists are segmented by interest groups to allow specific targeting without handling subscriber data on different lists.

Now if you want to import large amounts of already subscribed users, using the mailchimp api is the best solution. Scanning the mailchimp api docs of the listBatchSubscribe action I was not able to find any documentation on how to import subscribers to specific interest groups – should have read the listSubscribe docs too ;-) . It turned out it is really simple. Just add an array of group information to your data rows using the key ‘GROUPINGS’ and you are good to go. Group information must contain the key ‘groups’ – a comma separated list of interests and either the group id or the name of the group you want to add your data to. ID, name and values of groups can also be listed using the listInterestGroupings method.

A simple example:

$batch = array(
   array(
      'EMAIL' => 'test@yourdomain.com',
      'FNAME' => 'Test',
      'LNAME' => 'Test',
      'GROUPINGS' => array(
          array('name' => 'MyGroup', 'groups' => 'Value1, Value3'),
          array('id' => 15, 'groups' => 'Value2'),
      )
);
$chimp->listBatchSubscribe($list_id, $batch, true, true, true);


SimpleNote Linux Desktop Client

Being an avid Notational Velocity user on OSX, i was really happy when Notational Velocity started to support SimpleNote. This made it really easy to sync notes on multiple devices including my iPhone.

Now i recently became a part-time linux user (again). Sadly there was no useful native client for SimpleNote available. Of course there is the standard web-interface and there is even a google chrome extension that allows working with SimpleNote.

Once again, i totally forgot emacs. Sometimes called an operating system on its own :-) and this operating system really has support for SimpleNote through simplenote.el.

Installation is really simple:

(require 'simplenote)
(setq simplenote-email "")
(setq simplenote-password "")
(simplenote-setup)

Happy note-taking.


jQuery GooglePlus Widget

I have just been toying around a few minutes with the google+ api.

The result is a small jQuery plugin that can display and update a users activity stream.

Setting up the plugin is really simple – just include it using

<script src="https://raw.github.com/wbg/jQuery-GooglePlus-Widget/master/js/jquery.googleplus.widget.min.js"></script>

And start it using

$(function() {
  	       $('#target').googleplusWidget({api_key:'API KEY',user_id:'USER ID'}).trigger('start_gplus');
});

You can register an API key using the google api console: https://code.google.com/apis/console/

Get it on github


OS X Lion Flash Permission buttons not working

There is a severe drawback in Adobe Flash on OS X Lion (10.7). Flash Apps that need access to Camera or Microphone i.e. every Flash Video Chat show the “Allow to Access” Screen, but there is no way to click “Allow”. Currently this can either be worked around using keyboard navigation (tab to the ‘Allow’ button and hit space to confirm) or by manually adding the Sites in the “Camera and Microphone” tab of the Flash Player Preference Pane.

Details about this bug on the apple discussion board. And the corresponding entry on adobes bug tracker.


Comprehensive Lion Review

This week Apple released its newest Operating System Mac OS X 10.7 aka Lion solely through the Mac App Store. It is no revolutionary update, but there are lots of new GUI as well as OS features.

Ars Technica did a great review covering all the new stuff in lion. Read it at arstechnica.com.


Add custom post types to your wordpress feed

Most well-structured wordpress projects these days make heavy use of custom post types to cleanly separate different kinds of information.

Sadly by default, these post types are not available in your main wordpress RSS / ATOM feed, but luckily this can easily be fixed.

Just paste the following Code in your functions.php and all entries of all your custom post types are added to your RSS / ATOM feed.

add_filter('pre_get_posts',
	create_function('$query',
		'if ($query->is_feed) $query->set("post_type","any");
		return $query;'
	)
);

If you want to be more specific about what to add to your feed, simply change “any” to an array of post_types. For example:

add_filter('pre_get_posts',
	create_function('$query',
		'if ($query->is_feed)
			$query->set("post_type",array("post", "my_custom"));
		return $query;'
	)
);

As you are accessing the wordpress query object, the same technique can also be used to change the post order in your feed, or add custom category filters etc…


Enable iframes for wordpress posts

By default wordpress removes iframe tags from posts. This is not always the desired behavior as youtube, vimeo and other widgets are added via iframes.

The filtering of iframe tags is performed on the clientside by the javascript editor tinymce as well as on the serverside by the wordpress whitelist filter. Therefor, to disable iframe filtering, it is neccessary to add two hooks to either a plugin or the functions.php of your theme:

Disable iframe filtering in tinymce

Simply add the following code to your functions.php – this adds iframes as valid elements for tinymce:

add_filter('tiny_mce_before_init', create_function('$a', '$a["extended_valid_elements"] = "iframe[id|class|align|frameborder|height|name|scrolling|src|width|title|style]";return $a;'));

Disable server-side iframe filtering

Add this code to your functions.php – it adds iframes to the whitelist of wordpress:

global $allowedposttags;
$allowedposttags["iframe"] = array("id" => array(),"class" => array(), "align" => array(),"frameborder" => array(),"title" => array(),"style" => array(),"name" => array(),"scrolling" => array(),"src" => array(),"height" => array(),"width" => array());