{ Hi! I'm Mike }
I'm a core developer with The Horde Project and a founding parter of Horde LLC - the company behind the world's most flexible groupware platform. This is my personal blog full of random thoughts about development and life in general.
December 5, 2011

Ansel exporter plugins available

I first wrote about my efforts to write an iPhoto export plugin for uploading images directly to Ansel from iPhoto back in November 2008. Three entire years ago. I wrote about my progress again in 2009 along with some screen shots. Since then, I've rewritten it twice and ported it to Aperture. I've been using these plugins myself as part of my workflow ever since.

 

Both Ansel versions 1.x and 2.x are supported by these uploaders. All metadata is retained during export, including keywords. You can create new galleries directly from the plugin, as well as browse a gallery's thumbnails so you can see what images have been previously uploaded. You may configure multiple Ansel servers as well.

I've finally gotten around to fulfilling my promise to publish a binary installer for these, so that users don't have to build them from scratch in XCode. You can now download these directly from Ansel's download page. Please keep in mind these are alpha-level releases. Feel free to report any issues you have to the ansel mailing list, or open a bug report at http://bugs.horde.org.

March 23, 2011

Personal Roadmap

With the release of the first RCs for Horde 4 and the final release looming less than 2 weeks away, I thought it a great time to start looking ahead at my personal roadmap for Horde 4 development.

The entire Horde team has been pretty much exclusively working on resolving final roadblockers and reworking the release process these last few months. As much fun as it is getting ready for this milestone release, I'm also a bit excited about being able to get back to some projects that have been patiently taking the back seat while the initial Horde 4 release was being prepared.

Some things I'm excited to get back to in the months ahead:

Ansel, the Horde photo gallery application, needs some significant changes to keep up with the recent changes in the Horde_Share library. These *must* be done before Ansel can be released with the next Horde 4 release, so this is likely to be where I focus on immediatley following the release. Additionally, Ansel needs to move away from the Google Maps based geolocation features, and use the new Horde_Map functionality in Horde 4. This would provide the ability to use any number of different mapping backends while changing nothing but a configuration setting. I might even make this a per-gallery setting, so pictures taken while hiking could, theoretically, be placed on a hiking trail maps, while pictures taken while sight seeing could be placed on a traditional map for instance. I'll also hopefully finally get to some of the dozen or so enhancements requests waiting on our ticket tracker!

Hermes is getting an Ajax AND mobile interface (partially sponsored by Alkaloid Networks - thanks Ben!), and I'm pretty excited about working on this. I'd also like to expand on some of our other existing mobile interfaces, like Kronolith and Nag. I also have a bunch of other itch-scratching to do in Nag.

I've been wanting more integration points for our Twitter and Facebook support for a while now. We already have basic clients for these two social networking services, as well as some existing integration such as a Turba driver for Facebook contacts, a TimeObjects driver for Facebook events, birthdays etc... but we really need to add things like auto posting to the user's Twitter/Facebook stream after publishing a new blog post in Jonah, or new photos have been added to an Ansel gallery.

Jonah: I'd like to finally get this application to the point where it can be released. I, along with a number of the other Horde devs, have been using Jonah to power our personal blogs since way before Horde 4 work even started, and it's about time this thing got released. Thanks to Ian Roth for contributing a number of patches on GitHub related to getting it more in-line with Horde 4 code.

Add to these a slew of existing enhancment requests, some articles that are in varoius stages of being complete, the normal bug fixes and support requests that crop up, and some personal coding projects, I'll have enough to fill up my development time for the foreseeable future. Now, all I need is a Horde_Time::create() method to find the time to do all this...

September 27, 2009

Ansel, Kronolith, and more...

Wow, it's been since June 10th, almost 4 months since my last entry. Time flies...especially when you are busy. In the interest of keeping people informed, here are some of the new things I've been working on with regards to The Horde Project,  with an indication as to what version of Horde the work applies to:

Horde_Service_Twitter (H4 Only)

Since stating to use twitter, I figured it would be helpful to have my Twitter timeline appear in Horde, since that's what is usually loaded in my browser. Following my typical NIH rule when it comes to Horde, the result is the new Horde_Service_Twitter library and the twitter_timeline block for Horde's portal.  Horde_Service_Twitter supports authentication to Twitter via both the standard http authentication method as well as via OAuth. The latter making use of the Horde_Oauth library. The portal block allows you to publish a new tweet,  shows the most recent tweets by the people you are following and allows you to reply to a displayed tweet.

The addition of Horde_Service_Twitter, along with Horde_Service_Facebook, adds some exciting possibilities for integration points with other Horde applications. Horde already has some address book and calendar integration with Facebook, but other possibilities include things like automatically posting a notification to Twitter or Facebook when a set of new images are uploaded to Ansel, or maybe when a new blog post is published with Jonah.

 

Ansel (H3 and H4)

Ansel has gotten a fair amount of work recently and is ready for a 1.1 release. The most obvious change is full support of geo-tagging features.  Ansel has always been able to read,and display an image's meta data...but up until now you couldn't do much with any of the location data. Now, Ansel will recognize GPS coordinates in the meta data and display small thumbnails of those images in an embedded Google Map. There are various locations throughout Ansel where you can view these maps. You can also add location data to images that do not contain it as well as edit any existing location data. Full support for reverse geocoding means that you can (re)tag an image by either typing a textual name for the location (such as Philadelphia, PA) or by typing in actual GPS lat/lng coordinates. Of course, you can also (re)tag an image simply by browsing the Google Map and clicking where you want the image to be located.

Ansel's bleeding edge code has officially moved out of Horde's CVS repository and into the git repository, horde-hatchery. A fair amount of refactoring and internal improvements have already been done in getting Ansel and Horde_Image ready for Horde 4. Among these changes is better support for image meta data, with a new driver based on exif tool. This allows recognition of not only EXIF tags, but also IPTC and XMP data as well.

 

 

iPhoto/Aperture Export Plug-Ins (H3 and H4)

Related to the Ansel application, are new export plug-ins for both of Apple's image management applications, iPhoto and Aperture.  Currently available via Horde's horde-hatchery git repository, these plug-ins allow you to upload your images directly to an Ansel server from within iPhoto or Aperture. All meta data is retained when uploaded, including keywords that added using Aperture or iPhoto. You are able to create new galleries from the plug-in's interface, browse thumbnails of existing Ansel galleries (to see what images you have previously uploaded), and choose if the images should be resized (and to what size) before uploading.  Both plug-ins support configuring multiple Ansel servers if you happen to have access to different installations.

Even though these live in horde-hatchery, they will work with both Ansel 1.x as well as the bleeding edge Ansel code that lives in  the hatchery. The iPhoto exporter supports iPhoto '08 and later, and the Aperture exporter is written for Aperture 2.1 or later.  Both require OS X 10.5 or later. They should run on either PPC or Intel hardware, but have only been tested on Intel. Currently they are available only as source (which can easily be compiled using XCode) but a development build should be available shortly.

 

 

Kronolith (H4 only)

I've been tasked with adding support for resource scheduling to Kronolith, and the work is mostly complete. Resources may be invited to events by the event organizer using the existing attendees interface. Resources can be set up to automatically determine if they are available, and respond to the request automatically. There is also support for resource groups. Resource Groups are just a grouping of resources that are similar. When a group is invited to a meeting, the first available resource from that group will accept the invitation. For example, you have 10 projectors available and it doesn't really matter which projector is used for a meeting. Instead of going through all the projectors to see which one is available, you can just invite the projector group to the event. The first projector that is available during the meeting time will accept the invitation.

 

October 11, 2008

More Horde Fun

After a very productive Horde Board meeting last week (see Chuck's article) and the decision to really focus on getting out the next 3.3 series releases, I thought it a good time to summarize some recent work.

My primary focus lately has been on Ansel, the soon-to-be-released photo management application.  I have been busy adding some new features and cleaning up the code preparing it for release.

The latest new feature is the addition of what I call Gallery View Modes.  There are currently two modes, "Normal" mode - which is how Ansel has been displaying galleries - and the new addition, Date Mode. Date Mode lets you set a gallery to be browseable by date.  So, instead of a single gallery containing those hundred plus photos you took on your week-long vacation, you can use Date Mode and your images will automatically be sorted by date within that gallery.  Some screenshots (click for a larger image):

The dates come from either the EXIF data embedded in the image or, if that is not present, from the date the image was uploaded to Ansel. While not implemented yet, these date values will be editable in the final Ansel release.

Gallery Modes can be switched at any time.  If a gallery contains any sub-galleries in Normal Mode, they will be flattened into the parent gallery when viewing by Date. This is non-destructive so you can switch back and forth without worrying about losing your gallery structure.

A new command line script was also recently added, remote_import.php. This script allows you to upload entire local directories of images to a remote Ansel server.  You can have it create a new gallery based on the name of the folder or specify an existing gallery on the command line....and for those of you that are Macintosh users, there is a simple Applescript wrapper included that allows you to just drag and drop a folder onto the Applescript application to upload the entire folder to your Ansel server.  Plans for an iPhoto plugin are also in the works, but no promises on a time line :)

Some other additions include the ability to automatically add an EXIF field to an image's tags when uploading it,  and something I've written about before, the ability to embed images/galleries in external websites such as a personal blog. In fact, the screenshots shown here are embedded from my Ansel server - and they demonstrate another new feature, the ability to view a larger size image in a "lightbox" while remaining on the external web site.  This is really useful if you want to link to larger images from small thumbnails, but don't want your users to leave your blog page.

I've also added similar functionality to Kronolith as part of the sponsored AJAX calendar project.  It's now possible to embed views of your calendar on external websites.  The available views, for the most part, are the same views you can display on Horde's portal page. 

For more examples of these embeddable widgets, visit my blogspot sandbox at http://mrubinsk.blogspot.com.

July 4, 2008

Embedding Ansel galleries with javascript

<p>Ansel now has support for displaying a gallery as a &quot;widget&quot; within things like blog posts or portals.&nbsp; All that is needed is the ability to include javascript in your editor.&nbsp; For example, the following images were embedded in this post with code like the following included directly in the post:</p> 
  <code>&lt;script type="text/javascript" src="path/to/ansel/xrequest.php.php?
requestType=Embed/gallery_id={gallery id}/container=anseldiv1"&gt;
&lt;/script&gt;
&lt;div id="anseldiv1"&gt;&lt;/div&gt;</code>
<script src="http://portal.theupstairsroom.com/horde/ansel/xrequest.php?requestType=Embed/gallery_id=3318/container=ansel1" type="text/javascript"></script><div id="ansel1"></div>
  <p>There are also a number of options available for passing to the widget. For example, you can add a <em>start</em> and <em>count</em> parameter to determine how many images to include, and which one to start counting at.&nbsp; You can also select to use the mini thumbnails (the default), the larger thumbnails or even the 'pretty' thumbnails that Ansel can display by setting the <em>thumbsize</em> parameter to <em>thumb </em>or<em> prettythumb</em>.</p>
<script type="text/javascript" src="http://portal.theupstairsroom.com/horde/ansel/xrequest.php?requestType=Embed/gallery_id=13/container=anseldiv2/thumbsize=prettythumb/start=14/count=12/perpage=3"></script><div id="anseldiv2"></div><style type="text/css"> #anseldiv2 .anselGalleryWidget img {border:none;}</style>
  <p>For an example of what this would look like on a Blogger site, take a look at my <a href="http://mrubinsk.blogspot.com/" target="_blank">Blogger sandbox</a>.&nbsp; </p>
  <p>Like all new features, there is still some work to be done, and a number of different 'views' will be available such as a small slideshow and an image carousel. </p>
  <p>Stay tuned!<br /></p>

May 8, 2008

Using the Horde API to Power External Sites or Applications - Part 3

In the last two installments, we looked at the basics required to interact with a Horde server and obtain content for display on external, or "non-Horde" websites.  In this article, we'll take it a step further and give a concrete example of using Horde content to power a website - we are going to use Ansel, the Horde Project's photo management application, to power a personal, or family website.

Ansel is a powerful photo management application that provides many features.  Even so, sometimes you just want to have a dedicated website to showcase your images...or maybe you want to integrate a gallery onto an existing website. Both are very easy using Ansel's api.

For this example, let's assume we are trying to integrate a family photo album into an existing family website.  To do this, we are going to add a 'Gallery' section to the site, and for simplicity, we are going to use a "Lightbox" style gallery, so that when you click on an image thumbnail to view it, an overlay appears displaying the image on the same page. Gallery styles are a key part of Ansel, and allow you to change the look and feel of the Gallery View. You can learn more about styles and how to hack your own by looking at the styles.php file in the config/ directory.

So, let's get started.  Let's assume that you have a number of galleries in Ansel and you only want to show a certain sub-set of those galleries on the new site. For example, let's say that you want all the galleries that have a category of "Family" to appear on this site. (It's also possible to do this with just a list of gallery ids you want included).

