Scott Andrew - lo-fi acoustic pop superhero!

Join the Demo Club to unlock new music, get discounts, tour dates and other neato stuff:

or learn more here.

November 8, 2001

Your MT Blog as a Moreover feed

As you might know, I’ve been messing around with the Moveable Type system on this site. One thing I came up with is a way to generate a Moreover JavaScript feed of my DHTML-related posts. You can see the results here. It was a relatively obvious and brain-dead hack, but hey, small victories. If you’re using MT, follow the MORE link to get the code.

This template will create a Moreover JavaScript feed of your blog. If you or people you know use Moreover feeds on a website, now your blog can be one of them. I think it’s particularly useful for blog categories; for example, I syndicate all the DHTML and JavaScript links I post as a separate feed.

Anyway, here’s the deal:

1) Create a new Index Template. Name it something like “My Moreover JS Feed” or whatever.

2) Make sure you give the filename for this index a “.js” extension. Mine is “scottandrew.js”

3) Copy and paste the template code below:


function sa(url,headline_text,source,media_type,
  cluster,tagline,document_url,harvest_time,
  access_status,access_registration)
{
  this.url = url;
  this.headline_text = headline_text;
  this.source = source;
  this.media_type = media_type;
  this.cluster = cluster;
  this.tagline = tagline;
  this.document_url = document_url;
  this.harvest_time = harvest_time;
  this.access_status = access_status;
  this.access_registration = access_registration;
}
article = new Array();
<MTEntries lastn="5">
article[article.length] = new sa("<$MTEntryLink$>",
  "<$MTEntryTitle$>","<$MTBlogName$>","text",
  "<$MTEntryCategory$>","","<$MTBlogURL$>",
  "<$MTEntryDate$>","",""
  );
</MTEntries>

Make sure you leave in all that JavaScript at the top. You can increase or decrease the number of entries, or restrict it to only one category as I have:

<MTEntries lastn="5" category="DHTML, JavaScript and standards">

Also, if you use double quotes in your entry titles, be sure to escape them somehow so they don’t break the sa() function (I just try to avoid double quotes).

4) Save and rebuild.

To display your blog posts, just use the same display code as you would for any other Moreover JS feed, and point the correct SCRIPT tag at your JS file.

You can see mine in action here:

http://www.scottandrew.com/mt_moreover.html

No Comments

Leave a Comment

Close
  • E-mail
  • Social Web

Email this page to a friend:

E-mail It

Buy Music

Download Scott Andrew tracks from iTunes Find Scott Andrew at Rhapsody Find Scott Andrew at Amazon Find Scott 
Andrew at CD Baby

New Videos

More Videos

Photos

More Photos at Flickr

Recent Reader Comments

  • Steve Rydz: Sounds amazing Scott, wish I could've been there b...
  • drager: Does anybody know whatever happened to Tommy Hayes...
  • Brian Bergeron: Congrats man! Top 10! BB
  • garagespin: Scott -- congrats on reaching #3, and best of luck...
  • Brian Bergeron: Even though we're 'competing', I'm in the same boa...