Compatible with WordPress 2.2
May 20th, 2007Subject pretty much says it all ![]()
Apparently the change in 2.2 is not radical enough to make this plugin malfunction.
Subject pretty much says it all ![]()
Apparently the change in 2.2 is not radical enough to make this plugin malfunction.
When compared with 0.1.2 release, this one only contains 2 lines of change, but still worths it, since these 2 lines add a bit of security using nonce — which is basically a random number designed to forbid direct submission of form without entering admin page. As usual, zip file and gzip’ed tarball are available.
In the older days I thought popup window was a good idea, but then… it’s not. IE trimmed html form GET values to 2000 characters, so submitting the whole music source in GET method will be disastrous. Thus today I replaced javascript popup window with another thing instead: <form target="…">, which submits via POST method instead and opens it in new browser window or new tab. Creating cross-browser webpage is really a headache…
But then, another obstacle comes. To make the show source window more convenient, a button is added to copy content to clipboard (idea taken from LatexRender). That’s trivial to do in IE, but a completely different story in Mozilla/Firefox.
Even though relevant script exists for Mozilla based browsers, it requires that javascript signing thing, which is so 1998′ish — I barely remembered fooling around javascript signing at that time and wondered what it was. Surprised to see such thing still existed today. Anyway, it is impractical to show dialog asking people to accept the authority of javascript, or even telling user to modify their own browser setting.
Though somebody came up with ingenious way to bypass security setting (using flash to access clipboard), I’m not sure if I really want such thing bundled with the plugin.
BTW, people are free to check if the show source function works in my previous post, by clicking on the image.
Received email from Chris Lamb a couple of days ago. In short, I got his nod to continue the life of FigureRender in current form.
I have branched ScoreRender for 0.1.x maintenance releases, and started 0.2 release hacking. Right now not much has been done — mainly dropping support for configurable tag markup (I suspect people don’t change it, if anybody is using this plugin at all
), and allows setting the upper limit of length per fragment.
Here are some of the things I want to achieve in 0.2 release:
One thing not quite sure is whether I should implement the feature of covering up error with blank or blanket images. This helps on security side (leaking less info), but blog authors will find it harder to trace error. Still not decided how this can be achieved while satisfying both flexibility and security.
ScoreRender 0.1.2 is out there. This maintenance release contains only very minor changes:
Add +repage option to ImageMagick convert, in order to make sure no white edge exists in images after trimming. Otherwise, some images will retain layer info and render at an offset from origin (0,0).
Version 0.1.1 has just been released which plugged 2 problems I discover just after 0.1 release:
However, I don’t have any good resolution to solve second problem. This means people will need to turn off that option, otherwise Lilypond and Mup contents will be clobbered, causing render error. What is done is to print a warning banner in admin page, telling people they should be aware of this issue. Some people may not install and use Lilypond and Mup, so this option wouldn’t bite them.
OK, this rule is always true: one can only discover bugs after letting the cat out of the bag. I immediately discover 2 problems after 0.1 release (but never before that):
While the first one can be easily fixed, I can’t see how the second problem can be properly addressed except turning off the corresponding option. Despite removing most filtering hook in plugin, balanceTags() is STILL called within get_the_content() and can’t be dropped with any remove_filter() call.
So for now please turn off this option if you choose to enable the plugin. A new release will be done soon to address the above 2 problems.
Well, it is politically incorrect if some eyecandy is not provided, especially for a site dedicated to image rendering. So here it is, for lilypond notation. Can you guess to which piece this fragment belongs?
However, the notation behind these few bars is a completely different beast. There is valid reason when someone say that Lilypond is absolutely not for musicians and composers, but for programmers instead! Please click on the score fragment to see the code behind it.
I’m happy to announce the first release of ScoreRender (DOWNLOAD), a Wordpress plugin for rendering inline sheet music fragments into images. It supports the following music notations:
This plugin is evolved from Chris Lamb’s FigureRender, which renders inline Lilypond as well as LaTeX fragments. The sad thing is, I didn’t manage to get Chris’ blessing to take over the development, and is still waiting for his answer.
Instruction for installation is located inside README.txt after extracting the compressed archive. Basically, copy the whole directory to /wp-content/plugins, activate the plugin in admin page, check if the options satisfy your need, and enjoy! (well, learning the notations is another thing…)
Please don’t hesitate to give any suggestion for feature request, bug fix and so on. In particular, you can file bug report in wp-plugins.org (”Submit bug report” link on the right) if you have already registered an account in wordpress support forum. Otherwise just leave a message here and I’ll try my best to answer ASAP.