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 › integrate processing in website
Page Index Toggle Pages: 1
integrate processing in website (Read 1007 times)
integrate processing in website
Jun 17th, 2008, 1:45pm
 
Today I would like to implement template php with shortcode from Ira Greenberg's book but I make as cript with copy past inside a php template but nothing run? How i can use processing in php template. Because I would like to respect  balise div  and css design, and I would like to integrate processig code inside a div!

my website used wordpress at http://olivierbaudrydesign.free.fr
Re: integrate processing in website
Reply #1 - Jun 17th, 2008, 11:30pm
 
what do you mean, exactly? (some of us speak french, that may help)

nothing will happen if you just copy & paste the code into a php file. applets (or sketches) are written in Java, not PHP, and the source has to be compiled (into a .JAVA or .JAR file) before you put it on your page. see the File > Export option.
Re: integrate processing in website
Reply #2 - Jun 17th, 2008, 11:46pm
 
do you know if it possible to make a. jar from proceesing for dyplaying inside a balise in my website on page home, I have an empty balise div (blank space under my pictos) now and I think i can insert  processing inside ?
Re: integrate processing in website
Reply #3 - Jun 18th, 2008, 12:32am
 
You can put an applet anywhere in a webpage.
All that you need to do is put the important HTML fragment from the exported .html file into your website, and put the .jar file(s) on the server and it should just work.

e.g. from a quick test export:
Remeber to change the values to the right ones for your sketch
Quote:
<!--[if !IE]> -->
<object classid="java:temp.class"
 type="application/x-java-applet"
 archive="temp.jar"
 width="400" height="400"
 standby="Loading Processing software..." >
<param name="archive" value="temp.jar" />
<param name="mayscript" value="true" />
<param name="scriptable" value="true" />
<param name="image" value="loading.gif" />
<param name="boxmessage" value="Loading Processing software..." />
<param name="boxbgcolor" value="#FFFFFF" />
<param name="test_string" value="outer" />
<!--<![endif]-->
<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
codebase="http://java.sun.com/update/1.5.0/jinstall-1_5_0_15-windows-i586.cab"
width="400" height="400"
standby="Loading Processing software..."  >
<param name="code" value="temp" />
<param name="archive" value="temp.jar" />
<param name="mayscript" value="true" />
<param name="scriptable" value="true" />
<param name="image" value="loading.gif" />
<param name="boxmessage" value="Loading Processing software..." />
<param name="boxbgcolor" value="#FFFFFF" />
<param name="test_string" value="inner" />
<p>
<strong>
This browser does not have a Java Plug-in.
<br />
<a href="http://java.sun.com/products/plugin/downloads/index.html" title="Download Java Plug-in">
Get the latest Java Plug-in here.
</a>
</strong>
</p>
</object>
<!--[if !IE]> -->
</object>
<!--<![endif]-->


So that's the chunk which needs to go into your web page, but with the right names/size and then the right .jar file must be on your site too.
Re: integrate processing in website
Reply #4 - Jun 20th, 2008, 3:39pm
 
Hello

Thank you for your code.
I have one question on it : I would like to know what do you have a repetition of this (Because i test it and java indicate you have two java console open):
width="400" height="400"
standby="Loading Processing software..."  >
<param name="code" value="temp" />
<param name="archive" value="temp.jar" />
<param name="mayscript" value="true" />
<param name="scriptable" value="true" />
<param name="image" value="loading.gif" />
<param name="boxmessage" value="Loading Processing software..." />
<param name="boxbgcolor" value="#FFFFFF" />

I think it was for the beginning to script and enclosure ( inner outer) maybe i think it' s possible to simplify that by this : width="400" height="400"
standby="Loading Processing software..."  >
<param name="code" value="temp" />
<param name="archive" value="temp.jar" />
<param name="mayscript" value="true" />
<param name="scriptable" value="true" />
<param name="image" value="loading.gif" />
<param name="boxmessage" value="Loading Processing software..." />
<param name="boxbgcolor" value="#FFFFFF" />
<param name="test_string" value="inner" value="outer" />




I woud like to know how to search .jar because i make a . jar in my wpcontent/theme/processing directory. Must I specify the link in header template?
Re: integrate processing in website
Reply #5 - Jun 20th, 2008, 4:35pm
 
I just copied what processing creates when you do "Export..." I believe it's due to Internet Explorer needing things differently.. it's probably safest to just leave it alone.
Re: integrate processing in website
Reply #6 - Jun 20th, 2008, 4:39pm
 
thanks

and the link for search.jar is maked automatically by export fonctions ?
Re: integrate processing in website
Reply #7 - Jun 20th, 2008, 5:09pm
 
I have no idea how wordpress works, so I have no idea how you get the .jar file into the site to link to. As long as the "archive" parameter contains the right path to the file then it should work I believe.

so if you can directly get at the jar with http://olivierbaudrydesign.free.fr/wpcontent/theme/processing/search.jar (for instance) then the archive line needs to be
<param name="archive" value="/wpcontent/theme/processing/search.jar" /> I think I may be wrong though...
Re: integrate processing in website
Reply #8 - Jun 20th, 2008, 5:18pm
 
Thanks a lot.
Re: integrate processing in website
Reply #9 - Jun 23rd, 2008, 1:01pm
 
Hello

Do you know how to do because users can use firefox, safari,I test a script Curve1 From Ira on my website, but I Think firefox ask me to install plug in because you have this :

<div id=home">
<div id="Curves1_container">

<!--[if !IE]> -->
<object classid="java:Curves1.class"
           type="application/x-java-applet"
But I dint know abreviation for firefox or safari
Re: integrate processing in website
Reply #10 - Jun 23rd, 2008, 2:10pm
 
Isn't Processing generating the HTML for you?
Otherwise, just look at any Processing applet page on the Net and do a view source...
Page Index Toggle Pages: 1