The object relations datatype is one of the most powerful datatypes in eZ Publish. In some cases, it is useful to associate data not to either of the objects involved in the relation, but to the relation itself. For example, you might want to mark a person as an author on one book, a contributor on another book, and an editor on another book, all while maintaining only one record for that author. Mugo has created an extension to add cross-reference data to object relations.
Recently, eZ Systems announced that the next major version of eZ Publish will use the Symfony framework. Having heard good things about Symfony as a modern, robust web framework, I am pretty excited at the announcement, and have already dived in to the new eZ Publish 5 code.
Image aliases are used in eZ Publish to define image sizes and other image variations. As an example, this allows for the editor to upload an image once and have it automatically formatted for a thumbnail display, a full size display, and more. By default, image alias files are automatically created whenever they are displayed in a template. However, you might have other use cases whereby you need to generate image alias files outside of the default scenario (for example, for an external site or feed).
One of our clients recently needed to apply a custom frame / border to all images in a certain section of an eZ Publish site. One way to do this is to edit each image in Photoshop or GIMP, but this can be a time-intensive, manual process. Another is to use CSS, but this again takes time and is also more limited. A flexible and automated way to do this is to configure ImageMagick filters in an eZ Publish image alias. The required style would then be applied to all relevant images.
One of our favourite projects, The 49th Shelf, aggregates a lot of data from a diversity of sources. Naturally, there is a range of quality; but even more than that: different sources often refer to the same physical object in different ways. Specifically, a person who writes several books can be referred to in a variety of ways:
There are some heuristics to resolve most of these cases, but there are always seem to be some that defy the code and require a manual fix.
This process has to be performed on the production site, so we want to minimize the amount of time that the data is inconsistent and we don't want to run untested code.
Mugo has a tool that we use internally to help with the main aspects of a developer's life: development, debugging and maintenance. The tool is called "eep", short for "Ease eZ Publish". It's a command line tool which provides many functions and allows for accomplishing tasks quickly by integrating with tools like awk, grep and xargs for powerful one-liners and supports rapid development of powerful bash scripts by leveraging eep as a library of eZ Publish specific operations.
By default, 2 instances of eZ Find can not run at the same IP address because eZ Find and Solr communicate with each other via an IP port. This becomes an issue if you happen to run a staging instance on the same server as a production instance, or on your local dev machine where there are many sites running.
A nice solution makes use of the symlinking trick for managing platform-specific versions of settings files I recently documented.
In almost every project we have a small number of settings files that have important differences on the production host versus development or staging hosts. This problem is made serious when the settings are in your version control system.
The resolution is trivial: Create a version of each file for each context that needs to be customized, eg site.ini.append.php_PRODUCTION, put this in SVN, and create a symlink with the name that eZ Publish is looking for.
eZ Publish comes with a useful set of image settings, and has a powerful framework within which you can define custom filters to be executed by the image handler. In this article, we'll show you how to make use of a custom ImageMagick filter to achieve exact image sizes.
When you are setting up a mobile website separate from the main website, one of the elements that tends to be an after-thought is main-to-mobile site redirection. This article goes through some of the considerations regarding creating a mobile setting, and main-to-mobile site redirection specifically. It explains how to use Apache Mobile Filter as one option to facilitate mobile device detection and redirection.
Mugo has an internal wiki to share and store various information for all team members. Previously we used mostly text files saved in Dropbox, which actually worked quite well. However, we are now using a more powerful solution that combines eZ Publish, a custom static cache handler, and Dropbox.
eZ Publish comes standard with the Star Rating extension, which adds the ability for users to rate content on your website. It works well out of the box. By default, the interface to rate an article is combined with the aggregate rating on an article. Here's a quick example on how to tweak that functionality so that "your rating" is separate from the aggregate rating.