Email subscription now available for this blog - and the challenges therein

April 29th, 2008 by Dan York

As noted over on our Voxeo Talks blog, I’ve now set up an email subscription option to our “All Voxeo Blogs” feed through Feedburner. For a reason I’ll discuss below, I’ve only enabled it for our all blogs feed.

However, given that this “Behind the Blog” blog is different from all of our other blogs, and also, quite frankly, because a reader requested it, I’ve also enabled the email subscription option for this particular blog. You can subscribe to just this blog via email by either entering your email address in the box in the far right sidebar - or by clicking this link. Follow the link in the confirmation email and, ta da, you’re done.

So why haven’t I done this for all of our individual blogs?

Simple. I can’t easily automate it and have it appear in the same place as the other subscription options.

Let me explain a bit more. If you go to our main portal page of blogs.voxeo.com you will see in the first sidebar under the heading “Subscribe” a link that says “Subscribe via email“. Click on that and a confirmation email later you are subscribed to the “all blogs” feed. Nice and easy.

We use Feedburner for all of our feeds mostly to get the stats and also because it provides nice options like this email subscription option.

Here’s the thing. That “portal” page uses its own unique WPMU “theme” (very creatively called “voxeo-home”) to deal with how we present entries across all blogs and other ways in which we want to make the portal page different from our regular blog pages. Because it is using its own unique theme, it’s trivial for me to add the “Subscribe via email” link. I just go into “sidebar1.php“, find the right place and add the link. Piece of cake.

However, all the actual blogs on the site use the same WPMU theme (”default”) and so they have the same sidebars by default. The problem, though, is this:

Each blog has a unique Feedburner email subscription URL.

So I can’t just add some magic to template sidebar and have this automagically work. As I’ve thought about this, I see a couple of choices:

  1. Add only the All Blogs email subscription option - This is what I have done now. I’ve gone into the sidebar1.php file for the template and added the link to subscribe to the all blogs feed via email. This is simple and consistent with the other formatting. The problem of course is that it doesn’t let readers subscribe to only the blog they care about. Readers of this blog about WPMU may not care about all the other stuff we’re doing at Voxeo. Readers to “Speaking of Standards” may only be interested in our positions on standards. I’d like to offer the option. This choice doesn’t provide that option.
  2. Manually add widgets to the blog sidebars - That’s what I’ve done here on this blog where I’ve added the widget over in sidebar 2 using the standard way to do so in the WP “Presentation->Widgets” menu. The good news is that I can offer the option, but the bad news is that it is off in a different area from the “Subscribe” options over in sidebar 1. (And for whatever reason, I can’t get the darn widget to say “Subscribe via email” on top, but that’s a different issue that I’m sure I’ll eventually sort out.)
  3. Write some WP code to modify the template - I suspect the real answer is to write a WP function that grabs a URL from the database and inserts it in the relevant spot. In that way I’d enter the URL for the Feedburner email subscription for each individual blog into the database and then modify sidebar1.php in the theme to call the new WP function, which would pull the blog-specific URL from the database and insert it. Sounds cool… but I also don’t see me having the cycles to do that anytime soon.
  4. Search for a plugin that does #3 - I suppose the other thing I can do is to search for a plugin that does what I described in #3. This involves searching through the various directories of plugins, trying out the code to see if it works with WPMU, etc. Maybe there’s one out there. (Heard of one?)

That’s why I haven’t yet rolled out email subscriptions for each individual blog. Have any of you out there solved this issue? What have you done? Is there a plugin you use for WPMU?

Technorati Tags:
, , , , , ,

Adding video comments to WPMU using Seesmic’s new plugin

April 24th, 2008 by Dan York

seesmiclogo.jpgIf you look down in the comments area of this - or any other blog post - you’ll now see a link that says you can add a video comment:
seesmicvideocomment.jpg

What’s going on? Well, I’ve added a new video plugin for Wordpress from the folks at Seesmic. Here’s brief video intro from me:

The plugin was announced yesterday on Techcrunch and also on (Seesmic founder) Loic LeMeur’s blog. The folks at Seesmic even nicely created a little YouTube tutorial about the plugin:

