whird.jpope.org cover image

Wunderbot Update

This is a quick update to announce that my Wunderground bot plugin for StatusNet has gotten a couple of new features since it's initial release. The first one is that if a US zip code or Canadian postal code isn't supplied in the notice to the bot, it'll attempt to get the users location from the notice. This info is attached to the notice only if it has been allowed by the user (it may be turned on by default, I can't quite remember). To turn it on, you have to check the "Share my current location when posting notices" checkbox in the settings (i.e. http://identi.ca/settings/profile) and put a valid location in the Location field. Another option is to have your browser or client (some clients such as Mustard have this option) attach the location information. If the notice has the location information (which is in latitude/longitude format), the bot will pass the lat/long to the Wunderground API and it'll return the current conditions appropriately. One thing to note is that the bot will use a provided posta…

ScrollToTop plugin update

The ScrollToTop StatusNet plugin that I started awhile back has been seeing quite a few updates recently. I updated the original blog post concerning it just last week however, there have been more updates to it so I figured a fresh blog would be good. Initially, the plugin was just simply inserting some html + css to the SN interface that would add a static button to scroll to the top of the page when clicked. We have since (we being @mvdan and myself) moved the plugin to using the jquery via the jquery script that SN already has. So now, the plugin is just simply inserting some html + css + js to the SN interface... This has improved the experience with the button (it doesn't add a '#' to the end of the URL after being clicked for one) along with providing me an easy way to add more functionality and effects. The original CSS opacity transitions have been moved to the js script as well. Due to moving the code from inserting raw html to inserting the <div> and <img> attributes via arrays, I had t…

ScrollToTop Plugin

I recently made a small change to the layout of my StatusNet instance to show 50 notices per page instead of the default 20 per page. This little change was made to the framework.php file in ./lib ./lib/framework.php:define('NOTICES_PER_PAGE', 50); `</pre> Since my instance is a single user instance, the increase of notices isn't going to increase the overall load on my server by much. I'm not sure I'd do this on larger instances like identi.ca, parlementum.net, brainbird.net, etc. due the the increase in page load. Of course, I could be wrong. The one side effect having the increased notices, is the increase of scrolling back to the top of the page. Solution? Enter a plugin called ScrollToTop. This plugin adds a small static image to the bottom right of the page that will scroll to the top of the page when clicked. Simple. ;-) The plugin can be installed by navigating to the plugins directory and pulling it from git. git clone https://gitorious.org/scrolltotop ScrollToTop And then, you'll have to add t…

Simple StatusNet Plugins

On a recent exploration of the files of my StatusNet install, I happened to open up PLUGINS.txt in the root of the install. Upon reading through, I happened to notice the line: In the simplest case, you can add a function to config.php and use the Event::addHandler() function to hook an event: Basically, what this means is that simple plugins can be added to everyone who runs an instance's favorite file, config.php. Previously, I have hacked together a simple plugin to add a 'Stop Censorship' banner across the site logo (link). This plugin could have been just as easily done directly in config.php, and maybe with a little more ease. Anyway, here are a couple that I came up with to put this config.php plugin thing in action. They are both just simply adding elements to the page and are not very complex. The first one adds a Flattr button to the primary navagation at the top of the page. It has two seperate parts, the first to add the Flattr javascript to the <head\> section of the page and the sec…

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. 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 th…