This datatype was a lot of fun to build.
The objective was to allow people to upload Camtasia .zip files (videos) into eZ publish.
The strategy was to extend the eZBinaryFileType. When the attribute content is requested, the code checks to see if the .zip file data has been extracted and prepared for use. If it hasn’t, the .zip file is extracted and the HTML is filtered to retain only the tags necessary to deliver the video. The filtering includes updates to the paths in the HTML.
The display template assembles the URL of the HTML file and then uses an include call to bring it into the display.
One of the most interesting things I learned was how to use the PHP ZipArchive class (http://us.php.net/manual/en/class.ziparchive.php).