status.net

07 Jan

Status.net Word Filter Plugin (Wordfilter)

Tagged code, Laconica, microblogging, php, plugin, profanity, status.net

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.

01 Apr

Status.net Plugin Developer Helper Plugin (PDhelper)

Tagged code, development, FLOSS, Laconica, microblogging, php, status.net

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 (
  • Other minor enhancements

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