News

GSoC Project Introduction: CC WordPress Plugin

erlehmann, May 24th, 2010

Who I am

I’m Nils Dagsson Moskopp, a 22 year old student of philosophy and computer science, living in Berlin (German speakers may check out my blog). I dislike the act of programming, but love the results, so I seem to have no other choice than to do it from time to time.

Recently, after submitting a proposal, I got accepted into the Google Summer of Code program, being mentored by Nathan Kinkade. In the rest of this entry, I will do my best to explain how it came to that and what kind of software I intend to create.

The Idea

As far as I know, there currently is no automated, easy way to have human- and machine-readable markup for specific subsections of a blog post in the blogging software WordPress; it is only possible to have an entire page licensed under one specific license. Further complicating the issue is the fact that the WordPress media manager actually does not know about licenses accociated with specific content. This poses a problem for the not-so-uncommon use case of embedding CC-licensed media, mainly photos.

I was first confronted with the idea of having an automated way to markup media with Creative Commons licensing information when reading Matthias Mehldau‘s post More precise Creative Commons HTML-Codes. He envisioned an annotation containing not only the well-known CC license symbols, but also the jurisdiction and a button to show the markup used, for easy re-embedding. Well versed in graphics design, he also created a mockup:


Matthias Mehldau’s Mockup

Shortly after that, Julia Seeliger posted a suggestion how a Creative Commons plugin backend for WordPress could look like. She suggested integrating the official license chooser or a drop down list within the WordPress upload form.

We three chatted about these ideas, me even actually implementing some parts (see next section), but nothing qualifying as currently usable came from that. When approximately one year later, I did come upon the CC wiki site describing the developer challenge titled Support for CC licenses in WordPress Media Manager, I chose to apply for that with Google Summer of Code.

Existing Solutions

As mentioned in the introduction to the last section, a tool that provides easy licensing management for WordPress media content, automating subsequent insertion, currently does not exist. Several existing projects, however, have features related to this goal; code re-use may be possible.

In 2006, George Notaras created the Creative-Commons-Configurator WordPress Plugin. It allows the user to choose a global license for his or her blog, using the web-based license selection engine from CreativeCommons.org and adds localized machine- and human-readable license information to pages and feeds. Similar plugins, putting global licensing information into footer and sidebars, exist.

For GSoC 2009, Dinishika Nuwangi made a WordPress plugin called wprdfa (not to confuse with wp-rdfa). Unfortunately, the project has an empty README file. Judging from a quick glance at the source code, part of its intended purpose is to add buttons to the TinyMCE editor integrated into WordPress, although on installation I was unable to see this functionality. The related developer challenge still seems to be open, on the page the plugin is described as foundational work.

Also in 2009, I created two pieces of software, inspired by a post on the WHATWG mailing list. First, a web application generating HTML5 license markup (enriched with Microdata, see next section), second a WordPress plugin capable of generating similar markup using both Microdata and RDFa. And there was much rejoicing.
It is important to note that since then the HTML5 standard has changed and the generated markup is no longer valid.

On a less technical note, the German blog Spreeblick has a unique way of presenting the license information, only showing a small “cc” in the bottom left corner; on hovering, author name and a link to the source are presented (live example). However, while Spreeblick is using WordPress, the folks behind it have no intention of releasing their plugin: As Max Winde told me in April 2009, it is tightly entangled with their image layout functionality and would require complex cleanup.

Planned Interface

I plan to implement the presentation part using the new HTML5 elements figure and figcaption. Together, they can be used to denote content with a caption […] that is self-contained and is typically referenced as a single unit from the main flow of the document. A code example shows how markup using the figure element may looks like:

<figure>
<!-- content goes here -->
<figcaption>caption</figcaption>
</figure>

Naturally, as a rather general markup language HTML5 does not contain any elements to give this construct more specific meaning, such as marking up which license applies to said content. However, two markup extensions provide this capability at the attribute level, the complex and established RDFa and the simpler, newer Microdata proposal, part of HTML5. While both standards are sufficiently open, RDFa is endorsed by Creative Commons; for this reason I will not stray into Microdata territory unless I have time to spare at the end of GSoC.

To this point, I have been only accounting for machine readability. Nevertheless, with CSS it is easily possible to beautify the visual presentation in nearly any way imaginable. The following two screenshots, taken with the now-defunct WordPress plugin I created in 2009, exemplify this — both are based on the same markup.


simple style


Spreeblick style

On the author side, I plan to have the plugin look like the Spreeblick one (screenshot), which will mean adding options to the WordPress media uploader:

  • an additional drop down list, for choosing one of the six main CC licenses
  • an additional text input for the author or rights holder
  • an additional text input for specifying the source URI

Media could then be inserted the usual way, with the RDFa annotation automatically generated.

Now, that the GSoC coding phase has started, I plan to do a weekly progress report; the impatient may want to track the contents of the official Git repository. Stay tuned.

10 Responses to “GSoC Project Introduction: CC WordPress Plugin”

  1. [...] week I was busy and lazy in turns, so I worked on the plugin only on two days. These are the tasks that I [...]

  2. [...] last week’s work on the plugin, I had two targets, both related to the goal of making the interface functional: First, saving [...]

  3. [...] week, development on the plugin proceeded at a faster pace. Shortly after I posted the last report, Nathan Kinkade pointed out the [...]

  4. [...] delayed report, late by a day. This time, however, I can deliver; the current version of the plugin sports the filter system I unsuccessfully tried to implement the week before: While previous [...]

  5. [...] the plugin, I have fixed a number of small bugs and also added several new features, listed [...]

  6. [...] is a short one. This week, I did only a few things related to the plugin: First, planned features and bugs are now listed in the issue tracker. Second, you can now specify [...]

  7. [...] is running out for work on the plugin. With the 9th of this month being the suggested date to start working on documentation and cleanup [...]

  8. [...] week most of the work on the plugin consisted of styling changes and fixing bugs, mainly regressions that sneaked in due to the rewrite [...]

  9. [...] is my last report for the plugin. After 150 commits and a bit over 30KB of written PHP code, the Google Summer of Code proposal [...]

  10. [...] some of you may have noticed, this report about the WordPress CC plugin is several days late. This is because I was unable to produce new substantial features and have hit [...]

Leave a Reply