Event and User Synchronization

Agenda & Content SynchronisationClient: MNHN

The National Museum of Natural History (Musée national d’histoire naturelle – MNHN) features permanent and temporary exhibitions and offers educative and interesting activities for young people and school classes.

Listing of events and filter possibilities

Several WordPress-based websites cater to the respective target groups of the museum, the general public, youth and children, school classes and youth groups.

For those websites, TenTwentyFour has developed – and gradually improved – a plug-in to synchronize the museum’s internal database of educative activities and workshops with their websites. Events and themed visits are retrieved from a Microsoft SQLServer and imported into WordPress as Custom Posts, using custom taxonomies and custom fields (meta-data) for storing and organising the events.

As opposed to earlier versions of the plug-in, the current version relies entirely on native WordPress functionality, bringing no custom database tables or other custom tweaks.

Since the museum’s websites and database contents are both multilingual, imports are done in all available languages using the Sitepress WPML plug-in, despite some of the difficulties we encountered while using as of yet undocumented and unsupported WPML functionality.

The import process uses a range of checks to make sure the already existing items are complete and not missing any details such as location or featured image. Should such be the case, or should any change have been made to the original items in the SQL database, the respective entity is updated in WordPress.

Among the features of the plug-in are a calendar widget displaying upcoming events per day and a search/filter interface for both events and visits, allowing site-operators to restrict the displayed events to a thematic category and visits to even further narrow down their search.

Cross-platform user accounts and login management Client: MNHN

Not only does the MNHN manage a huge amount of events per year, it also has an impressive user base. Their users consist of parents and youngsters who have signed up to events over the years, of educational personnel who has booked one of their visits or mobile trucks, and of their guides and workshop tutors.

Sign-in or sign-up no the science-club.lu website

In order to allow all of those users to authenticate on any of the MNHN’s websites, manage their children or themselves as participants, manage subscriptions to magazines, and on-line newsletters, sign-up for events, consult the state of their registrations or the history of events they – or the people they manage – participated in.

Using a central database, all users are dynamically synchronized between the individual websites, allowing users to log-in anywhere using the same account and access the same information. Existing users are securely migrated to the new format, relying on email confirmation to make sure the users are whom they claim to be. As for the Agenda-Plug-in described above, all contents are localized (l10n) in the languages used by the MNHN’s web-sites.

Technologies used in building this application

WordPress

WordPress is a free and open-source content management system (CMS) based on PHP and MySQL. Based around hooks and filters, the core WordPress application can be extended to do almost anything. (+)

PHP

PHP is a popular general-purpose scripting language that is especially suited to web development. Fast, flexible and pragmatic, PHP powers everything from your blog to the most popular websites in the world. (+)

Twig

A flexible, fast, and secure template engine for PHP by the creators of the Symfony framework used – for instance – by the Silex micro-framework. (+)

Pimple

Pimple is a simple PHP Dependency Injection Container used – for instance – at the core of the Silex micro-framework. We use Pimple to decouple the interfaces that we use from our concrete implementations and thus improve maintainability and testability of our code. (+)

wkhtmltopdf

wkhtmltopdf and wkhtmltoimage are open source (LGPL) command line tools to render HTML into PDF and various image formats using the QT Webkit rendering engine. These run entirely "headless" and do not require a display or display service. (+)

jQuery

jQuery is a fast, small, and feature-rich JavaScript library. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers. (+)