First things first, let's define some configuration stuff. (These should probably be in some sort of conf.php file and included on each of your "gallery" pages).

// These define the root of the site
$base_url
= 'http://example.com';
$fs_base = '/srv/www/example.com';

// The path to the Horde server.
$horde = 'http://another.example.com/horde';

// Let's assume we want all the galleries in the
// "Family" category

$filter = 'Family';

// ...but only those owned by this user.
$owner = 'myusername';

// The named Ansel style to use.


$gallery_style
= 'ansel_lightbox_simple';

Now, before we do anything useful, we will need a Registry instance:

define('HORDE_BASE', '/horde');
require_once
HORDE_BASE . '/lib/core.php';
$registry = &Registry::singleton();

Now for the fun:

$content = $registry->call( 'images/renderView',
    array(array(
'owner' => $owner,
'category' => $filter,
'style' => $gallery_style,
'gallery_view_url' => $base_url . '/gallery.php?gallery=%g'),
null,
'List'));

Some explanation: This calls Ansel's images/renderView api method. This method takes 3 arguments. The first is an array of parameters that get passed to the Ansel_View object that will be doing the rendering, the second is the application scope (we are using the default scope - if you don't understand this, it's not important to the task at hand), and the third is the general type of view we want to render (currently supported are Gallery, Image and List).

