Stop American Censorship StatusNet Plugin

Our ████████ ████████ may be at ████ if the ████/████ █████ are ██████. ██████ see ████://██████████████████.org for ████ ███████████.*


This is a simple StatusNet plugin that will add the 'Stop Censorship' banner and a link to americancensorship.org to the logo on an SN instance. I basically took the the code that's available at americancensorship and added it to a plugin script. (As a matter of fact, I copied the Awesomeness plugin and stripped it down to what I needed.) If I had actual PHP skills, this plugin would have options and stuff but I don't so there isn't any. So a little editing of the plugin script may/will be needed to adjust the banner for your site.

Censorship banner

First, download and extract the archive (censorship.tar.gz or censorship.zip) to your StatusNet plugins directory. If you use the tar.gz, you'll need to chown the extracted directory so that it matches the rest of your SN install. Something such as:

chown -R http:http Censorship

should do the trick, adjust the user:group as needed. To activate the plugin, add this to your config.php:

addPlugin('Censorship');

And as always after making a config change, run

php scripts/checkschema.php

to verify that everything is good to go.

Censorship banner 2

The plugin is setup to cover the StatusNet logo using the default 1.0.x 'Neo' theme as seen in above. If you are using a different logo, you may need to adjust the size and position of the banner. To do so, open the file plugins/Censorship/CensorshipPlugin.php in a file editor. Line 77 is where all the magic happens. You can adjust the width and height by editing 'width:158px;height:12px' and adjust the position with 'top:26px;left:0px'. (default settings shown for both)

So long as the plugin didn't get censored, you should now have a banner across your site logo.

Censorship banner 3

The Bearded monkey can be found at @gomerx's instance at http://dent.gomertronic.com/. Thanks @gomerx for inadvertently testing it out.

*Our internet freedoms may be at risk if the SOPA/PIPA bills are passed. Please see http://americancensorship.org for more information.


Have a response to this post? Please use this link.