Adding the plugin to WordPress MU was very straightforward. I downloaded the code, unzipped it and copied the directory into the “plugins” directory (NOT mu-plugins). I then went into Site Administration -> Plugin Commander and clicked on the “Allow” link to allow individual blogs to have this capability. Next I went into the admin dashboard for this blog and enabled the plugin for this blog. Ta da… video comments and embeds into posts are now enabled.

Why didn’t I just enable it across all blogs? Well, I like the granularity of being able to enable or disable it on a per-blog basis. The reality is that I’ll probably enable it for all the blogs on this site that I primarily run. But we may have other blogs here that others run (as Chris does with the Voxeo Labs blog) where they don’t want to use video.

One note I should make. In the Seesmic plugin configuration (for each blog), I have opted to allow “anonymous” video comments, meaning that someone does not need to have a Seesmic account in order to leave a video comment. There’s a checkbox there that enables that kind of posting:
seesmicanonymouscheckbox.jpg

Now, the one down-side I’ve already discovered is that in order to use it to embed a video in a post like this, I have to use the WordPress web editor to write my post. However, I almost never use this web editor because I’ve gotten very addicted to doing all my blogging offline using MarsEdit. However, I think odds are that when I want to embed a video, I probably won’t want to write as much text, so I probably won’t need all the shortcuts that I’ve gotten used to in MarsEdit. (I may also be able to go into the web editor, record and embed the video, save it as a draft, and then pull it down into MarsEdit and do further editing there - I’ll have to try it.)

Outside of that, it seems like a cool way to add video into the blogging platform. Let me know what you think. Hey… if you have a webcam, you can leave me a video comment!

Technorati Tags:
, , , , ,

WPMU mu-plugin to list most recent posts across all blogs coming soon…

April 11th, 2008 by Dan York

As I’ve had now several requests for more info about what we did on our main page to list the most recent posts across all blogs, I just thought I’d put up a note to say that I will be posting the plugin script and writing more about that soon. I just need to clean it up a bit more and create a page with more info. It’s almost there…. sometime in the next week or two, hopefully.

Technorati Tags:
, ,

WordPress 2.5 is out… now to see when WPMU will update

April 2nd, 2008 by Dan York

wordpress.jpgWith WordPress 2.5 now out, we’ll be watching to see when WordPress MU gets updated. Of the long list of WP 2.5 features, the one that is honestly of most interest to me as the one running a blog site is of all things the improved editor:

Friendlier visual post editor — I’m not sure how to articulate this improvement except to say “it doesn’t mess with your code anymore.” We’re now using version 3.0 of TinyMCE, which means better compatibility with Safari, and we’ve paid particular attention this release to its integration and interaction with complex HTML. It also now has a “no-distractions” mode which is like Writeroom for your browser.

I don’t use the visual post editor myself - I do all my posting through the MarsEdit offline blog editor - but as I’ve been helping others post to this site, I’ve seen the existing editor as one of the things that sometimes causes challenges. So I’m looking forward to the new editor.

All the other features look good, too, so it should be an interesting release to get into place. Per a thread on the WordPress MU forums, though, it may be a little bit before WPMU comes out with a new release in sync with WP 2.5. As noted in that thread, WordPress.com needs to be updated first. We’ll see. This will be the first WordPress MU upgrade we’ll have done to this site, so it will be an interesting learning experience for us. Will the “upgrade” features of WPMU work as well as we would hope they will? :-)

Technorati Tags:
, ,

The challenge of embedding XML into a WordPress MU blog entry

March 31st, 2008 by Dan York

Given that we work with XML, we naturally want to include XML inside of our blog posts. However, that turns out to be a bit of a major headache. Over on our Voxeo Developer’s Corner blog, you can see what we are trying to do with posts like this one. We want to include snippets of XML code, complete with angle brackets, etc.

Obviously this can be done through good, old “HTML character entity substitution. In order to get:

<prompt>

we simply enter it into WordPress MU as:

&lt;prompt&gt;

