« Sametime Easter Egg | Main| Understatement of the year "I am in no way a violent person" »

Here it is - How to put Asteroids into Sametime

Category
You're going to hate me when you see how easy this is. It turns out that this solution and the iPhone have something in common. The iPhone is basically using a web browser for it's 3rd party apps, and that is really what I'm doing here. I have often looked at Google Gadgets, Yahoo Gadgets, apple Gadgets etc. and thought, hhm that would be handy in Sametime. So I wanted to see how I could do that in Sametime with the fewest steps possible. Here's what I came up with.

Step 1 - Setup and configure the Sametime eclipse development enivronment , ok this is the hardest step and longest step. But if you follow the instructions in the Lotus Sametime 7.5.1 Integration Guide you should be in good shape. Be sure to install the samples that are included. That will give you something that looks like this.
Step1


Step 2 - To add Asteroids, Pacman etc. to Sametime we only actually care about one of the Sametime Plugin Samples, which is the branding sample also known as com.ibm.collaboration.realtime.sample.branding. To stop other samples being compiled etc. we just want to close them, the quickest way I have found to do this is to right click on "com.ibm.collaboration.realtime.sample.branding in the package explorer and choose "Close Unrelated Projects" so you end up with this:
Step2


Step 3 - Now expand the branding package by clicking the small plus to the left of it's name
step3


Step 4 - Now double click on the file "plugin.xml" which open an Extensions window as seen here
Step4


Step 5 - Now click on the tree in the extensions window and expand out "contact list branding (stbranding)" http://www.ibm.com (website) till you see it simliar to this
step5


Step 6 - Now we need to get a URL for the google gadget we need, so go to the Google Gadgets Site and find the one you want (for this example we will use Asteroids, click on the button "Add to your webpage", this will present a screen that looks like this:
step6


Step 7 - Click on the button "Get the Code" this will display a new input box (sometimes this appears below the screen so be sure to scroll down to see it), it contains a like like this:
<script src="http://gmodules.com/ig/ifr?url=http://googlegadgets.neoteksystems.com/Asteroidsgadget.xml&synd=open&w=320&h=320&title=Asteroids&border=%23ffffff%7C3px%2C1px+solid+%23999999&amp;output=js"></script>

Highlight the following section of the URL:
http://gmodules.com/ig/ifr?url=http://googlegadgets.neoteksystems.com/Asteroidsgadget.xml
Copy this to the clipboard and paste it into the "website" properties field replacing http://www.ibm.com like this:
Step7


Step 8 - If you were developing using Sametime 7.5 and not Sametime 7.5.1 you can now run your code and you will see Asteroids in the contact window. If you're running Sametime 7.5.1 you won't as the integrated browser within Sametime 7.5.1 has changed. In Sametime 7.5 it was using Internet Explorer, in Sametime 7.5.1 it is now using XULRunner, not an issue really except that 95% of the world has flash loaded within Internet Explorer and 0.00001% (that's me) of Sametime 7.5.1 users have Flash installed into the XULRunner integreated browser. So how do we install Flash into XULrunner? You need to do this.
  1. Shutdown all instances of Sametime
  2. Go to a machine with Mozilla Firefox installed, and install the flash plugin from Adobes website.
  3. Find the two files NPSWF32.dll and flashplayer.xpt, I found them in my C:\WINDOWS\system32\Macromed\Flash directory
  4. Copy the two files above into the Sametime directory \Sametime Connect\plugins\com.ibm.swt.xulrunner.win32_3.2.0.200703161310\xulrunner\plugins
  5. Now you can restart Sametime


Step 9 - If you want to make the area for asteroids larger, you can increase it's height by clicking on the extension "contact list branding" and change the height settings to however many pixels you want.
Step9

Comments

Gravatar Image1 - In that case, Carl...

Can you get it working in the Notes 8 sidebar? If we can surface the entire realm of Google Gadgets in the Notes 8 sidebar fairly easily, and provisioned from the Domino server...

Well, let's just say that would make openNTF look like yesterday's news.

That is, until we build a Google Gadget that showed openNTF projects. And PROVISIONED THEM AUTOMATICALLY!!!


Gravatar Image2 - @1 I don't see why not, it means I'll need to download and install Notes 8 on a machine. FYI you can do it today in Notes R5 and later. Just add it as a web page into your welcome page. As i've pointed out on someone elses blgo a few times, composite apps have been possible in Notes for years


Gravatar Image4 - @3 Yep same thing, it's that gadget that is launching the other window. Not all gadgets do it, just some of them that people have coded to do it. Think of this as an example, if you find another site with a flash asteroids etc. your could just point to a different html file.

Try using these URLs

Asteroids

Space Invaders

Frogger

Tetris

Gravatar Image5 - You can get around loading the SDK and Eclipse by simply editing the branding file locally. I do it for demos a lot for branding changes like images.

Gravatar Image6 - Hard coded?
When I try and install the JRE 5.0 it says it will not install unless I have IBM hardware. (Dohhhhhhhh!!!!) this can't be true can it?

Gravatar Image7 - I've only seen/tried this now and it works wonderfully! Thanks!

I have one question though, I only get the plugin if I start ST751 from eclipse. If I start ST751 from the "start" menu, it won't load the plugin. Is there a way around this, and start ST751 with the plugin(s) from the start menu/shortcuts ?

Post A Comment

:-D:-o:-p:-x:-(:-):-\:angry::cool::cry::emb::grin::huh::laugh::rolleyes:;-)