Hi all. A little while back I set up a new, automatically maintained blogroll system for Munu, but I never really explained how it works.
The blogroll is maintained by a blog called Blogroll. For each new Munu I create a post that simply lists the name and domain name of their blog. View a series of extremely intricate templates (some as much as three lines long!) it then magically creates various styles of blogroll for people to use.
To use these blogrolls, you must first set up your blog to be creating php. This isn't hard, and here is how you do it:
Go into the Weblog Config page for your blog, and click on Preferences at the top.Once you've done this, you can use the PHP include command to include blogrolls (and indeed just about anything). Like this:Scroll down to the Archiving section, and for the entry labeled File extension for archive files, put in php.
Now go into Templates, and select your Main Index template. The file will be set to index.html; change it to index.php.
Now rebuild your blog, and you're done!
There are a few different styles available for the blogroll:
<?php include "http://blogroll.mu.nu/mli.i"; ?>
mu.i is a simple listing of the Munu blogs sorted by the date they joinedWe can easily create any number of alternate styles. The combinatorial explosion holds no fears for us! Just let me know what you'd like, and if it's not too completely impossible, I'll get it set up.
nu.i is the same listing in alphbetical order
mli.i is an HTML list, in date order. Depending on your stylesheet, this might put little dots next to each entry, as seen at Ellis Island
nli.i is the same HTML list in alphabetical order
pulldown.i is a listing of entries for the pulldown box style of blogroll. You can see a pulldown box blogroll at Hold the Mayo, but Stephen doesn't seem to be using the automatic list yet.
Hmm. I just had a thought. With a bit of tweakering, I should be able to get it to maintain the old Javascript blogrolls too. Hang on a tick... Done. The mu.js and nu.js Javascript files should now get updated automagically too.
Posted by Pixy Misa at April 10, 2005 02:28 AMThose are pretty slick Pixy. I used the pull down with include code You could do the same thing by building a new MT module, but this is easier. I was working on putting that together.
Can I access the include files directly to see how you did what you did?
Posted by Eric at April 10, 2005 09:05 PMI have finally given in to not manually adding new names to the mu.nu list.
Now that I've gone automatic I want to ask for a variation. Can we have a pulldown version sorted by added date?
Posted by Stephen Macklin at April 11, 2005 12:56 AMHey Pixy,
I used "pulldown.i" and it works except that it doesn't actually select the URL and redirect.
Also, could you provide a version that has a target="_blank", for those of us who prefer that method of linking?
Posted by Eric at April 11, 2005 05:30 PMThanks. That'll make it easier to check out all the newcomers.
Posted by Stephen Macklin at April 12, 2005 02:18 AMOh yeah, I didn't include the Javascript code in the include file. I'm doing that now, but hang on while I test it.
Posted by Pixy Misa at April 12, 2005 03:02 AMSorry, couldn't wait, once I saw the changes you made it was obvious. It works fine.
Now I'm trying to figure out how to get it to do a target="_blank".
By the way, if I put an include file in /home/ecowper/www/scripts/, can I call it with a ./scripts?
Posted by Eric at April 12, 2005 04:24 AMYeah, ./scripts should work.
I'm going to see if I can find a way to tell the script to do a target="_blank" without making a whole new include file. Should be possible.
Posted by Pixy Misa at April 12, 2005 06:27 AM