We can do that - and certainly any number of text editors make it now easy to go through and swap all symbols over to their corresponding HTML character entities. But this is rather a pain in the neck. You have to bring the code into one of those editors, select the entire text, and then execute whatever script you use to to the character conversion. It takes a little bit of time and when you are trying to get folks like our busy support team to also contribute blog entries, you want to reduce anything that adds time to the posting process.

What I was ideally trying to do for our authors was make it so that they could do something like this:

<code>
… XML code…
</code>

With something like this, they could simply copy/paste their XML code directly into the WPMU editor and… ta da… publish the post. In trying to make this ideal a reality, I worked my way through installing a number of different “code markup” plugins for WordPress:

I also looked at Code Viewer but really did not want to store the XML code in separate files.

I installed each of these (in some cases multiple times), read and re-read the instructions, added the appropriate markup (usually <code>) around the block of code, published the entries and…

Nothing.

All the posts looked horrible and didn’t display any of my XML code. This was all incredibly frustrating and after spending a sizable chunk of my time trying to make this work, I finally posted my problem on the WPMU Forum and soon received my answer.

It turns out that WordPress has a file called “kses.php” which lists all of the tags that are allowed inside my post. Any tags not in the allowed list get stripped out! This obviously occurs before the code markup plugins step in and do whatever conversion they do of the code into HTML character entities. So… all my XML code appears to WPMU as regular tags, which, because they aren’t listed in kses.php get stripped out.

Oops.

The end result is that it appears that I have two options:

1. Enter all the relevant VoiceXML, CCXML and CallXML tags into kses.php so that they are allowed; or
2. Keep on doing it the text editor massive replace route.

Given everything else on my plate, we’re going to reluctantly have to stick with #2 and just keep on replacing the symbols with HTML character entities before copying/pasting into WordPress’ editor. It’s a pain - but I don’t see an option until either I find another solution or get the time myself to update kses.php.

If anyone reading this knows of another option, I’d love to hear it.

Technorati Tags:
, , , , ,

Supporting OpenID, part 2a: Setting up WPMU to accept OpenID logins

January 11th, 2008 by Dan York

As I noted in my last post about OpenID, the second and more difficult aspect of implementing OpenID is to enable this site to accept OpenID logins for comments. In the comments to that post, Jeff Waugh replied today indicating that he had ported WP-OpenID over to WordPress MU.

Naturally I headed over to Jeff’s post as soon as I saw it. Since I had already downloaded WP-OpenID, I just needed to reference his bug report for the instructions on how to patch the plugin. Well, that and I needed to download the diff file (Note: from the dev.wp-plugins.org page, the “attachment” link brings you to an HTML-ized version of the diff file. To get the “raw” version, you need to select the “Original format” link at the bottom of the page (or follow my link here).)

However, although I followed the directions at the bottom of the page, it sadly didn’t work. In some correspondence with Jeff, I think the issue may lie in the fact that we use our own custom theme - and we may need to tweak that to support the OpenID plugin. However, in doing this, as you can see in the comments to his blog post, I ran into some other issues which seemed to expose problems with the existing WP-OpenID plugin. Basically, the WP-OpenID plugin upon which his work is based seemed to only accept OpenID URLs from direct OpenID providers (ex. claimid.com). When I entered my LiveJournal OpenID URL, that didn’t work because it actually redirects to another URL. Similarly, using “blogs.voxeo.com” as my OpenID URL didn’t work either, nor a number of other ones.

Not realizing that he was in Australia and it was approaching 4am, I wound up in a good chat session with Jeff trying to debug the issue. Eventually he needed to get some sleep and so we parked it for another time. So we move closer… I think I’ll wait a bit until Jeff gets a chance to dig a bit more into the OpenID cases that were failing. Once he’s got it thoroughly working, I’ll take a look at how to make it work with our theme. Interesting stuff (to me, anyway).

Technorati Tags:
, , , , ,

Modifying the WPMU comment field to reference a comment policy

January 10th, 2008 by Dan York

As noted on our Voxeo Talks blog, we now have created a “Comment Policy” regarding comments posted to this blog site. When you go to fill out the comment field on a blog entry we have some text below that field and before the submit button that basically says that in submitting the comment you agree to comply with our Comment Policy. This all came about after one of our recent posts attracted some comments that made us concerned that we were not stating what we would and would not permit to be posted.