The various view parameters that a view takes can be browsed by viewing the developer documentation for each view, but a quick explanation for the parameters we are using for the List view are as follows:

  • owner - We are limiting to galleries owned by this username.
  • category - Only galleries that have this category are returned.
  • style - Force the use of this gallery style.
  • gallery_view_url - This is perhaps the most important one, as this sets the url that the gallery thumbnail will point to.  You set this to the page on your site that will render a single gallery - %g is replaced by the choosen gallery's id.

So, what we have now, in $content is the HTML needed to render a List of galleries, that will correctly point to a page on your own website to view an individual gallery. Now, let's look at what it takes to actually render that gallery - in gallery.php (the target page we set above):

/* Grab the form info */
require_once $fs_base . '/lib/Utils.php';
$gallery_id = Util::getFormData('gallery', 0);
$content = $registry->call( 'images/renderView',
array(array(
'gallery_id' => $gallery_id,
'gallery_view_url' => $base_url . '/photos/gallery.php?gallery=%g',
'style' => $gallery_style,
'hide_comments' => true,
'page' => Util::getFormData('page', 0)),
null,
'Gallery'));

Again, we are calling the images/renderView api method. This time we are requesting a Gallery view to be rendered.  The view parameters in the first argument are similar to the first time we called this method - the new parameters are:

  • gallery_id - Yes, this is the gallery id we want to view.
  • page - The pager on the gallery view adds a 'page' url parameter to indicate the current gallery page requested.  The Gallery View needs the current page to be passed to it if it's not the first page.
  • hide_comments - allows the hiding of the comment counts for each image (if comments are enabled in Ansel). Setting this to false or omitting it will cause the number of comments to show in each image "tile". If you do show the image comments, the text is linked to a Image View that displays the image along with the comments.  By default, this links to the Image View in Ansel, but can be overridden with the 'image_view_url' parameter. This works similar to the 'gallery_view_url' - %g and %i are replaced by the gallery id and image id accordingly.

