Updated: 9/24/02; 2:56:10 AM.
Jake's Radio 'Blog


Wednesday, June 19, 2002

Related according to the Google API

Doc Searls, Sam Ruby, and Jonathan Peterson are all pointing at Dave Sifry's Google API hack for Moveable Type.

Sifry writes: "Look down at the bottom of this blog entry. You'll see a line that starts, 'Related Stories:' followed by 10 links. These links are created by a google search on the words in the title of this blog entry."

It turns out that this is pretty easy to do in Radio as well. As a test, I created a macro called googleTitleSearch, which you can drop in your Macros folder. With the addition of a snippet of code to my item template, I now have the top 10 Google results for the title of my weblog posts.

If you want to try it out, here's how:

Note: You must first create an account with Google, and configure Radio to use the key associated with your account. Follow steps 3 and 4a on this page to get your key.

If you want something simpler that doesn't require signing up with Google, you might try out the googleIt macro.

1) Download googleTitleSearch.txt to your Macros folder. (It's a sub-folder of your Radio UserLand program folder.)

2) Edit your item template, adding the following macro to the template, where you want the search results to appear:

<%local (adrpost = @weblogData.posts.["<%paddedItemNum%>"]); return (googleTitleSearch (adrpost))%>

(Be careful to make sure that the macro appears on a single line in your template. Line-breaks in the macro will cause an error on your page.)

3) Make sure that the preference for Item-level Title and Link is checked.

4) Create a new post, with a title. Click the Post button.

That's it. For any posts that have a title, you'll get a Google search result for the words in the title, along with your post.
14:35'26    comment []

Lee Braiden on kuro5hin.org: Artists, It's Time to Choose a Side. "The days of huge corporations which do nothing but publish and distribute information in tediously slow and awkward ways are rapidly disappearing. No longer is it possible to claim that art and other forms of information have to cost a lot simply because of production and distribution economics. If middlemen still claim so, then they should be declared redundant 'social thieves', and swept aside."
13:07'21    comment []

Java VM for .NET

Jeroen Frijters has a new Radio Weblog, where he's documenting his implementation of a Java Virtual Machine in .NET.
13:02'37    comment []

Adding a date to your Radio archive pages

Day 8 of Mark Pilgrim's "30 days to a more accessible weblog": Constructing meaningful page titles. Mark writes:
"Every page of your weblog should have a unique and meaningful page title... Date-based archive pages should include the name of your weblog, followed by the date (or date range) for the page...

"Unfortunately, I do not know how to customize page titles satisfactorily in Blogger or Radio. Radio has a <%longDate%> macro, but it can not be used as part of the page title..."

It's true that longDate doesn't work in the template, but there is a way to do this. Here's how:

1. Edit your home page template.

2. Find the line (probably near the top) which reads:


3. Between <%title%> and </title>, add the following macro:

<%local (d); if radio.weblog.file.getArchiveFileDate (radioResponder.fileBeingRendered, @d) {": " + string.dateString (d)} else {""}%>

Note: be careful if you copy and paste this code -- there should be no line-breaks.

4. Click the Submit button.

The next time any of your archive pages are published, they'll have a date in their title.

There's no need to stick with the default date format. You can format the date however you want -- Just replace the string.dateString (d) part with your own code. See the DocServer pages for the date and string verbs for some places to start digging.
01:53'34    comment []

Gail Godwin. "Good teaching is one-fourth preparation and three-fourths theater." [Quotes of the Day]
01:43'15    comment []

© Copyright 2002 Jake Savin.
June 2002
Sun Mon Tue Wed Thu Fri Sat
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
May   Jul

Radio Stuff


Subscribe to "Jake's Radio 'Blog" in Radio UserLand. Click to see the XML version of this web page.
Click here to send an email to the editor of this weblog.

Click on the coffee mug to add Jake Savin's Instant Outline to your Radio UserLand buddy list.


Click here to visit the Radio UserLand website.