Creating the “Comment Policy” page was a simple matter of creating a new “Page” in the top-level blog here on the site. This is what you see when you hit blogs.voxeo.com. As I think I’ve noted before, this top “portal” is, in fact, just another WPMU blog, but we’ve set it up so that the main page does not allow actual postings, but rather displays the latest posts across our various blogs. So there will never be any actual “posts” in that particular top-level blog. There can, however, be pages, and they will appear in the sidebar where it says “Pages”. The nice thing about this is that you also quickly get an easily-referenced URL that you can use in other places. In this case, that URL is “http://blogs.voxeo.com/comment-policy/

The next step was to modify the comment field across all the blogs here to include a reference to the comment policy. Because all of our blogs use the exact same theme, this, too, turned out to be a relatively trivial exercise. I just went into our theme, which is actually named “default” in our case and found the file “comments.php”. Down on line 97, I inserted a simple <p> paragraph (shown in blue):

<p><textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4"></textarea></p>
<p><em>Please note: By submitting a comment you agree to comply with our
<a href="http://blogs.voxeo.com/comment-policy/">Comment Policy</a>.
We welcome all comments, positive or negative, but do reserve the right to remove
all or part of blog comments that do not comply with our policy.
</em></p>
<p><input name="submit" type="submit" id="submit" tabindex="5" value="Submit Comment" class="commentsubmit" />

This is now visible below the comment field in all of our blogs. That was it… nice and simple.

Now, the one remaining thing I would like to do is to add a link that says “Comment Policy” underneath the “Pages” heading in the sidebar of each of the blogs here. Right now it only appears under the Pages heading on the top-level site (blogs.voxeo.com). I’m not entirely sure how I’ll do this yet. That block in the sidebar is automagically generated with the various “pages” created for the specific blog. Obviously, I could simply create a new page called “Comment Policy” in each blog and copy/paste the text into it, but that: a) is more manual work than I want to do; and b) could lead to the comment policies on blogs being out of sync if we update the main one. So I need to figure out a way to link to the main comment policy. What I might simply do is create a new entry under “Links” in each blog that goes back to the main comment policy. The other option might be to see about doing some kind of “include” macro inside the pages that brings in the contents of another page (if such a thing exists). I’m definitely leaning toward the Link option as the simplest, even if it means that the “Comment Policy” link will appear in a different place on the blogs than it does on the main home page.

We’ll see. In the meantime, we do now have some text in the comment area of all of our blog entries. If you have suggestions for how you’ve done something like this, please feel free to leave a comment. (Subject, of course, to the comment policy! ;-)

Technorati Tags:
, , , , , ,

Connecting WordPress MU to Twitter to auto-tweet new blog posts

December 31st, 2007 by Dan York

twitter.pngGiven that over the past year Twitter has emerged as one of the new communication tools within social media, one of my natural reactions was to figure out how to connect this blog site to Twitter so that a post/tweet would appear in twitter.com/voxeo whenever we posted a new article. (If you are not aware of Twitter, my external “The 10 ways I learned to use Twitter in 2007” should give you an overview.) My main reason for wanting to do this was to provide another way for people to stay up on what we post here. For some people, myself included, it’s easier to follow someone on Twitter than even to subscribe to their RSS feeds. So I wanted to make it easy for someone to “follow” the posts we create here on blogs.voxeo.com.

My first instinct was to simply go over to Twitterfeed.com and set up a link between our RSS feed for all posts and our new Twitter account. This undoubtedly would have been the simplest path to go - and one I’d probably recommend for others. There were however, several problems/challenges/concerns:

  1. Twitterfeed.com requires the use of OpenID to login, which, as an OpenID advocate, I delight in. However, I wanted to create the feed using a Voxeo-related OpenID versus one of my own, so first I needed to go and turn this blog site into an OpenID provider.

  2. My second concern was just that Twitterfeed.com seemed somewhat inefficient in that it has to poll to find out if you had new posts to tweet. There’s naturally the potential time delay from posting… and also just the general inefficiency. We are not posting here all that often and don’t need the feeds checked all that much.

  3. My third concern was the issue of introducing yet another site in between this site and Twitter. Given Twitter’s API, it seemed logical that we could connect directly.

  4. By the time I got the site set up to provide OpenID, Twitter was experiencing some performance problems last Friday and the Twitterfeed.com site was also offline.

