My apologies to anyone who has tried to post a comment here. I forgot to config WordPress to allow non-registered users to post. Whoops. Fixed now.
Monthly Archive for July, 2006
Whee! My feet might not forgive me, but it was a great three days.
Some post-CON notes:
- We need to talk OSU into paying for some session passes. The social networking on the exhibit floor and in the halls was invaluable, but there were a bunch of sessions many of us at the OSL would have greatly benefitted from attending.
- I will exact my revenge on a certain Maintain developer for sandbagging me with the OSTG guy and his camera.
- The tan OSU shirts … I was a bit worried about them at first, but they really worked out well. They were really easy to spot on the exhibit floor. It highlighted our strong presence and it made it easy to direct interested parties to the right person even if that person was out wandering the floor.
I need to figure out what it is about a 3 foot tall inflatable Tux that makes him so irresistable. That little bird scored so much schwag (on the second day when most booths were all cleaned out) that he needed help from a friendly neighbor booth babe (!!!) to stand up. That’s some serious charisma, there. (Thanks to Fred for the pics!)- Note to self: bring five times as many business cards next time. I ran out halfway through the first day. Not a good thing.
- Schedule in a break for a nap sometime mid-afternoon. It sucks to be too tired to enjoy the parties.
- Toys for kids == prime schwag. I lost count how many times someone said, “My kids will love this” or “Nah, my kids don’t need a coaster.” Carabiners were OK, but something really toy-like would be better for next year. The super-ball with the blinking LEDs in it was a good one.
- More t-shirts. We ran out way too fast. Maybe hold some for the second day.
- Kees’ Wireless Wall of Worry was a great idea. Ironically, I think the horribly-congested and oversaturated wireless network cut down on the number of hits we got for unencrypted logins because a lot of people simply couldn’t get connected. I think we should make it more prominent next year, though.
One of the things we need to build for the OVSD project is a voice over IP (VoIP) tool for teachers and students to communicate with each other. Being familiar with Asterisk already, I immediately thought of it when this project came along. Mostly we plan on using it for conference calls and the like, but there are all sorts of interesting things we can do with it for podcasting and faxing as well. Regardless how we end up using Asterisk in the OVSD project, it’s an interesting use of the product.
Except for one slight problem. In order to use the MeetMe conferencing features within Asterisk, you need to install the zapel module for the clock. OK, that’s no problem, except that my development box is a Xen virtual machine. Xen virtual machines do not have access to the hardware clock. Zaptel appears to be rather unhappy about that lack of access to the hardware clock and tends to kernel panic.
Ouch. So now I need to either use a separate conference bridge application within Asterisk, or find a way to get Zaptel and Xen to play nice.
New job, new tools, new fun!
Being relatively new to the OSL, I have been gleefully learning some new tools. Specifically, Drupal and OpenLaszlo. In fact, I’m having so much fun with them I feel the need to share. So, with that in mind …
The problem. Well, OK, it’s not really a problem. Let’s call it a “challenge”. Drupal, for reasons too in-depth to go into right now, does not allow page authors to embed JavaScript directly into the body of a page. OpenLaszlo, on the other hand, uses JavaScript to embed applications in pages.
Hmm. So how does one embed an application developed in OpenLaszlo in a Drupal site?
Well, after a bit of head-scratching, this is what I learned:
Drupal has two handly little tools - drupal_add_js() and drupal_call_js() - to help. drupal_add_js() allows you to add external JavaScript files to the page header, and drupal_call_js() allows you to call the functions in the external scripts.
Normally, to embed an OpenLaszlo application you add the following code to the desired page:
lzEmbed({url: 'AppName.lzx?lzt=swf', bgcolor: '#ffffff', width: '900', height: '600'});
However (hah! You should have known it wasn’t going to be quite that easy), there are some small issues that need to be dealt with before it will work properly. First of all, the script assumes it is being run from the Laszlo server directly, rather than the Drupal server. So we need to copy the Laszlo embed.js resource script from the Laszlo server over to the Drupal server and turn that JavaScript into something Drupal-compatible using drupal_add_js():
drupal_add_js('/drupal/path/to/embed.js');And we need to drop the rest of the JavaScript into a file (we’ll call it laszloapp.js) that we can load using drupal_add_js() and save it to the Drupal server filesystem:
function load() {
lzEmbed({url: 'http://laszloserver.org:8080/AppName.lzx?lzt=swf', bgcolor: '#ffffff', width: '900', height: '600'});
}To load the script into the Drupal page, we call it thusly:
drupal_add_js('/drupal/path/to/laszloapp.js');Notice we have put the lzEmbed() function inside a load() function. This is because the drupal_add_js() function inserts the JavaScript (and therefore the Laszlo object) into the page head, above the rest of the page content. So to control where the Laszlo object is embedded in the page, we need to use the drupal_call_js() function to call the load() function from laszloapp.js. At the point in the page where you want to insert the Laszlo object:
<div id="laszlo_object">Et voila! The Laszlo application loads within the “laszlo_object” div.
In a nutshell:
- Copy the
embed.jsfile from the Laszlo server to the Drupal server - Create a
laszloapp.jsfile containing the following:function load() {
lzEmbed({url: 'http://laszloserver.org:8080/AppName.lzx?lzt=swf', bgcolor: '#ffffff', width: '900', height: '600'});
} - Add the following code to the Drupal page:
<div id="laszlo_object">
</div>