We now have a very basic way to render a complete Ansel gallery on an external website using just a handful of api calls.  This article demonstrates the basic idea, but obviously leaves out a bit of eye candy.

Resources:

Some sites that use Ansel via the api as described here:

March 5, 2008

Update on Ansel development

For those that don't know, Ansel is the Horde Project's image management application, it provides user galleries and some image editing capabilities.  I've been using Ansel for quite some time now to host images for friends and family. After coming across an article on Mikko Koppanen's blog, regarding image manipulation with ImageMagick, I decided it was time to give Ansel a facelift.

There have been quite a number of recent improvements and changes to Ansel's code.  The most obvious (and coolest, IMO) is the addition of

Polaroid style thumbnails
different thumbnail styles.  I took some ideas from Mikko's articles and added the functionality to the Horde_Image library.  Currently available styles include Polaroid style thumbnails and image stacks, and thumbnails with drop shadows - both with and without nice rounded corners.  Different gallery styles  allow the user to choose, on a per-gallery level, certain display elements of the gallery...one of those being the thumbnail style.  The style support is fairly modular and the idea is that admins will be able to define their own styles. Work is steadily moving in that direction.

Like I said, image manipulation is actually done in the Horde_Image library, so going forward, any types of effects, thumbnails etc... that Horde_Image can generate will be available for possible use in Ansel.  I'm planning an
Rounded gallery thumbnail
upcoming article on how to use Horde_Image to generate some of the effects that are used in Ansel.

