microblogging

Status.net Word Filter Plugin (Wordfilter)

The TWiT Network has pretty strict rules about profanity across all channels including the netcasts, chatrooms and the TWiT Army Canteen. There are usually moderators lurking the IRC and microblog but once in a while some profanity gets through the cracks. Therefore I wrote a little word filter to preempt the profanity.

Security and Privacy Implications of Framed URLs

burnurl.jpg

My last post focused on SEO drawbacks of framed URL shorteners which is mostly a concern for content creators. I later realized that URL shorteners which frame entire pages, like the Diggbar and BurnURL, are even worse than I originally though. These services are not only stealing page rank points (and arguably stealing content) they are shifting the third-party distrust to the target site and essentially become a man-in-the-middle.

Is the New DiggBar URL Shortener Bad for Sharing Links? - Updated

DiggBar

The bloggosphere is abuzz today about the new DiggBar but I have my reservations about the new, admittedly cool, multi-purpose link sharing tool. The concern is its impact on SEO ranking for links shared using digg short URLs. URL shorteners like is.gd are popular on Twitter, Facebook and FriendFeed because they look better and save characters. Most URL shorteners use an HTTP 301 redirect to forward browsers to the final URL which is the method recommended by Google. The DiggBar URLs on the other hand point to digg.com/<code> and use framing (nested iframe) to display the target page, a technique that was considered to be a cheap dirty trick to steal content back in the '90s. Example: http://digg.com/u13iq.

framing increases Digg's page rank, not the target

Framing has its advantages, for instance adding a digg button to any page, but it's bad for SEO page rank because search engines will see those URLs as links to digg.com, not the actual page. I thought that Digg might be checking the user agent string to detect the Googlebot, Yahoo Slurp or other indexers but after testing with the User Agent Switcher Firefox add-on and with Javascript completely disabled, DiggBar URLs always use framing.

If page rank is important to you I would suggest that you not use the Digg URL shortener. Instead, choose from one of these that use 301 redirects.

Status.net Plugin Developer Helper Plugin (PDhelper)

As with most open source projects, the Laconica (now Status.net) team focuses much more on development than documentation. That's not necessarily a bad thing for the project but makes it harder for third party developers. I had to use a lot of trial and error when working on the TWiT Army Laconica Plugin.

Here's where I had some trouble:

  • Finding the right hook to insert elements in specific places
  • Determining the 'action' name for the loaded page
  • Figuring out how to remove elements

For the last one, it turns out that returning bool FALSE for some hooks will prevent the default output. That was a good idea by the dev team. As for the first two, I decided to create another plugin that just spits some markers and useful PHP object data. You can see a demo of this plugin on my Status.net test site: status.kylehasegawa.com. Some of the markers are not in the body element so these markers are added as HTML comments. View the source of the test site to see these markers.

Comments, feedback, and suggestions are more than welcome. Full source code below the break.

Update v0.3 2010/01/05

  • Status.net v9.0 support (tested on 0.9.0rc2)
  • XHTML now mostly valid (<!DOCTYPE is not on line 1)
  • Other minor enhancements

TWiT Army Laconica Plugin

I was recently asked by my friends over at the TWiT Army to checkout the new Laconica plugin system in version 0.7.2.1. They wanted to know if it could be used to modify the default Laconica output on the TWiT Army Canteen, a feature currently handled by Javascript after the page is loaded. Javascript was used because it saves them from having to modify core code since core changes complicate upgrades. The downside of Javascript is that users see a brief flash of the original output before the JS runs. Another problem with JS modifications is that users who disable JS won't see the page as intended. I doubt anyone besides the TWiT Army will actually use this plugin but it's a decent example of how to use the plugin system so I hope it will be helpful for someone.

What the plugin does

  • Inserts 'apple-touch-icon' link in <head>
  • Adds 'helmetlink' and 'logolink' divs
  • Adds 'toplinks' and 'toplinks2' divs and lists (Live, Leoville, ODTV etc.)
  • Adds 'watermark' and 'bugle' div
  • Replaces nav links (tabs) on some pages

Custom "source" fields in Laconica posts using Curl

Some of my friends on the Twit Army have been asking how I was able to override the source string when posting microblogs. Here's an example of what I mean.

This is a normal post from the web


Notice that it says "from web".

This is a post from curl with the custom source


In this case it's "from a land down under ♫"

This is easily done with the command line tool "Curl" and the Laconica API

All code on this site is free for use at your own risk and provided as-is under the WTFPL license unless otherwise stated. Attribution is appreciated but not required.
Blog content, with the exception of externally quoted material, is licensed under the Creative Commons Attribution 3.0 license