The MU forums have moved to WordPress.org

weblogs.com for edublogs.org (8 posts)

  1. Farms
    Member
    Posted 18 years ago #

    Something I've wanted to do for a while is to set up a weblogs.com style site for edublogs.org... rather than pings though I'm after one great big aggregator automatically subscribes to and displays every post from every site in edublogs in one long river of news:

    http://www.reallysimplesyndication.com/riverOfNews

    I've had a peek at FeedWordPress which would do the job just fine but for the automation of subscribing to each new blog.

    Has anyone managed to crack this or wants to have a go?

    Or thinks it's worthwhile?

    Cheers, James

  2. Farms
    Member
    Posted 18 years ago #

    I've even set up a manual example for some work at my uni http://studioblogs.net

  3. mspecht
    Member
    Posted 18 years ago #

    James I think it is very very worthwhile, while I could hack some together very slowly I would prefer to reuse someone else's work. The next logical step would be an OPML file extension for WPMU, ability to generate an OPML file for every blog within the service.

  4. Farms
    Member
    Posted 18 years ago #

    Hi Michael, I reckon that the answer could be in the code I've just posted here: http://mu.wordpress.org/forums/topic/151#post-2555

    That is, querying the database for this rather than running a separate aggregator.

    Anyone wanna try to hack this up?

  5. mspecht
    Member
    Posted 18 years ago #

    James give this a run

    <?php
    $doing_rss = 1;

    require('../wp-inst/wp-blog-header.php');
    header('Content-type: text/xml; charset=' . get_settings('blog_charset'), true);

    ?><?php echo '<?xml version="1.0" encoding="ISO-8859-1"'."?>\n"; ?>

    <!-- generator="wordpress/<?php echo $wp_version ?>" -->
    <opml version="1.0">
    <head>
    <title>HR Blogs OPML File</title>
    <dateCreated><?php echo gmdate("D, d M Y H:i:s"); ?> GMT</dateCreated>
    </head>
    <body>
    <outline type="text" title="hrblogs.org OPML file">
    <?php
    // Select Links from the current blog
    $blogs = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs ORDER BY blog_id ASC ");

    // Now loop througn the links for the current blogs
    foreach ($blogs as $blog) {
    $blog_id = $blog;
    $blog = "wp_".$blog."_options";
    $siteurl = $wpdb->get_col("SELECT option_value FROM $blog WHERE option_name='siteurl'");
    $blogname = $wpdb->get_col("SELECT option_value FROM $blog WHERE option_name='blogname'");
    $last_updated = $wpdb->get_col("SELECT last_updated FROM $wpdb->blogs WHERE blog_id = ".$blog_id);

    $siteurl = $siteurl[0];
    $blogname = $blogname[0];
    $last_updated = $last_updated[0];
    $feedurl = $siteurl."feed/";

    ?>
    <outline title="<?php echo $blogname; ?>" type="rss" xmlUrl="<?php echo $feedurl; ?>" htmlUrl="<?php echo $siteurl; ?>" />
    <?php
    } // end foreach
    ?>
    </outline>
    </body>
    </opml>

    There might be a couple of bugs as it is an extract of the program I am running at http://www.hrblogs.org/opml/opml-blogs.php which is merging a database driven directory of HR blogs I am hacking together.

  6. andrewbillits
    Member
    Posted 18 years ago #

    james, trust me when I say you are going to want to try mspecht's aproach before trying to mimick weblogs.com. I say this because I am currently designing a technorati type site and i'm burning through about 150GB of a month with just 20,000 test sites in the database. However, if you really want to go the weblogs.com approach contact me at the address below and i'll see what I can do about piggy backing a script onto my system for you since you only have a few thousand blogs.

    andrew/(/a-t/)/idtstudios.com

  7. Farms
    Member
    Posted 18 years ago #

    Thanks for that guys... will try it out later. AB that sounds a bit darn scary although we might be able to do something, let me toss this around a bit and see what I come up with. Thanks for the offer.

  8. andrewbillits
    Member
    Posted 18 years ago #

    btw, before I get bashed by morons. the "offer" was a free offer. the morons all know who they are... it's sad that i have to post disclaimers nowadays but whatever :P

About this Topic

  • Started 18 years ago by Farms
  • Latest reply from andrewbillits