BBCode to insert applets on a forum

Hi!

I’m still a Java evangelist… I try to convince several French webmasters to include a bbcode markup to insert applets and webstart applications (a simple link is not enough, I have to indicate the mime type). I have only found this:
http://startrekguide.com/community/viewtopic.php?f=82&t=2732

However, I prefer using the markup. I have never deployed an applet with it. I have found this example:

<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" 
        width="150" height="80">
  <param name="archive" value="JitterText.jar">
  <param name="codebase" value="data">
  <param name="code" value="JitterText">
  <param name="BGCOLOR" value="000000">
  <param name="TEXTCOLOR" value="FF0000">
  <param name="TEXT" value="OJITesting!">
  <param name="SPEED" value="250">
  <param name="RANDOMCOLOR" value="1">

  <!--[if gte IE 7]> <!-->
  <object type="application/x-java-applet"
          classid="java:JitterText.class"
          archive="JitterText.jar"
          codebase="data"
          width="150" height="80">
    <!-- Konqueror browser needs the following param -->
    <param name="archive" value="JitterText.jar">
    <param name="code" value="JitterText">
    <!-- Safari browser needs the following param -->
    <param name="JAVA_CODEBASE" value="data">
    <param name="BGCOLOR" value="000000">
    <param name="TEXTCOLOR" value="FF0000">
    <param name="TEXT" value="OJITesting!">
    <param name="SPEED" value="250">
    <param name="RANDOMCOLOR" value="1">
    alt : <a href="data/JitterText.jar">JitterText.jar</a>
  </object>
  <!--<![endif]-->
  <!--[if lt IE 7]>
    alt : <a href="data/JitterText.jar">JitterText.jar</a>
  <![endif]-->

</object>

But does someone have a more simple example that works on most of the main browsers? I don’t know which parameters are really required and which ones are not in the example above.

Does someone already have a working example of bbcode for applets?

Applets in forums is not a good idea.

If anybody is browsing without Java, they either get a empty rectange (applet) or plain XML file (webstart) on their screen.

If anybody is browsing with Java < 1.6.0u10, there enduser experience is horrendous.

Even with the current version the browser intergration is not rock solid. Especially Opera. So no, please don’t crash/freeze/hang my browser when I’m reading a topic in a forum.

If anything, it will be VERY BAD for Java’s reputation. Even if ‘only’ 10% of endusers will experience problems, they will scream and shout, and scare off everybody else.

I understand your position. Therefore, I will only suggest a modification of the file .htaccess to be sure that the JNLP link will be handled correctly:

AddType application/x-java-jnlp-file .jnlp

Hmmm, i think it’s a good idea if the applets are not displayed on the webpage until a placeholder button is pressed (Sort of like browsing with FlashBlock for Firefox).
Otherwise i think it’s a horrible idea that would scare people like me from viewing game threads. The initialization of Java Applets does in some browsers halt the browser while going on. This can be very annoying! (While this is indeed horrible browser implementation, it’s still something we have to take into account…)

  • Scarzzurs

Yup agreed, Place holder image is probably the way to go, where applet starts when image is clicked.

also note that java applets can edit the html code of the page they are on through liveconnect, which can lead to all sort of issues (possible password stealing, replacement of ad’s with different ones, etc). It use to be that the mayscript tag was needed to allow liveconnect to work, but seems like recent version of the java plugin allow liveconnect to work even without the mayscript parameter.

[quote]However, I prefer using the markup. I have never deployed an applet with it. I have found this example:
[/quote]
applet tag is far away more compatible, simple and user friendly (why would you use this “fantastic” new object tag ?)

[quote]If anybody is browsing without Java, they either get a empty rectange (applet) or plain XML file (webstart) on their screen.
[/quote]
I dont agree with this, using applet tag you can just put any HTML you like in replacement of the applet when java is not available.

<applet><img src=niceSplashNoJava.jpg></applet>

anyway I agree that starting applet without user action may not be very nice and as a fllash video it is better if the user have to click on it to start.

something like :

<DIV style='width:100;height:100;padding:0' onclick=' this.innerHTML="<APPLET width=100 height=100></APPLET>" ' >
run Applet etc... nice preview html...
</DIV>

Well as a Java supporting forum, I wouldn’t mind some basic support for the applet tag.
I like the idea of showing a image first and once you click on it then it loads the applet. I think that’s possible as you can write any code behind the BB tags(correct me if I’m wrong).

The W3C recommends the use of the object tag.

firefox doesn’t support it!

you’ll end up using both tags to get it running everywhere, better to just use the applet tag which works everywhere.

the object tag? FF does support it or at least it worked for me on FF 3 pretty well…
applet deployed with object tag

ah maybe its supported now in ff3, wasn’t in ff2.

W3C recommend a lot of stupid and incompatible things…

EDIT : W3C just decide a day… “hey … we are going to standardize Web without taking care of what already exist and nothing will work until all browsers match our God requierement ! cool no ?”

Sun seems a lot more intelligent about that :

[quote]Use the applet tag if the Web page is accessed through the Internet.

Use the object or embed tag if the Web page is accessed through an Intranet.
[/quote]
http://java.sun.com/javase/6/docs/technotes/guides/plugin/developer_guide/using_tags.html

euh why wasn’t this closed and pointed to: http://www.java-gaming.org/index.php/topic,20543.0.html ? discussing stuff at two places and still having suggestion all over the place while there’s a section dedicated to it doesn’t sound like a good idea to me.

Is this thread really a suggestion for this forum? I thought it was more a discussion about how it could be done on forums in general.

Didn’t you know ChrisM is French??

Why not? Obama has some French origins :smiley:

No it is not a suggestion for this forum. If you were right, I would not have taken this initiative.

Your right markus.

That’s what I said, lol. :smiley:

Personally, I thing both applets and flash movies appearing automatically in forums is a bit rude, but I love the "click here to start " preloader thing… That’s kinda how embedded youtube movies work. And I’d love for this to be possible on these forums as well. =)