WPMU Blogs Directory?

I’ve been trying to figure out how to build an effective directory of blogs hosted by a WPMU service. There’s the list-all mu-plugin widget, and it has a handy dandy list_all_wpmu_blogs() method. I’ve created a page template for my theme, and added this code to dump the list of public blogs:

<!-- directory stuff goes here -->
<?php list_all_wpmu_blogs("","","<li>","</li>","updated"); ?>
<!-- end of directory stuff -->

Create a new Page, call it something creative like “Directory” and select the template that contains the above code. That works, technically, but doesn’t produce the most effective directory once the service grows to more than a dozen or so blogs.

WPMU List-all Directory

But, once a service gets a bunch of blogs, say a hundred or so, a directory needs to be a bit more powerful. Sorting. Filtering. Searching. Categorizing. Letting people find blogs by activity (number of posts, number of comments, number of recent posts…) At the bare minimum, it’d be something like the great directories used by UMass and UTA. I haven’t been able to find out any detailed technical information about how either of those directories are built, but they appear to be static HTML files, probably generated by a separate script triggered by a cron job. They appear to run external to WordPress, but I could be wrong on that.

It should be relatively straightforward to build a WPMU blogs directory function, with the wp_blogs table containing basic metadata about each blog, and info about the owner and last post just a join away. Anyone have any cool code to share? Any ideas of how best to implement this?

17 thoughts on “WPMU Blogs Directory?”

  1. Pingback: simple67
  2. Yeah, the directory here is key. One of the WPMu gurus, Dr. Mike is looking into this as well over at the premium.wpmudev.org forums. I’ll keep digging as well and hopefully we can crack this nut and make it freely available. Good to see you’re hot on the directory trail.

  3. What about using one of the Spam link tools as an aggregator?
    Just kidding-
    I’ve been manually adding each graduate of my websitetology course to a list- and it’s pretty worthless- but it gets them all hits.
    If you figure out a way- I’m hoping I can adapt it to use on my server- without running WPMU.
    Thanks D”Arcy.

  4. Hello, D’Arcy,

    Between you and that Groom character, you will succeed in shoehorning most of Drupal’s functionality into WPMU.

    Until the upgrade…

    In Drupal, this’d be pretty straightforward using the Views module. If you wanted to have some fun, you could use the feedapi to import OPML feeds of blogs you were interested in, and expose that to Views. That’d get you a monstrous amount of flexibility.

    BTW, and if it wasn’t obvious, I was just being a wise guy with my opening snark. One of the things I love about tracking the various approaches to small-pieces-loosely-joined approaches is that there *are* various approaches, and that they can all work together.

    For example, if your directory page generated an OPML feed, that feed could in turn be dropped into Drupal via the feedapi, and voila, you have your planet site.

    Do that for your sites, and Jim’s sites (which would require installing Drupal, CCK, and the FeedAPI, and then filling out two forms to grab the opml feeds), and you would have an aggregated, fully searchable, fully remixable content archive. And, all this could happen *without* removing this data from student control.



  5. Bill, it’d take easily as much effort to shoehorn he truly individually-owned blogging stuff from WordPress into Drupal 🙂

    Part of my frustration is because this would be so trivially simple to implement in Drupal, as you point out. Without having to write a single line of code. But, then we’re back in the everybody-blogs-in-a-communal-space place again, which isn’t working out too well…

    I like the idea of an OPML export for the directory! Combine that with tagging of blogs, and you’ve got a pretty flexible directory system that could feed sets of related (class? subject? cohort?) blogs into an aggregator. That’s getting closer to the holy grail…

  6. RE: “everybody-blogs-in-a-communal-space place again, which isn’t working out too well…” — this does seem to be the crux of it, now.

    Here’s what I’m thinking: how is a flexible profile page different from a fully customizable blog? If one had the ability to change the basics (font color, bg color/image, page logo, and widgets for displaying content), what else would need to be added?

    The main difficulty in doing this in Drupal is that, in most cases, it is rarely a pure blogging platform — content occurs in a variety of different contexts, and in many sites, these contexts are accompanied with their own UI, and most places aren’t too keen on having users (ahh, those pesky users! always interfering with institutional imperatives!) override theme defaults. Which gets us back to the “everybody-blogs-in-a-communal-space place again, which isn’t working out too well…”

    With that said, the flexible user profiles are pretty simple, and with D6 will get even easier. That provides a flexible, customizable starting point for a user-defined “space.”

    The more I think about it, though, the more I like the idea of an OPML feed coming out of a blog directory, and being fed into a searchable aggregator. Keep in mind that the feedapi allows for mapping of external tags into Drupal’s core taxonomy, and that you can then slice those imported feeds up into new sections via views, and then expose that via an rss feed…

    Yup. I taste some Drupal-Wordpress kool-aid, consumed straight out of the grail 🙂



  7. mmm… kool-aid… it comes down to picking the best tool for the job. want blogs? wordpress is the way to go. want a website or community space? drupal, all the way. of course, you can do either with each one, but they’re predisposed to certain things. The OPML-fed aggregator/portal thingy is a bit like EduGlu, which still hasn’t taken off 3 years later.

    but, it feels like we’re getting closer. similar to brian’s recent post lamenting the state of rss tools. it’s been a long, slow trip, but I think we’re starting to pick up momentum. or at least direction…

  8. Sorry about those trackback spams, I changed the options for all my test aggregator blogs out there. I have too many to track these days, which is becoming a problem.

  9. Yup. I taste some Drupal-Wordpress kool-aid, consumed straight out of the grail

    Daniel 😉

Comments are closed.