Friday, May 25, 2012

Creating your own Horde module - Step 1

We always had a wiki page on how to create your own Horde module. The steps outlined there allow you to get started quickly.

There was no specific reason though why those steps could not be automated. Based on the core script presented on the aforementioned wiki page I created a complete script that allows you to initiate a new Horde module with a single command.

framework/devtools/horde-generate-module.php fancy "Gunnar Wrobel <>"

The line above will create the stub for the new Horde application Fancy.

Once you created the new module this way you still need to register the new application in the Horde registry. This can be done within the directory config/registry.d. For details see the README file in that directory.

In addition you can set an icon that should represent your module. Refer to the instructions on the wiki page for that.

Horde at LinuxTag 2012

We have a great time here at LinuxTag. Somehow the KDE project managed to get us placed right beside them again. Apparently the constant stream of gummy bears we fed them during CeBIT has turned into a serious additiction. By now they kind of depend on us. And of course we can't let them off the hook now.

Beside that we had a good amount of chats with people interested in the Horde groupware. And we received a lot of positive feedback about the new design which is great. Looks like everyone is looking forward to it.

And since the mornings are usually somewhat quieter Jan even has some time to work on the redesign and commit code. Can't wait for Horde 5.0 anymore...

Wednesday, May 23, 2012

Generating default preferences for your Horde installation

While updating our demo server at I also wanted to get some kind of automatic reset for the demo user preferences. The aim was to allow each user testing our demo system to play around with the system in every way desired - while at the same time resetting to the defaults once the next user logs in. This way the second user wouldn't get an unpleasant surprise and turn away from Horde if the first user selected our beloved "Barbie" theme. By the way: this one will be dropped with the redesign - I hope nobody flames our mailing lists and starts a revolution to get this pink atrocity back :)

In order to achieve that I needed to move from SQL based preferences to Session based preferences. Using the latter would purge any preference changes at the end of the session. In order to provide the users with some sane and useful defaults though I also Wanted to copy the old values from the SQL database into the prefs.local.php files. This way I can set the preferences so that users are immediately greeted with a portal screen that demonstrates the twitter and facebook integration.

Converting SQL based preferences to prefs.local.php default settings is something you might be interested in for your installation as well. It allows you to set appropriate defaults for one initial test user and convert those into site-wide defaults for your installation.

How to do that without much hassle? horde-prefs to the rescue!

horde-prefs is a small tool that allows printing, exporting, and importing of preference values stored in a backend.

In order to use the tool you need to define a configuration file for the specific backend you want to access. For the demo server this has been a SQL database:

   $conf['driver'] = 'Sql';
   $conf['params']['db'] = new Horde_Db_Adapter_Mysql(
      'persistent' => false,
      'username' => 'root',
      'password' => 'PASSWORD',
      'socket' => '/var/run/mysqld/mysqld.sock',
      'protocol' => 'unix',
      'database' => 'horde',
      'charset' => 'utf-8',
      'ssl' => true,
      'splitread' => false,
      'phptype' => 'mysql',

Now you can access the stored preference values by calling the horde-prefs tool. As horde-prefs is not stored under /usr/bin on the home server but uses a non-standard location I prefix the command with an explicit PHP include path:

php -d include_path="/var/www/pear/php" /var/www/pear/horde-prefs config.php guest print horde

The previous command prints all preferences values stored for the guest user for the application horde:

$_prefs['twitter']['value'] = "a:2:{s:3:"key";s:50:"183748047-vr6RLMOiYhfbfTH3qI8Lc8E32jF4UGGFbIxdkZyt";s:6:"secret";s:42:"i2DGXInJBW4kk3r2bvBdrxzUKMxL6AYS4u97WAJDyQ";}"
$_prefs['upgrade_tasks']['value'] = "a:7:{s:5:"horde";s:6:"4.0.13";s:9:"kronolith";s:5:"3.0.5";s:8:"imp_auth";s:5:"5.0.8";s:3:"imp";s:5:"5.0.8";s:5:"turba";s:5:"3.0.7";s:5:"whups";s:10:"2.0-ALPHA1";s:6:"gollem";s:10:"2.0-ALPHA2";}"

To convert this into a format suitable for the prefs.local.php files I simply used sed.

php -d include_path="/var/www/pear/php" /var/www/pear/horde-prefs config.php guest print horde | sed -e "s/^\([^:]*\): \(.*\)/\$_prefs\['\1'\]\['value'\] = '\2';/" >> /var/www/config/prefs.local.php

Tuesday, May 22, 2012

Getting CalDAV and CardDAV server capabilities within Horde

Would you like to sponsor CalDAV and CardDAV server capabilities within Horde? This has been a Horde feature wish for quite some time now. We would have liked to have it for Horde 4.0 already and it looked more feasible to get it with Horde 5.0. But ultimately we had to delay it again as the redesign had the priority.

We decided however that we would like to tackle the DAV topic with top priority right after Horde 5.0 has been released. And we already have some pledges of support to get the feature completed - but we would need a few more to get complete CalDAV and CardDAV support within Horde as the whole thing is a larger story.

If you have some interest in the functionality it would be great if you could contact us via Or you could use the "Donate" button on our homepage.

Thanks for you support!

Friday, May 11, 2012

A sneak peek of the new Horde 5 user interface

To get an idea on how Horde 5 will look like: click the link or the image of this post.

Why does Horde 5 get a face lift? Simply because the current UI was mentioned often enough as an issue by many Horde users. And since the Horde 4 release had a very technical focus the switch from Horde 3 to Horde 4 last year did not help - it even degraded consistency between the applications. At the same time the competition does not sleep and there are more and more large installations that offer their user base two different webmails - one of them being Horde for the power users that feel they need a lot of features but that care less about the UI. Time to get our act together.

So what is the primary target of the redesign? First and foremost we want to unify the main user interfaces. At the moment we have the static application views, the dynamic webmailer, and the dynamic calender as the core parts. All looked somewhat different. These are the elements that we wish to give a consistent look. The special views such as the minimal webmailer or the smartphone UI will remain untouched.

We also hope the new design looks somewhat fresher than what we had before but please keep in mind that we are oriented towards people that use the interface for their daily work. We do not aim for a UI that looks like the last hype. It should be functional instead.

The Horde LLC has been the driving factor behind the redesign. At least financially. A subset of the Horde core developers started the LLC a while back as a contact point for people that want to pay for Horde support or feature development. A part of the money that such contracts pay goes to the developers dealing with the particular customer request. But another part of the money remains within the LLC. The idea is to use the latter to drive features that we consider to be important for Horde and its community. The redesign is the first project that has been financed this way. The Horde team tried finding designers interested in contributing to an Open Source project several times before. This was unsuccessful however and paying a designer for the work remained the only reasonable alternative.

We contracted No agency for the design. After several rounds of communication between them and all Horde developers we managed to end up with the draft displayed above. This has been converted to HTML and CSS this week and will be hammered into code during the next week by Jan Schneider. We do hope to present you with an alpha of Horde 5 - including the draft of the new design - on the 22nd May of 2012.

Feedback and comments - as usual - are welcome!