Turns out that figuring out how to embed a Processing Java applet in WordPress was quite the endeavor. Ended up writing a Wordpress plugin. Here is a link to the tarball: wp-proc-embed.tar.gz
A few brief instructions for installation and use:
- Extract into the wp-content/plugins directory (Same as every other plugin for WordPress). If you can’t figure out how to extract a .tar.gz file, and I’m in a good mood, let me know and I’ll create a zip for you.
- Login to wordpress as admin and activate the plugin.
- Export your Processing project.
- Copy/scp/ftp the entire directory tree of the sketch (which should now include an applet directory) to wp-content/plugins/wp-proc-embed/
- As an example of what the directory structure should look like in step 4 I have included the applet “threeballsclass”. The exported java files appear in wp-content/plugins/wp-proc-embed/threeballsclass/applet/
- Make a new post and include the following tag to display the threeballsclass applet with a dimension of 200 x 200: LEFT BRACKET processing=threeballsclass 200 200 RIGHT BRACKET
- Publish and Pray.
- I just realized that I called the example project “threeballsclass” and there are actually four balls flying around. Deal with it.
Here’s the applet in action:
(If anyone knows the escape character for the left and right brackets, so I don’t have to use LEFT BRACKET and RIGHT BRACKET above, let me know. I’m having to do this because otherwise it displays the applet)
#1 by luisa on October 15, 2009 - 1:02 pm
Quote
thanks, you made my day! I had managed to get this to work in Wordpress 2.6 but it broke when I upgraded and I was about to give up for today…
#2 by Philipp on November 6, 2009 - 1:51 pm
Quote
hey kyle,
thanks for this nice plugin!
i used to have some problems with this plugin and libraries.
i just added a few lines to your code to make it work.
i couldn’t find your mail address. so just write me a mail and i can sent my file to you.
#3 by hafiz on July 27, 2010 - 10:17 am
Quote
I can’t get it to work on wp 3.0. Hope you can assist me with this. Drop me an email when you’re free
Cheers,
Hafiz
#4 by angie on August 7, 2010 - 3:53 am
Quote
Hi Kyle,
Think you could send or post the zip file?
Thanks!
Angie