This last issue caused me to decide I had to solve the problem on our own server so that we aren’t dependent on another site.

A Google search brought me to the “Twitter Updater” plugin for WordPress which, on first glance, seemed to provide exactly what I was seeking. I followed the instructions, activated it for one of the blogs, filled in the credentials, posted a test post and……. nothing. No Twitter post. In further reading down the page, it became clear that the developer stopped further work on this plugin and in fact moved her blog from WordPress over to Drupal and so had no real interest in the plugin anymore. I tried a hack by another user, but it, too did not work.

Meanwhile a friend had recommended that I use Alex King’s great “Twitter Tools” plugin. I actually had it installed, but hadn’t really thought about it for purely posting to Twitter. The strength of the Twitter Tools plugin is really about taking your updates from Twitter and posting it to your blog (which the README clearly shows). However, in our case, we’re not going to be (or don’t expect to be, anyway) posting independently to twitter.com/voxeo. It’s just another publishing medium for us - a one-way publish out to the world of Twitter. So we don’t need to publish our tweets here because there won’t be any.

This is, however, the solution I ultimately used. I activated the plugin for one of the blogs on this site, configured it with our Twitter username and password and then changed the settings so that it was only publishing outbound to Twitter.

There was one change I did make to the PHP code. By default, every new blog post appears in your Twitter stream with the prefix “New blog post: “. However, since our Twitter stream is only new blog posts, this prefix is redundant and wastes some of our precious 140 characters! So I modified line 75 and 76 of “twitter-tools.php” from this:

$this->tweet_prefix = 'New blog post';
$this->tweet_format = $this->tweet_prefix.': %s %s';

to this:

$this->tweet_prefix = '';
$this->tweet_format = $this->tweet_prefix.'%s %s';

You can see the result now over on twitter.com/voxeo.

A couple of notes about this implementation:

  1. The good news is that this posts to Twitter as soon as we publish an article to a blog. No polling. No waiting. No reliance on a site in the middle (Twitterfeed). Just direct from our site to Twitter via the Twitter API.

  2. The good or bad news, depending upon your perspective, is that the plugin needs to be activated separately for each of your WPMU blogs. If you have a lot of WPMU blogs and all you want to do is take all the blog posts and post them to Twitter, you are probably far better off taking the Twitterfeed.com route and simply linking a site-wide RSS feed to a Twitter account. In our case, we don’t have a large number of blogs and while we anticipate adding a few more, we don’t expect to add a huge number. Activating/configuring this plugin is now something I’ll just add to my “provisioning checklist” when rolling out a new blog.

    Note that on the good news side, we do now have a much higher degree of control over precisely which blogs post to the Twitter.com/voxeo account. Because we have to manually configure it, we wind up having the flexibility to not configure certain blogs, so that their postings do not appear in the Twitter.com/voxeo stream. We also have the flexibility to configure a certain blog to post to a different Twitter account. That’s not something I see us doing, but we do now have the option, which we wouldn’t if we simply connected our “all blogs” RSS feed to a Twitter account.

  3. Do note that since we are using WordPress MU, after dropping the Twitter Tools plugin code into the “plugins” directory, I did need to go into the Site Admin page for the site and “allow” the use of the plugin for blogs on the site. After that, I could go into each individual blog, activate the plugin and then configure the settings.

  4. I have the plugin activated currently in four blogs and all are configured to post to the same Twitter account. Everything seems to be working fine.

So there it is… how I linked our WordPress MU blogs to Twitter to publish notifications to the Twitter account when we post new blog entries. Hopefully some of you out there will find this helpful.

Technorati Tags:
, , , , , , ,

Supporting OpenID, part 1: Enabling the WPMU site to be used as an OpenID provider

December 28th, 2007 by Dan York

