We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpIntegration › Processing applet in wordpress post
Pages: 1 2 
Processing applet in wordpress post? (Read 12094 times)
Processing applet in wordpress post?
Sep 10th, 2008, 12:02am
 
Has anyone successfully got processing applets in wordpress posts, just wondering how to do this ?
Re: Processing applet in wordpress post?
Reply #1 - Sep 10th, 2008, 1:58pm
 
I have no experience of Wordpress, but if it allows embedding object tags, just copy those generated by PDE when you export to applet (in the HTML file), and put them where you need them (of course, taking care of having the linked files at the right place).
Re: Processing applet in wordpress post?
Reply #2 - Sep 10th, 2008, 5:59pm
 
PhiLho  wrote on Sep 10th, 2008, 1:58pm:
I have no experience of Wordpress, but if it allows embedding object tags, just copy those generated by PDE when you export to applet (in the HTML file), and put them where you need them (of course, taking care of having the linked files at the right place).

I'll try this again, but I think I did something wrong as it ate them and then thought I was trying embed some flash.
Re: Processing applet in wordpress post?
Reply #3 - Oct 1st, 2008, 7:31pm
 
I am also having issues embedding in a post, wordpress (2.6.2) bugs out on several things it seems, especially the <!--[if !IE]> --> code. Nothing renders after the first > , and if I try take that first > out, and remove all linebreaks in the code, I eventually get the app to display, but it also displays the #This browser does not have a Java Plug-in." message underneath. (in firefox, not tested in any other browser. The app itself works great, but I would rather not have to resort to an iframe to display it (http://pappmaskin.no/opensource/processing/sketch_081001a/index.html)

Tried to google a solution but couldnt find anything.

Re: Processing applet in wordpress post?
Reply #4 - Oct 1st, 2008, 8:44pm
 
I think some people have suggested putting it on one line. I gave up and put my thing on a non-wordpress site Sad

Maybe a wordpress plugin or extension would be the best way, my wordpress-foo and amount of processing I do is too low for me to do it, if anybody does/has I would love to know though.
Re: Processing applet in wordpress post?
Reply #5 - Oct 1st, 2008, 8:52pm
 
I haven't tested this code on anything but firefox on a mac but it seems to work:

<EMBED type="application/x-java-applet" width="500" height="500" align="baseline" archive="http://pappmaskin.no/opensource/processing/sketch_081001a/sketch_081001a.jar" standby="Loading Processing software..." codebase="http://java.sun.com/update/1.5.0/jinstall-1_5_0_15-windows-i586.cab" code="sketch_081001a" mayscript="true" scriptable="true" image="http://pappmaskin.no/opensource/processing/sketch_081001a/loading.gif" boxmessage="Loading Processing software..." boxcolor="#FFFFFF">
<NOEMBED>
  No Java 2 SDK, Standard Edition v 1.4.1 support for APPLET!!
</NOEMBED>
</EMBED>

I suppose there could be things in there that is missing or simply wrong, but at least it works.