Other recent additions to Ansel include the addition of photo tagging, various types of RSS feeds and some useful widgets that will eventually be configured as part of the the gallery styles.  Another nice addition builds on a new Horde level configuration option to choose to have Horde applications build "pretty" URLs where they are supported. So galleries can be reached with URLs like: path/to/ansel/user/mike, /path/to/ansel/gallery/gallery_name or even path/to/ansel/user/mike/rss for a feed of all of user mike's recent images.  For an idea of some of the other things that are on the way or in the works, you can check out the Ansel page on the Horde website.

Behind the scenes, so to speak, there have also been many performance related enhacements to Ansel contributed by duck, a frequent and very prolific contributor to many of Horde's applications.

The final change I'd like to mention involves using Ansel from other web sites or applications.  Like all other Horde applications, Ansel provides an external api that developers can use to interact with it. You can use the api to get or store content for other, non-Horde applications.  There is even the ability to render a complete gallery on your own site with a single api call.  Another article, in the works, will demonstrate different ways to access Horde content for use in your own webpages. In fact, this website, as well as my family site at rubinskyfamily.com  is completely powered by Horde via various api calls.

October 5, 2007

Ansel gets RSS support

Ansel, which is the Horde Project's photo application now has support for RSS feeds. 

Ansel photo gallery as seen on My Yahoo page

Ansel feed seen on My Yahoo page

Both RSS 0.91 and RSS 2.0 are supported, and the later includes support for the media namespace extensions. What this means is that people can now subscribe to your public images, and if using a feed reader/aggregator like Yahoo, view thumbnails of your images from the feed itself...just like Flickr's RSS feeds. 

There are a number of 'photo streams' available via RSS.  You can subscribe to streams from a particular user, a specific gallery, a stream for all publicly available images, or even a stream for all images tagged with a specific tag.  Also planned are streams for particular categories. To subscribe to a feed, use a URL such as the following in your feed reader:

Entire Ansel site
http://path/to/horde/ansel/rss.php
Specific user
http://path/to/horde/ansel/rss.php?stream_type=user&id=username
Specific gallery
http://path/to/horde/ansel/rss.php?stream_type=gallery&id=gallery_id
Specific Tag
http://path/to/horde/ansel/rss.php?stream_type=tag&id=tagexample
­If you would prefer a RSS 0.91 feed (without media extensions) add type=rss to the parameters.

Ansel is not yet released in a stable version, but is quickly nearing a 1.0-alpha release.  It is currently available via CVS snapshots or directly from the CVS tree.

­

May 9, 2007

Some new work on Ansel

This website is powered by the Horde Application Framework as well as some of the project's applications, such as Ansel for the images, Agora for comments and Jonah for the news content.  I've had to add a number of features to these applications in order to do what I wanted to do with this site.  Most of the work was done on the apis of the applications so I can get the data I need out of them for display on this site.

Currently, I've been busy adding some new features to the Ansel application itself.

Chuck, from the Horde Project, had recently rewritten the slide show code and combined the slide show and image views.  This fixed a few bugs and simplified the code.  I helped by finishing up the implementation by making sure that the links for the image properties and actions were updated with each new image that was displayed.  The comments were a different story, as they needed to be fetched from Agora's api with each image change.  This was the first bit of 'AJAX' type functionality that I have attempted within Horde, and it appears to have worked out well.

Some new capabilities have also been added that allow retrieving recently added as well as most commented images.  The latter change prompted some improvements to the Agora api to allow retrieving information on multiple forums with a single api call.  These new features are demonstrated with the two new Horde_Blocks that are availble for Ansel.  Hovering over the image titles in these blocks, will also show a thumbnail preview of each image in a small pop-up element.

Finally, I'm currently working on adding a "tag" feature to a number of the Horde applications.  Since I've been working with Ansel most recently, I started with that.  It's mostly finished now, and is a slightly different way of tagging than most other image applications offer.  It's been implemented as a way to truly browse your images. It offers a 'tag hierarchy'.  The best way of describing it is as if each tag is a folder that is dynamically built with each further selection. You choose your first tag, "Birthday" and see 100 images tagged with it.  Then, you see a list of 'related tags' that will further refine your search...you select "Mike" and see the 25 images out of the previous 100 that are tagged with BOTH "Birthday" and "Mike". You can navigate down as far as the number of tags will let you go.  You can also remove any single tag from your "tag trail" at any time and modify your criteria.

Next up, will probably be adding similar tagging features to the Jonah application..then maybe Trean, the Bookmark manager.