561B4AF1-C5A5-4363-B67E-E01ADD90084E.jpgI am a big fan of OpenID for a range of reasons, some of which I articulated here, Why bloggers should learn about OpenID, and others I have outlined in my other blogging about identity issues and discussed in a Security Round Table podcast about OpenID (the show notes for this podcast, by the way, provide a very large compilation of links to learn all about OpenID). So an objective I have is to make this blog support OpenID.

There are really two different aspects to “supporting” OpenID. First, a blog, or any other website, can be an OpenID provider in that it can be the source URL used as an “OpenID URL” to login to a site that supports OpenID. Second, a blog can support logins using OpenID.

The first part is the easiest and I’ve done this now using the “OpenID Provider for WordPress MU” plugin. Extremely simple to use. Just download, unzip, and drop the one PHP script and a subdirectory into your “mu-plugins” directory. Ta da. It is activated by default and now you can login to other sites with the URL of your blog (and, naturally, having logged into your own blog with a valid username and password).

How does this work in practice? Well, over on my LiveJournal blog I replied to a comment using OpenID to login. Here’s how the result looked:

ljopenidcomment.jpg

You can see the OpenID logo next to my name and then the URL for the main blog site. I chose to login with the OpenID of “http://blogs.voxeo.com/” but could have equally logged in with any of the actual blogs. (As far as WPMU is concerned, the portal page is one of the blogs… we’re just not using it in that way, i.e. there will never be posts to the “blog” that is our portal page.) What I am not showing in a screenshot is the intermediary step where I was presented with a page on my WPMU site where I had to authorize www.livejournal.com to obtain my identity information. I’m just showing the end result.

There are a couple of advantages to this. First, I can now have a work identity that is associated with my employer. Second, from a marketing point-of-view, I’m leaving the URL of my blog there in the comments for the post. Other readers can then click on the link to come back and visit this site. Third, as a user, I didn’t have to re-enter all this information to leave a comment. I just entered my OpenID URL, authorized the requesting site to use my identity and… ta da… there it was.

So that’s the “easy” part of turning your site into an OpenID provider. How about having this site support OpenID for comment logins? Welllll… that’s turning out to be a bit more challenging. In researching the matter, it looks like most folks are using the plugin “WP-OpenID“. I’ve downloaded and installed it, but because we do not have PHP 5 installed, I am experiencing the problems outlined in this support forum post: “Fatal Error / Parse error in Yaris.php when WP-OpenID activated“. I’ve modified the script as noted in the comments but am getting the “implode” error identified at the end by “ericabiz”. Once I either: upgrade to PHP5; wait for the authors to come out with a new rev; or find another solution; I will then write “Part 2″ about OpenID.

Technorati Tags:
, , , , ,

A key factor to a successful WPMU install? Make sure you have “php-mysql”!

December 28th, 2007 by Dan York

wpmulogo.jpg

When I started the WordPress MU installation, I was very careful to step through the installation process outlined in the README file. I made sure MySQL was working. I made sure PHP was working. I stepped through the installation web page that you get. It seemed like I was doing everything exactly as I was supposed to do.

However, I was getting a completely blank page! Nothing at all. A 0-sized HTML page. And no PHP error logs. Nothing. I was completely and utterly confused and after spending the better part of a day trying to figure this all out was about ready to give up completely on WordPress MU. I posted to forums. I went on the #wmpu IRC channel. I bothered friends…. I believe it was ultimately someone in one of the Skype public groupchats I monitor that helped me out… I communicated with a ton of people that day!

In the end, it turned out to be one little command that was all that was needed:

# yum install php-mysql

You see, I was using a stock Fedora Linux installation and it had both PHP and MySQL installed, but did not have the package that glues them together installed. Oops.

One ‘yum’ command later and everything was working fine. The installation went ahead just as the README file said it should. All was good.

The good news out of all of this was that I learned an incredible amount about PHP and MySQL, both of which I had not really used in any serious way for a few years. I also became very good at doing a WPMU installation! (since I kept blowing away my installation to try it again!)


UPDATE 25 January 2008: In the comments to this post, Garth Roxburgh-Kidd has indicated that the command to do this update on Red Hat Enterprise Linux 4 (RHEL) is this:

# up2date php-mysql

Thanks, Garth!