Building the ETMOOC Blog Hub (part 1)


cc licensed ( BY ) flickr photo shared by agiledogs

I’m really getting the hang of setting up these FeedWordPress powered syndication sites- I wrote a few days ago about using this approach to create a twitter archive site for the ETMOOC site. At the same time, and more over the last few days, I have been tweaking the edges and putting into motion what should be a core of the site, the aggregation site for participants in the MOOC which starts next week.

Alec Couros has that draw power! I heard well over 1000 people signed up; the ETMOOC Google+ Community is brimming with intros of educators from all levels and corners of the world.

As a little bit of architecture, the main ETMOOC site (http://etmooc.org/) is running WordPress multisite, using URLs for subsites, and I have rolled out the two extra sites, the Twitter Archive (http://etmooc.org/tweets/) and the Blog Hub (http://etmooc.org/hub).

As of tonight, we are syndicating in 65 blogs and everything is humming nicely with 165 posts brought in:

blog hub

Check it out now at http://etmooc.org/hub. This post is more a run down of the WordPress mods to organize the site; in a next post I will go over the process for getting blogs into the mix.


For the sites I have worked on, I am cloning them from the stock Twenty Eleven theme they firsts et up, with just a modified banner. To make the sites feel cohesive, I am trying to replicate the same menus structure across the three sites (which means copying a menu addition or change over to 2 other blogs; there’s likely a plugin that does it ?) and keeping the top of the sidebar consisten as well with the logo and the social media icons.

faviicon-etmoocAs people bop around, they likely will not know they are moving across blogs.

And just because it is a small detail, I made a favicon.ico based on the little brains in the logo; putting this in the root directory keeps web browsers from showing that ho hum blank document one in tabs and URL bars.

Details matter.

tags-etmoocThe Feedwordpress part is straight forward. We are not categorizing the feeds, so all I have is on import, I am converting all incoming tags and categories from blogs to WordPress tags, we get a tag cloud happening on the sidebar.

The work now is adding feeds to the system (more on this in a later post).

Also, like I explained before in setting up the Twitter Archive theme, I make a new child theme, so I can customize the output as needed. Not too many files need mods (so far)

child theme

The main change is in content.php which forms way a blog post appears everywhere in a list of other posts; rather than displaying the full post, we want the teasers (since the links go to the original blog. So I use the_excerot() in plance of the_content():

<div class="entry-summary">
   <?php the_excerpt(); ?>
</div>

Another change is that we don’t need the date/time/author meta data to link to an author’s profile, since there are not really blog authors; I wanted to change up the bit from the default:

before

to something more related to the way we are using WordPress here:

after

The link actually goes to the same place, an author archive, but we want to treat this less as a blog full of authors and more like a blog full of blogs.

The Twenty Eleven theme pushes this template bit out to a function you find in functions.php (twentyeleven_posted_on()) so to change that up, I copied the original function code from the parent theme to a new functions.php file in my child theme. I then started picking it appart to get the output I wanted:

unction twentyeleven_posted_on() {
	/*
	 post metadata - override the default we don't need author link, just
	 the date and time of the original post and a link to author archives
	*/
	
 printf( __( '
     <span class="sep">an #etmooc participant blog post published on </span><strong>
     <time class="entry-date" datetime="%1$s" pubdate>%2$s</time>
     </strong><br /><a class="url fn n" href="%3$s">see 
     all syndicated posts from this blog</a>', 'twentyeleven' ),
 esc_attr( get_the_date( 'c' ) ),
 esc_html( get_the_date() . ' at ' . get_the_time() ),
 esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) )
	);
}

I like the page navigation plugin I used on the other site, so that was easy to get in place, but I changed the text that appears below to list the number of blogs we are currently aggregating:

page navi

This took a little bit more code. Feedwordpress stores all of the feed info in the WordPress Links structure (I wonder how the new change in WordPress 3.5 might change that? another day..) – so to get a count we need simply to count the number of links in the “Contributors” category (the category of links). I wrote a function to do this which depends on getting passed a variable which is the database ID for the link category:

function get_link_count($catid) {
  //get link count for link category id 
	
  $linkcat = get_term( $catid, 'link_category' );
  if ($linkcat) {
    return ( $linkcat->count );
  } else {
    return (-1);
  }
}

If for some reason, we fail to get the link category, we return an error code of -1; otherwise the value is the number of links in that category.

This means I make a copy of index.php from the parent theme, and replace the page navigation calls in the template with:

<?php  if ( function_exists( 'page_navi' ) ) page_navi();?>

<?php $blog_count = get_link_count(2); ?>

<?php if ( $blog_count > 0) : ?>
	<div class="pcount">syndicating 
	 <strong><?php echo $blog_count ?></strong> 
	 unique #etmooc blogs</div>
<?php endif?>

I thought we might want to do things to identify “featured” posts, which I hope to recruit some volunteers to do, simply quick edit a syndicated post and add the “Featured” category. This means we get a category listing and with the Category Post Widget plugin, I can add a sidebar thingie that lists the most recent posts just in that category.

I plan to add some custom CSS to make those featured posts stand out a bit more.

Also on the sidebar is another widget which randomly lists 5 of the blogs we are syndicating – again, knowing these are stored as links, I put the Better Blog Roll plugin to work, which creates a widget where I can have to diplay 5 links at random.

And that’s mostly what I have so far for the site set up. In Part 2, I go into more detail on how we are dealing with getting the blogs into the system.

Creative Commons License
Building the ETMOOC Blog Hub (part 1) by CogDogBlog, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

10 Responses to “Building the ETMOOC Blog Hub (part 1)”

  1. jacbalen says:

    Hi Alan,

    It is nice to meet you virtually. I can only say that the work you do is magic. (Electricity does live in the walls, right?) I cannot in all right mind comment on upon it. My apologies.

    But, I can comment on the dog analogy. It’s hilarious! I am a dog lover through and through. I have had in my life a hound/beagle/heinz57 mix, Napoleon, a malamute/collie/wolf mix, Akaela, and now three dogs- a rescue of unknown breeds, Baloo, and two border collies, Satchmo and Hawkeye. Each comes with his or her own story….which one captures your imagination?

    Julie

    • Hi Julie,

      Thanks for the kind words and dog kinship.

      You putting a dog quiz on me? I have to CHOOSE? I am slightly partial to unknown breeds and mixes…

      • jacbalen says:

        Ah well, unknown and mixed breed it is. I have two to choose from, but I will choose the first dog because I have been thinking about him a lot recently.

        When we, my husband and I, adopted Napoleon from the SPCA in downtown Toronto we were young, newly married, and childless. We didn’t need a dog. We lived in a city that had not yet created spaces for dogs. How unfair to the dog! No backyard. No dog parks. What were we thinking?

        But, you see, I had a crisis on my hands. Like many young couples one of the games we played was “what would you name your baby.” My husband’s paternal grandfather, who he had never met, was named Napoleon. This is a ridiculous name! We laughed and chatted about the short versions: Nappy, Leo, Leon.

        Very amusing…until over time, my husband’s tone about this name … changed. I could hear it in his tone when he said the name. I could see it on his face as he considered the name out loud…it’s such a proud name, it’s got history behind it, it’s so worthy. I could not have my first born son named Napoleon!

        I planned and schemed and waited for the right moment, and then I said to him, “I think we should get a dog.” Driving home from the SPCA, with puppy in lap, I wondered out loud, “Why don’t we call him Napoleon?!”

        My first born son, Paul, is greatly relieved.

        Here he is, on the right, with a close friend, many years ago. He was a great dog…lots of personality, smart, and tolerant of kids.

        http://dropcanvas.com/jeth8

        For the love of all dogs happy etmoocing in week 2.
        Julie

Leave a Reply

Recent Barks and Howls: