Upgrade Your Drupal Skills

We trained 1,000+ Drupal Developers over the last decade.

See Advanced Courses NAH, I know Enough
Oct 16 2013
Oct 16
In a recent paper I published (EXIF Custom: Automatic image metadata extraction for Scratchpads and Drupal) I described a Drupal module I have written that allows for the import of metadata embedded within images to Drupal fields. This, along with bulk image upload tools, allows for rapid publication of images.

The introduction to the paper is reproduced here:

"The use of embedded image metadata is becoming widespread in the biodiversity informatics community (e.g. Stafford et al. 2010 & Tulig et al. 2012), and is frequently used to describe the subject and licencing of images as well as for recording the 'tombstone metadata' (e.g. Introduction to Metadata) - when the image was created, last edited, who created it, and where and how it was created.

The eMonocot project (http://about.e-monocot.org) makes use of the Scratchpads (Smith et al. 2011) infrastructure as a tool for collecting, curating, and creating content to be harvested by the eMonocot portal (http://e-monocot.org). As part of this project hundreds of images with embedded metadata are being uploaded to a number of different Scratchpads, combined with images directly uploaded by partner communities, and exported en mass to the portal. For this to be technically feasible at scale images from varied, disparate sources need to have their metadata standardised as part of the bulk upload process. There are three widespread image metadata formats that can be handled by this module. A subset of the EXIF standard (Camera and Imaging Products Association Standardization Committee 2010) specifies a method for tagging of images with metadata. This is widely used by device manufacturers to record both the make and model of the image capture device and also the device's settings when the image was captured (e.g. focal length, flash duration). The eXtensible Metadata Platform (XMP) was originally developed by Adobe Systems Incorporated and later adopted by the International Standards Organisation as ISO 16684-1:2012. It uses a data model defined in Adobe 2012 which is serialised in XML when embedded into files. The International Press Telecommunications Council defines the IPTC Core and Extension metadata standards (IPTC 2010). An existing Drupal module, Exif (https://drupal.org/project/exif), provides a mechanism for displaying embedded image metadata on Drupal nodes, but does not provide a mechanism for mapping the metadata into fields. The import of embedded metadata into Scratchpads/Drupal fields is a requirement of the eMonocot project and is useful for the wider Scratchpads community as it allows for these data to be easily used by other Drupal modules (e.g. Views - https://drupal.org/project/views) and in other Scratchpads-specific functions such as our on-going work on implementing the ability to export data via DarwinCore Archives (GBIF DarwinCore Archives). There is a comparison of these two modules (and potentially other similar Drupal modules) at https://drupal.org/node/1842686." EXIF Custom on drupal.org

Read the full paper (Biodiversity Data Journal)
Apr 04 2013
Apr 04
Recently I have been looking at how we measure contributions to science in a way that is more well-rounded than the h-index and similar initiatives. Most of this relates to how we measure a user's contributions to projects such as Scratchpads, ViBRANT and eMonocot.

The "alternative metrics" movement has been around for a number of years now, and one of the more established outfits is Altmetric who provide badges for research articles showing how much attention that article has received on a number of purely social (Twitter, Facebook) and 'academic social' (Mendeley, Connotea) networks.

As the badges are pretty easy to implement I have made a small Drupal module that displays an Altmetric badge on Biblio node pages, and provides a configuration page to allow the badges to be customised. The module is available here: Drupal biblio altmetric.

Jan 16 2013
Jan 16
A new Drupal module: Biblio autocomplete.

Previsoulsy as part of eMonocot we started to use the IPNI webservice to autocomplete some fields in the Biblio content type. As one of the eMonocot objectives is to "Ensure that the tools developed are compliant with zoological nomenclature" I have extended this functionality to use the ZooBank API which is currently in a testing phase. In addition values for the autocomplete suggestions can be made from values previous entered in other Biblio nodes.

Instead of having either previsously entered values, IPNI or ZooBank attempt to autocomplete the field this module has been developed to allow any combination of these plugins to attempt the autocompletion. This will have uses in cases like the recent Lyme Regis Geo-BioBlitz where a single classification spand both animal and plant kingdoms (in this case the Dictioanry of UK Species).

The module is designed so that additional plugin modules can easily contribute results for other webservices.

This work was done as part of eMonocot as a contribution to the Scratchpads project.

Jun 24 2012
Jun 24
Previosuly I showed how to create a new Biblio type in Drupal 7 - this code covers the next step: adding additional Biblio fields to a Biblio type in code.

Jun 01 2012
Jun 01
How to create a new biblio type in code in Drupal 7:

This is just a modification of the function biblio_admin_types_add_form_submit($form, &$form_state) and run during install of the custom module (using hook_install() ).

May 30 2012
May 30
The biblio module for Drupal is almost certainly essential for anyone trying to use Drupal as a platform for doing science. It is a large module with lots of functionality but parts of it are pretty badly documented (that is: you can read through the code but just Googling might not throw up what you need).

 The first issue - how to create a biblio node programatically (that is: in code).

Some things to note:

1) You must set the type of the biblio you wish to make (Journal Article, Book chapter, etc) before the call to node_object_prepare().

2) To set the authors you must set $node->contributors as an array (like that above) and also call biblio_insert_contributors($node).

The above example sets only a fairly minimal  number of the biblio fields, but any of the biblio fields may be set using this method.

The field 'start page' in biblio entries is for some reason stored in the field biblio_section (that's not an error in the code above)l.

Mar 10 2011
Mar 10
Yesterday in a discussion with Jeremy Young we thought about the concept of having an augmented reality app that would point out a few major points of interest in Lyme Regis (we'll be down for the Fossil Festival again this year). The discussion came from playing with the Layar app, for which it is possible to provide custom data layers.

As there will be a few of us around at the festival this year (many of us living in an iPhone augmented world) I thought the idea was worth investigating a little bit more. The first challenge was to provide some kind of editing environment where we could collaboratively provide the relevant co-ordinates, altitude, text and image. Thanks to the Layar module for Drupal this was achieved pretty easily - adding items to the augmented reality layer becomes just as simple as filling out a form.

I created a handful of Points of Interest (including The Whole Hog - perhaps the world's best sandwich shop) and then submitted the necessary details to the Layar team (the layer is currently still awaiting approval).
The next issue was how we could add points (including photographs) while roaming around the town and seashore. The obvious answer was the ubiquitous iPhone (other smartphones are available), but mobile Safari doesn't allow uploads to websites.
The solution was Flickr (I use it to manage almost all my photographs). The Flickr app is easy to use and can upload photographs complete with titles, descriptions, location data and tags. Importing data from Flickr was achieved using a version of the FlickrSync module I had previously hacked to import geolocation data. The system can be set to only import photographs with specific tags - an easy way to only get the data I want. Individual users of the site will be able to associate their Flickr account and specify what tags they want to use to label items for inclusion in the layer.
I have also made an overview map that shows the points of geological interest around Lyme Regis that have been collected so far.
All in an evening (and a half)'s work.....

About Drupal Sun

Drupal Sun is an Evolving Web project. It allows you to:

  • Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
  • Facet based on tags, author, or feed
  • Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
  • View the entire article text inline, or in the context of the site where it was created

See the blog post at Evolving Web

Evolving Web