Self-hosting video with WordPress and Hippie Hosting Co-op

I’ve been messing around with hosting my own videos, but that’s one area where the third party services have the functionality nailed. They magically transcode video file formats. They create thumbnails. They provided embeds to make it easy to use the video. But, Jim posted about how he’s having to take on some copyfighting, because YouTube is bending over for some pretty outrageous false copyright claims. The only way to prevent a third party from misusing your content is to not use a third party.

So… I took another look for a decent, fully-featured video hosting plugin for WordPress. And, I found one that looks pretty decent – the creatively named Video Embed & Thumbnail Generator plugin. It integrates with the WordPress media library, uses ffmpeg for transcoding and thumbnail generation, and provides a flash- and HTML5- embed for easy use of the videos.

It looks like ffmpeg doesn’t understand the “up” orientation flag on videos shot with an iPhone (and probably other devices), so the only caveat is that you have to be careful to hold the device so that it’s facing “up” (I actually had to figure out what’s the “proper” way to hold an iPhone – turns out, with the volume buttons on the bottom. oops.). Windows seems to have trouble with this, as well, showing photos and videos upside down…

all along the watchtower
[FMP poster=”http://www.darcynorman.net/wp-content/uploads/2012/06/20120616-214038_thumb1.jpg” width=”840″ height=”473″]http://www.darcynorman.net/wp-content/uploads/2012/06/20120616-214038.mov[/FMP]
Right-click or ctrl-click this link to download.

If you’re using the Hippie Hosting Co-op, ffmpeg is now available. After installing the plugin, set your “path to ffmpeg” setting to point to “/usr/bin”, and you’re off and running. Adjust the default settings however you like (I set mine to embed video 840px wide).

[FMP poster=”http://www.darcynorman.net/wp-content/uploads/2012/06/Screen-Recording_thumb4.jpg” width=”840″ height=”525″]http://www.darcynorman.net/wp-content/uploads/2012/06/Screen-Recording.mov[/FMP]

on a blog as a deadman’s switch

I’ve been thinking about what would happen to my online stuff, when I eventually kick off (hopefully not for several decades, but still…). This whole Reclaim stuff would mean that my online artifacts would disappear rather abruptly. That’s partially mitigated through things like the newly-minted Hippie Hosting Co-op, but what happens to my various account info? How would I hand that off, and send a message after, well, you know…

That’s where the idea of the internet deadman’s switch comes in. A bit of code that monitors for signs of life from me, and after I stop doing stuff it assumes I’ve kicked off, waits a predetermined period of time, tries to nudge me by email, and then sends off an email to my family.

It’s the kind of thing that probably used to be done through a hopefully-updated piece of paper filed with a will or stored in a safety deposit box. But it feels like it’s something that could be done rather trivially with some code.

Alan posted something along these lines this morning:

and that’s not a unique service – there’s also Dead Man’s Switch and likely a few others. But I’d rather not put that kind of info on someone else’s server – who knows if their server will still be running in a year, or 5, or 20. And who knows how many people would have access to the information on their server in the meantime.

That’s where the Next of Kin WordPress plugin comes in. It uses my blog as the deadman’s switch. If I haven’t done something on my blog in 3 weeks, it’ll send me an email to ask if I’m still around. It’ll wait a week, then send another, as well as one to a family member. After another week, it’ll assume that something rather dire has happened, and will send an email that I will have prepared in advance. Rather tidy. No fuss. All self contained here.

Of course, this assumes that I’ll still be using WordPress sometime in the future, and hosting my own blog. Safe assumptions for the near future, but who knows what happens if the plugin becomes abandonware and WordPress moves on without it. Or I move away from WordPress. Or this whole internet thing turns out to be just a fad after all…

indicating category in blog post autotweet

I’ve been using the Twitter Tools plugin to automatically post tweets whenever I publish a post here. Scott mentioned that with my recent consolidation, there are a fair number of tweets coming through the blog, and it’d be handy to have some indicator if it’s a tweet about a blog post (which he might bother to read) or a bit of ephemeral media (which he likely wouldn’t).

Nessmantweet

I couldn’t see a way to do that within Twitter Tools directly, so I wrote a VERY simple (and horribly ugly hackish) plugin to add that functionality. If it works (and I’m not anywhere near 100% confident that it will), then this post should show up on Twitter with a ” (blog)” appended to the tweet. Ephemeral media posts have ” (media)” appended. The ephemeral-appending-bit worked, but I’m not sure if it’s doing that for all posts, or behaving as intended. Only one way to find out…

*Update*: Well, whaddayaknow? It worked. Actual PHP code that executes without barfing out errors, and does what I intended. The wonders never cease…

Blogtweet

Important Links Widget plugin for WordPress

In setting up WPMU sites for classes, I often wind up using the Text widget to add a bunch of important links – login, Dashboard, Add Post, Add Page, etc… to each site. Manually. I finally decided to save some time and just write a plugin that provides a generic widget to give the links on any site that uses it.

If you’re not logged in, it provides a link to login:
not logged in

If you are logged in, it gives you some handy links:
logged in

I’ll eventually add a way to customize the widget (display Add Page? display Add Post? something else?) but for now, it’s an easy fire-and-forget widget for the most common links used by people in a course blogging site.

Get your copy over at the WordPress plugin repository: Important Links Widget

Trying WP-SpamFree

end-blog-spam-button-01-blackThanks to a tip from David Esrati (who I’m not going to link to from this post because I’m taunting spammers and don’t want to inflict collateral damage on him), I’m testing out WP-SpamFree which is a really interesting antispam plugin for WordPress. I’ve used Akismet and Mollom before, and I’ve always been uncomfortable with externally hosted antispam systems. For some reason, I’m just not completely comfortable with relying on another server for this. I’d used Spam Karma 2 with great success, but since that went defunct I abandoned it as well.

Now, WP-SpamFree seems to offer an intelligent antispam system without relying on external servers or blacklists. I’m giving it a shot. So far, it’s been pretty successful.

Let’s see how well it does. Bring it.

Cleaning up after Microsoft

mswordscreenshotI spend a depressing amount of time cleaning up after Microsoft. Specifically, cleaning up the “helpful” HTML code generated by MS Word and/or Internet Exploder on Windows when people copy content from MS Word and paste it into a WYSIWYG editor in Internet Explorer. Helpful, in that it tries (and fails so spectacularly that it boggles my mind how such a “feature” was designed) and more often than not completely borks whatever website is the unsuspecting recipient of the control-V-of-death.

I’m not going to tell people not to use MS Word. It’s what people use. Trying to get them to switch to anything else would be tilting at windmills. People use Word.

I’m not going to tell people not to use Internet Explorer. I don’t use it. Nobody I work with uses it. But people do – most often, it’s people who don’t really know what a “browser” is, or that there are options, or that IE is a dangerous beast. They use IE. Fine.

But… I just found a plugin for WordPress that should at least mitigate the damage of the Word/IE duopoly.

Here’s an example. I just worked up a simple document in Word. It’s pretty fantastic. I’m proud of it. Teacher will give me an A+, for sure. It looks like this:

msword_content

It’s a work of art. Now, I copy the contents of that fantastic piece of literature, and hit control-C to copy it. I switch over to Internet Explorer, and paste it into the Visual editor on a WordPress site. And it looks kinda like hell. The source code of the pasted content looks like this:

borkedmsonormalmarkup

WTF? MsoNormal? margins? font-size and font-family? For the love of Xenu, why do you bork my content like this? Now, most people just see the result and say “Man, does WordPress suck. I’m not going to use THAT again.” – they don’t realize that it’s Word/IE that’s borking their content, and that it would be equally borked on any web-based content management system that offers a visual wysiwyg editor.

So, after activating the plugin, pasting the same content from my most awesome Word Document into the Visual editor of a WordPress site generates code like this:

cleanedupmarkup

It’s not perfect, but it’s cleaner. Some of the formatting won’t be exactly what was in the MS Word document, but that’s probably for the better. Apparently, if I used proper styles to define Headings in my document, it would convert them to h1/h2/etc… in the pasted markup. Ahhh… much better.

If you’re using WordPress with people that are using MS Word and/or Internet Explorer, get the plugin. You’ll be doing them a favour, and saving yourself some grief.

WPMU Post and Comment Growth

The group of WPMU rockstars at UBC’s OLT just whipped up a fantastic new plugin for administrators of a WPMU site to get a feel for the growth of the community. It generates a graph to display growth in numbers of blog posts and comments over time, and uses the Google Data Visualization API to let you interactively define data ranges to be graphed.

Here’s the growth of UCalgaryBlogs.ca graphed for the last 2 semesters:

ucalgaryblogs-posts-comments

Another fantastic job by the OLT blogging platform crew. Now, to just add users and pages, and it’ll be perfect… 😉

private and group blogging with WPMU and WP-Sentry

I just pushed the latest version of the WP-Sentry plugin out to general use on UCalgaryBlogs.ca – any site can now enable it to have the ability to create groups and to set the audience for posts and pages. A site admin can create groups and put members of the site into any number of groups – which can also be hierarchically arranged – and then the members can decide who should be allowed to see the posts that they publish.

A workgroup could post updates that only group members can see (so a flood of group meeting notes doesn’t flood a blogsite used in a class of 300 students), or students could write posts on sensitive topics without worrying about it leaking out onto the open internet and into their permanent record.

The plugin is very well designed, and is easy to use. I’m going to be setting up a few sites using it as a means of managing information flow within large classes. One nice feature of the plugin is that it gives the ability to select multiple groups as the audience for a post, and to add individual member access, so you could invite someone in to view content without granting them full group member status. Very nice.

wp-sentry-audience-selection

So far, the only suggestion that I could think to make would be some way to provide a list of groups (a group directory page) that links to a page listing content published in a given group – a group home page.

I know there are people for whom the idea of “private” blogging makes them break out in hives. But there are valid cases for providing safe places for students to publish content without worrying about public exposure, and this is a fantastic solution to that problem.

Update: It hit me, shortly after hitting “Publish” on this post, that the WP-Sentry plugin would be a perfect fit for the other plugin I’m playing with – WordPress-Wiki – which allows for wiki editing of pages and posts by members of a WordPress site, but without needing to delve into geeky MediaWiki syntax. It tracks revisions, allows diffing of changes between revisions, and generates the table of contents based on the headings in the content in the same way that MediaWiki does. All the fun of wiki, without the geeky stuff or pain.

WP-Sentry + WordPress-Wiki, when combined, would let people create private (or public, or any variant in between) wikis for workgroups, as part of their regular blog or website publishing workflow. No extra software to learn, no new syntax, no new jargon. Just an extra couple of checkboxes and widgets to twiddle when publishing a post to determine who gets to see the thing, and whether it should be wiki. Very cool stuff, and it could become a powerful tool as part of a course blogsite.

Is Flutter a CCK for WordPress?

Following a thread through some blog posts this morning – I started at The Reverend’s post about Martha’s documentation of her hacking on WPMU, including a description of a WordPress plugin I hadn’t heard of before – Flutter.

Damn. The Rev’s gonna love this.

One of the things I LOVE about Drupal is the fantastic CCK plugin that lets me create compound structured content types without hacking the database or writing code. Things like Events. Profiles. Pretty much anything that can be stored as database records.

Flutter appears to do most of what I use CCK for. It’s a bit of a hack on top of WordPress’s custom fields design, but whatever. I really don’t care how it works under the hood. It works. And it’s really nice. You can create any number of custom content types, groups that can contain any number of fields – and the fields can be simple text strings, long text chunks, images, audio, dates… Very cool.

So far, the only thing I’ve found really missing from what I use in CCK is the idea of linking nodes (or posts or pages – I haven’t seen a way to select a page or post as a field in another – but that’s not fatal – tags and categories can make up for some of that).

I’ll be playing with Flutter over the next few weeks. I think this might go a LONG way to implementing some of the things I’ve been thinking about wrt WordPress as a course blogging and publishing platform – WITHOUT HAVING TO WRITE CODE.

I love that. Thanks to Martha and Jim for the heads up on Flutter!

Update: doh. Looks like Flutter does some unpleasant things to the main Write Post interface as well – it was wrapping this post to a set width, making it look ickyier than usual. hrm…

yeah. definitely not quite ready for prime time. but still, something worth keeping a close eye on. this could really make some interesting things possible with wordpress…

Update 2: the evil russian spammers seem to REALLY like this post, so I’ve closed comments. Sorry. stupid russian spammers…

UCalgaryBlogs.ca now protected by Akismet

I got word back from Akismet that using it on UCalgaryBlogs.ca to protect all of the blogs hosted there falls under the free license, despite the wording on their website that suggests it’s an enterprise use. This means I’m now able to protect all blogs on the service with Akismet, without requiring a Captcha challenge.

The current version of the Akismet plugin for WordPress installs just fine in the mu-plugins directory, meaning each blog automatically gets protected, without any configuration or setup. The Akismet key can be hardcoded into the plugin file, and when that is done, all configuration interface magically disappears from the wp-admin interface. Easy peasy.

All that was required by Akismet was that I provide a link from each blog to Akismet.com to give credit for the spam protection. I wrote up a VERY simple mu-plugin to automatically insert the text and link in the footer of each blog on UCalgaryBlogs.ca.

I’m curious to see how well Akismet functions on some of the topics of conversation – some post colonial courses commonly use language that trips up word filters pretty readily…