04/01/2009
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