[open-humanities] Fwd: Scripto plugin for WordPress
jonathan.gray at okfn.org
Tue Nov 22 14:58:35 GMT 2011
This is really exciting! A Wordpress plugin for Scripto...
---------- Forwarded message ----------
From: Jim Safley <jimsafley at gmail.com>
Date: Tue, Nov 22, 2011 at 1:16 AM
Subject: Scripto plugin for WordPress
To: Scripto Dev <scripto-dev at googlegroups.com>
I'm currently working on the Scripto plugin for WordPress  and need
some advice from those of you who are familiar with WordPress plugin
development. Specifically, I'm trying to determine the best way to
render the Scripto application on the public website. (The Scripto
application is the summation of interfaces powered by Scripto, e.g.
the media viewer, transcription interface, page history, recent
Perhaps some of you are unfamiliar with the vocabulary inherent in
Scripto, so I'll quickly define terms: a _document page_ is any
resource that can be transcribed; a _document_ is a logical
aggregation of document pages. For the purposes of this plugin, I'm
mapping document pages to WordPress attachments belonging to a parent
post, and documents to WordPress posts. If you have a better mapping
scheme in mind, I'll be glad to listen.
Back to the question at hand. So far the following two approaches seem
the most reasonable:
1. One page. Provide a shortcode that renders the application on one
page. Use the_content action hook  to append a list of child
attachments to the post, linked to the page containing the shortcode.
2. Post pages. Use the_content action hook to append a list of child
attachments to the post, linked to the same post. Use the same hook to
overwrite the post content with the Scripto application when
instructed to do so.
Both approaches derive essential information from GET and POST. The
former channels all requests to one page containing a shortcode, while
the latter accepts all requests in context to the original post. There
are disadvantages to both approaches. With the former, I can't figure
out how to link the attachments from the post to the page containing
the shortcode, and it may require some intervention from an editor to
add the shortcode. With the latter there's no telling what other
plugins filter through the_content, and I can't reconcile overwriting
content that other plugins add.
I really want to get this right the first time, so I ask for your
opinion. Which approach would you take? Is there a third option that's
escaping me? Thanks for your help.
The Open Knowledge Foundation
More information about the open-humanities