(If this forum should mangle the embed code, you can see it in action over at http://pappmaskin.no/2008/10/processing-sketch_081001a/ )

And please, if anyone with more skill/patience than me sees this post then feel free to provide a more solid way of doing this cross platform!

Re: Processing applet in wordpress post?
Reply #6 - Oct 2nd, 2008, 1:50pm
 
I don't know the reasons for the difference in IE/non-IE code in the generated applet code, but I know you should not use the embed tag, which is deprecated (or even never official/always proprietary) in favor of modern object tag. AFAIK, some browsers doesn't even manage this tag.

I started that sounding like a W3C zealot fundamentalist... Smiley I was about to write that if it works, go with it.

But I tested your page OK in Firefox 3 and Opera 9.5, but I don't see the applet in IE6 and IE7 (all in WinXP Pro). Sad

And BTW, you should avoid to resize with HTML attributes large images like your screenshot: even with a fast connection, this almost half-megabyte image is slow to load for a 196x196 image! Wink You should resize it on your Mac instead. And perhaps use Jpeg for this kind of image.

Oh, and your noembed message is a bit outdated! Wink
Re: Processing applet in wordpress post?
Reply #7 - Oct 2nd, 2008, 11:04pm
 
Jup, the embed tag is old stuff, feel free to post an object tag version that works in wordpress and on all platforms, and I will be happy to use it!

Re: Processing applet in wordpress post?
Reply #8 - Oct 3rd, 2008, 11:40am
 
Alas, I don't have a WordPress installation to play with.
But perhaps you can try and use <applet> tag instead It is a bit deprecated in latest versions, but at least it was part of HTML standard, so it has probably still a good support by most browsers.
At least, that's the way Processing.org is using to embed a small class in the home page to check the current version of Java (if any) of its visitors! Wink
Re: Processing applet in wordpress post?
Reply #9 - Oct 3rd, 2008, 9:30pm
 
Allrighty then, take two:

<APPLET name="sketch_081001a" WIDTH="500" HEIGHT="500" archive="http://pappmaskin.no/opensource/processing/sketch_081001a/sketch_081001a.jar" standby="Loading Processing software..." codebase="http://pappmaskin.no/opensource/processing/sketch_081001a/" code="sketch_081001a" mayscript="true" scriptable="true" image="http://pappmaskin.no/opensource/processing/sketch_081001a/loading.gif" boxmessage="Loading Processing software..." boxcolor="#FFFFFF"><IMG SRC="http://pappmaskin.no/opensource/processing/sketch_081001a/loading.gif" WIDTH="1" HEIGHT="1" /></APPLET>

I've testet this in firefox and safari on my macbook and with ie7 running windows vista, and it seems to work, even though the applet tag has been depricated since HTML 4.01.

The applet also "blinks" in all three browsers if you scroll the page, but I suppose this is a java thing?

I think I will try to make a third version using object + embed when I get the time.
Re: Processing applet in wordpress post?
Reply #10 - Nov 13th, 2008, 3:35pm
 
i have the same problem with integration in modxcms.com ...

this is not working:
"
<APPLET name="sketch_081001a" WIDTH="500" HEIGHT="500"
           archive="_04_monster_2008.jar"
           standby="Loading Processing software..."
           codebase="http://www.movope.de/assets/java/"
           code="sketch_081001a" mayscript="true" scriptable="true"        

image=
"http://pappmaskin.no/opensource/processing/sketch_081001a/loading.gif"
           boxmessage="Loading Processing software..." boxcolor="#FFFFFF">
           <IMG SRC= "http://pappmaskin.no/opensource/processing/sketch_081001a/loading.gif" WIDTH="1" HEIGHT="1" />
           </APPLET>  

"

someone has an idea?
Re: Processing applet in wordpress post?
Reply #11 - Nov 13th, 2008, 3:38pm
 
ok. but this is working.
sorry.

"
<APPLET name="_04_monster_2008" WIDTH="500" HEIGHT="500"
           archive="_04_monster_2008.jar"
           standby="Loading Processing software..."
           codebase="http://www.movope.de/assets/java/"
           code="_04_monster_2008" mayscript="true" scriptable="true"
           image="http://pappmaskin.no/opensource/processing/sketch_081001a/loading.gif"
           boxmessage="Loading Processing software..." boxcolor="#FFFFFF">
           <IMG SRC="http://pappmaskin.no/opensource/processing/sketch_081001a/loading.gif" WIDTH="1" HEIGHT="1" />
           </APPLET>
"
Re: Processing applet in wordpress post?
Reply #12 - Dec 13th, 2008, 2:41am
 
Awesome! I was looking for something like this Wink
Re: Processing applet in wordpress post?
Reply #13 - Dec 15th, 2008, 3:52pm
 
I'm with wordpress 2.7, this might apply to earlier versions.
even in the HTML mode, wordpress will turn all the line breaks in your text into pesky </br> tags. So if you are pasting anything in your post editor, make sure to remove all line breaks.

<APPLET name="_04_monster_2008" WIDTH="500" HEIGHT="500" archive="_04_monster_2008.jar" standby="Loading Processing software..." codebase="http://www.movope.de/assets/java/" code="_04_monster_2008" mayscript="true" scriptable="true" image="http://pappmaskin.no/opensource/processing/sketch_081001a/loading.gif" boxmessage="Loading Processing software..." boxcolor="#FFFFFF">
<IMG SRC="http://pappmaskin.no/opensource/processing/sketch_081001a/loading.gif" WIDTH="1" HEIGHT="1" />
</APPLET>

the other thing is that when uploaded as "media" all files become lowercase. Bummer, if your source files had some uppercase.
Re: Processing applet in wordpress post?
Reply #14 - Feb 21st, 2009, 9:47pm
 
Glad I found this thread, I've been trying to do the exact same thing.  I've tried all the code listed here, but I can't get any of it to work.  In a nutshell, an outline for my applet appears, but I get an 'error, click for details'.  In that UI, I think I've tracked down the problem:

User home directory = C:\Documents and Settings\warpcat

So, it's trying to execute all the code relative to that path, rather than the paths I specify in my code.  Anyone else have any suggestions?  I'm a html noob Sad  FYI, I'm running Firefox on Win2K.
Pages: 1 2