Blog Archives

WordPress Ho!

After a long time in hibernation, I have jump-started Rhymes With Toaster as a WordPress blog. Drupal has been wonderful to me, it’s my primary framework when I develop at my dayjob. But it has become clear that I do not need to have a personal hosting space when all I really need is a place to throw up some thoughts, link to other resources and redirect email. Also, drupal is a bit of overkill for a personal blog.

So, I’ve migrated all my old content to WordPress and will be using wordpress.com for the host. It’s much simpler for the needs and the cost is certainly cheaper than a full hosting plan.

I hope to be posting more regularly in the very near future.

Advertisements

Embedding Yahoo Maps

While working on a site (powered by [http://drupal.org/|drupal], of course), I came to the location page, wherein I needed to place a map. I knew I could cut-n-paste a static image of the location, then link it to either Google or Yahoo maps for further activity, but I wanted something a little more interactive. So I checked out the [http://developer.yahoo.com/|Yahoo! Developer Network] for their [http://developer.yahoo.com/maps/|maps API], and sure enough, they had lots of cool tools for embedding their map software in your code. I’ve been drinking the Yahoo! kool-aid ever since I signed up for free email with them 8 years ago.

I wanted an interactive map, but I didn’t want to have to code up a separate flash or AJAX application and upload it. That’s when I found their [http://developer.yahoo.com/maps/flash/jsGettingStarted.html|JS-Flash API]. You call a little bit of javascript in your page, and it loads a flash application hosted by Yahoo! into a div on your page. It was perfect. All you have to do is sign up for a free [https://developer.yahoo.com/wsregapp/index.php|Yahoo Developer Application ID].

After playing around a little bit, I was able to embed all of the code that I needed right into a drupal page, no external module coding needed. So I could put a highly interactive and customized map into the page just by putting code into drupal’s web-based page creation form. No FTP, no SSH, no installing and configuring modules, just cut-n-paste into a form.

Here’s the code I came up with. The important thing is that you set your input format as “PHP” because we need to use a function to put a bit of javascript in the <head> section of the page. Also, make sure you replace the appid portion with your personal AppID.

<?php
drupal_set_html_head(‘

#mapContainer {
height: 400px;
width: 400px;
}
‘);
?>

// Create and display Map object at the address and with zoom level 3.
var map = new Map(“mapContainer”, “ejk_apps”,
“1201 S. Main, Ann Arbor, MI 48104″, 3);

// Add navigation and viewing tools
map.addTool( new PanTool(), true );
map.addWidget(new SatelliteControlWidget());
map.addWidget(new NavigatorWidget());

// Add the POI marker to the map and display it
marker1 = new CustomPOIMarker( ‘Michigan Stadium’, ”,
‘1201 S. Main\nAnn Arbor, MI 48104’, ‘0xFF0000’, ‘0xFFFFFF’);
map.addMarkerByAddress( marker1, “1201 S. Main, Ann Arbor, MI 48104”);

And here’s what it looks like:

<?php
drupal_set_html_head('

#mapContainer {
height: 400px;
width: 400px;
}
‘);
?>

// Create and display Map object at the address and with zoom level 3.
var map = new Map(“mapContainer”, “ejk_apps”,
“1201 S. Main, Ann Arbor, MI 48104″, 3);

// Add navigation and viewing tools
map.addTool( new PanTool(), true );
map.addWidget(new SatelliteControlWidget());
map.addWidget(new NavigatorWidget());

// Add the POI marker to the map and display it
marker1 = new CustomPOIMarker( ‘Michigan Stadium’, ”,
‘1201 S. Main\nAnn Arbor, MI 48104’, ‘0xFF0000’, ‘0xFFFFFF’);
map.addMarkerByAddress( marker1, “1201 S. Main, Ann Arbor, MI 48104”);

I thought I should wrap some of this up into a module, but when I looked, [http://drupal.org/project/ymap|someone had already done it]. I’ll have to check it out.

New Host, New Name, New Flavor

The new site is up– I’ve moved to a new host (not my linux box on my cable modem) and purchased a real domain name. Now I just have to figure out some content.

Upgrading to Drupal 4.7 (*cross fingers*)

The Freetagging capabilities in Drupal 4.7 alone make it worth the upgrade.

Luckily I found this great video tutorial to guide me:

http://ftp.osuosl.org/pub/drupal/files/videocasts/4.7-upgrading.mov

I just need to backup first, then we’ll see what happens.

UPDATE:

Well, I’ve made the update, and so far it’s working just fine. The first thing I did was to go in and change my “tags” taxonomy to use the freetagging option. On little click, and all my current tags were magically transformed from selections from a list to a string of comma separated values. I’m free to tag away!

Now, I need to get my theme and some modules up and running again.