Posts Tagged ‘wordpressmu’

Enabling skype: and sip: URLs in WordPress MU 1.5.1

Wednesday, June 11th, 2008

Last week when I put up my request for readers to dial into some sample voice applications, I received the feedback (ironically via Twitter) that my “skype:” and “sip:” URLs weren’t working. They appeared in the text correctly:

skype:+990009369996076704
sip:9996076704@sip.voxeo.net

but they weren’t “clickable”. Instead of launching your Skype or SIP client, they went instead to:

http://blogs.voxeo.com/voiplab/2008/06/03/got-a-minute-to-make-a-couple-of-phone-calls-to-generate-some-traffic-for-screencasts/+990009369996076704

http://blogs.voxeo.com/voiplab/2008/06/03/got-a-minute-to-make-a-couple-of-phone-calls-to-generate-some-traffic-for-screencasts/9996076704@sip.voxeo.ne

Neither of which worked, of course, so people got the good old 404 screen. (Some of you may know where this is going…) A quick look at the code showed the problem:

<a href=”+990009369996076704″>skype:+990009369996076704&t;/a> or <a href=”sip:9996076704@sip.voxeo.net”>9996076704@sip.voxeo.net</a>

The “skype:” and “sip:” URL prefixes were being helpfully stripped out when the post was being published! The links were then relative URLs which were of course bogus.

The solution turned out to be similar to what I could do to solve my embedding XML problem… modify the kses.php file. There at line 338 was this:

function wp_kses($string, $allowed_html, $allowed_protocols = array (’http’, ‘https’, ‘ftp’, ‘ftps’, ‘mailto’, ‘news’, ‘irc’, ‘gopher’, ‘nntp’, ‘feed’, ‘telnet’)) {

And so a simple change of adding ’skype’ and ’sip’ to the end of the list like this:

function wp_kses($string, $allowed_html, $allowed_protocols = array (’http’, ‘https’, ‘ftp’, ‘ftps’, ‘mailto’, ‘news’, ‘irc’, ‘gopher’, ‘nntp’, ‘feed’, ‘telnet’, ’skype’, ’sip’)) {

seems to have fixed the problem. I had to re-enter the URL prefixes on the original post, but now the “skype:” and “sip:” URLs do work in the edited post.

Fun, fun, fun…

Technorati Tags:
, , , ,

Adding video comments to WPMU using Seesmic’s new plugin

Thursday, April 24th, 2008

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…

Friday, April 11th, 2008

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:
, ,

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

Monday, December 31st, 2007

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:
, , , , , , ,