<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>matmrosko.com</title>
	<atom:link href="http://matmrosko.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://matmrosko.com</link>
	<description>geeky thoughts</description>
	<lastBuildDate>Wed, 03 Aug 2011 07:33:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>GNU Screen on Chumby</title>
		<link>http://matmrosko.com/2011/03/22/gnu-screen-on-chumby/</link>
		<comments>http://matmrosko.com/2011/03/22/gnu-screen-on-chumby/#comments</comments>
		<pubDate>Tue, 22 Mar 2011 07:24:22 +0000</pubDate>
		<dc:creator>mat</dc:creator>
		
		<guid isPermaLink="false">http://matmrosko.com/?p=168</guid>
		<description><![CDATA[I am researching starting a development project running some native code on a Chumby, so I figured I&#8217;d dive in with some cross-compiling to see how much trouble it would be to get something up and running on (one of) my Chumby One(s). Turns out, it wasn&#8217;t too bad. I use GNU screen extensively at [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://matmrosko.com/files/2011/03/heckert_gnu.small_.png" alt="" title="heckert_gnu.small" width="145" height="140" class="alignleft size-full wp-image-172" />I am researching starting a development project running some native code on a Chumby, so I figured I&#8217;d dive in with some cross-compiling to see how much trouble it would be to get something up and running on (one of) my Chumby One(s).  Turns out, it wasn&#8217;t too bad.</p>
<p>I use GNU screen extensively at work and at play, so I figured for this project it will be helpful.  Getting it running will be the very first step in my quest to run my <a href="http://christmasonquiethills.com/" title="Christmas On Quiet Hills">synchronized Christmas lights</a> from a Chumby.</p>
<p>The first step was getting the toolchain up and running on my desktop machine, which was really simple using the <a href="http://wiki.chumby.com/index.php/GNU_Toolchain" title="GNU Toolchain">toolchain instructions</a> on the Chumby wiki.</p>
<p>Then, I ran through some issues due to screen&#8217;s configure script erroring out because it cannot run binaries for test programs.  Turns out generating the configure using autoconf with the option &#8220;&#8211;warnings=cross&#8221; will spit out anything it thinks will give you trouble with cross compilation.  Regenerating the configure using autoconf told me that AC_TRY_RUN wasn&#8217;t setup with a default for cross compile.  The documentation for autoconf is somewhat easy to read and I simply had to add a default cross compile case in a few places in the configure.in for screen.  I was lucky and didn&#8217;t have to add any other tests to get something working, with the exception of a choice of sockets or fifos.  I chose fifos, although Chumby&#8217;s rootfs should also support using sockets.</p>
<p>Once I had that going, I ran into a problem where tgetent wasn&#8217;t being found.  That is a function used to get the terminal entry for things like the screen size, color rendering, etc. and is available from a few packages.  First I tried using ncurses, which resulted in a binary that compiled, but wouldn&#8217;t run.  A few straces and I wasn&#8217;t getting anywhere so I cheated.  I also found <a href="http://forum.chumby.com/viewtopic.php?id=6219" title='Anyone know how to install CLI Linux "Screen" command?'>a thread</a> on the Chumby forums with a binary somebody grabbed from a Debian armel build, which ran on my Chumby, but needed 2 shared libraries.  I ran strings on the binary and saw some interesting things which led me to try termcap as the next source of tgetent() instead of ncurses when building screen.</p>
<p>As soon as I had this, screen compiled (statically linked) and ran on my Chumby.  I haven&#8217;t done rigorous testing on the binary, but split works, and a few quick things I threw at it.  Pretty neat!  I was rebuilding enough after each little change that I wrote a script for the build, and have a patch for screen&#8217;s configure.in that generates the configure.</p>
<p><a href='http://matmrosko.com/files/2011/03/update_configure_in.patch'>update_configure_in.patch</a>: Patch to update screen&#8217;s configure.in to allow cross-compilation.</p>
<pre class="prettyprint">
--- screen-4.0.3/configure.in.original  2011-03-21 22:28:36.613330001 -0700
+++ screen-4.0.3/configure.in   2011-03-21 22:56:13.837330001 -0700
@@ -54,14 +54,14 @@
 export CC
 exec $0 $configure_args
 fi
-])
+],true)

 AC_TRY_RUN(main(){exit(0);},,
 exec 5>&#038;2
 eval $ac_link
 AC_NOTE(CC=$CC; CFLAGS=$CFLAGS; LIBS=$LIBS;)
 AC_NOTE($ac_compile)
-AC_MSG_ERROR(Can't run the compiler - sorry))
+AC_MSG_ERROR(Can't run the compiler - sorry),true)

 AC_TRY_RUN([
 main()
@@ -69,7 +69,7 @@
   int __something_strange_();
   __something_strange_(0);
 }
-],AC_MSG_ERROR(Your compiler does not set the exit status - sorry))
+],AC_MSG_ERROR(Your compiler does not set the exit status - sorry),,true)

 AC_PROG_AWK

@@ -358,7 +358,7 @@
   exit(0);
 }
 ], AC_NOTE(- your fifos are usable) fifo=1,
-AC_NOTE(- your fifos are not usable))
+AC_NOTE(- your fifos are not usable),fifo=1)
 rm -f /tmp/conftest*

 if test -n "$fifo"; then
@@ -408,7 +408,7 @@
   exit(0);
 }
 ], AC_NOTE(- your implementation is ok),
-AC_NOTE(- you have a broken implementation) AC_DEFINE(BROKEN_PIPE) fifobr=1)
+AC_NOTE(- you have a broken implementation) AC_DEFINE(BROKEN_PIPE) fifobr=1,true)
 rm -f /tmp/conftest*
 fi

@@ -470,7 +470,7 @@
   exit(0);
 }
 ], AC_NOTE(- your sockets are usable) sock=1,
-AC_NOTE(- your sockets are not usable))
+AC_NOTE(- your sockets are not usable),true)
 rm -f /tmp/conftest*

 if test -n "$sock"; then
@@ -502,7 +502,7 @@
 }
 ],AC_NOTE(- you are normal),
 AC_NOTE(- unix domain sockets are not kept in the filesystem)
-AC_DEFINE(SOCK_NOT_IN_FS) socknofs=1)
+AC_DEFINE(SOCK_NOT_IN_FS) socknofs=1,true)
 rm -f /tmp/conftest*
 fi

@@ -635,7 +635,7 @@
   exit(0);
 }
 ],AC_NOTE(- select is ok),
-AC_NOTE(- select can't count) AC_DEFINE(SELECT_BROKEN))
+AC_NOTE(- select can't count) AC_DEFINE(SELECT_BROKEN),true)

 dnl
 dnl    ****  termcap or terminfo  ****
@@ -668,7 +668,7 @@
 {
  exit(strcmp(tgoto("%p1%d", 0, 1), "1") ? 0 : 1);
 }], AC_NOTE(- you use the termcap database),
-AC_NOTE(- you use the terminfo database) AC_DEFINE(TERMINFO))
+AC_NOTE(- you use the terminfo database) AC_DEFINE(TERMINFO),true)
 AC_CHECKING(ospeed)
 AC_TRY_LINK(extern short ospeed;,ospeed=5;,,AC_DEFINE(NEED_OSPEED))

@@ -804,7 +804,7 @@
       AC_NOTE(- can't determine - assume ptys are world accessable)
     fi
   ]
-)
+,true)
 rm -f conftest_grp
 fi

@@ -947,7 +947,7 @@
     exit(1);
   exit(0);
 }
-  ],avensym=$av;break)
+  ],avensym=$av;break,,true)
   if test "$av" = _Loadavg; then
     nlist64='#define nlist nlist64'
   fi
@@ -1080,7 +1080,7 @@
 #endif
   exit(0);
 }
-],,AC_DEFINE(SYSVSIGS))
+],,AC_DEFINE(SYSVSIGS),true)

 fi

@@ -1160,7 +1160,7 @@
   if (strncmp(buf, "cdedef", 6))
     exit(1);
   exit(0); /* libc version works properly.  */
-}], AC_DEFINE(USEBCOPY))
+}], AC_DEFINE(USEBCOPY),,true)

 AC_TRY_RUN([
 #define bcopy(s,d,l) memmove(d,s,l)
@@ -1175,7 +1175,7 @@
   if (strncmp(buf, "cdedef", 6))
     exit(1);
   exit(0); /* libc version works properly.  */
-}], AC_DEFINE(USEMEMMOVE))
+}], AC_DEFINE(USEMEMMOVE),,true)

 AC_TRY_RUN([
@@ -1191,7 +1191,7 @@
   if (strncmp(buf, "cdedef", 6))
     exit(1);
   exit(0); /* libc version works properly.  */
-}], AC_DEFINE(USEMEMCPY))
+}], AC_DEFINE(USEMEMCPY),,true)

 AC_MSG_CHECKING(long file names)
 (echo 1 > /tmp/conftest9012345) 2>/dev/null
@@ -1266,7 +1266,7 @@
 dnl Ptx bug workaround -- insert -lc after -ltermcap
 test -n "$seqptx" &#038;&#038; LIBS="-ltermcap -lc -lsocket -linet -lnsl -lsec -lseq"

-AC_TRY_RUN(main(){exit(0);},,AC_MSG_ERROR(Can't run the compiler - internal error. Sorry.))
+AC_TRY_RUN(main(){exit(0);},,AC_MSG_ERROR(Can't run the compiler - internal error. Sorry.),true)

 ETCSCREENRC="\"/usr/local/etc/screenrc\""
 if test -n "$prefix"; then
</pre>
<p><a href='http://matmrosko.com/files/2011/03/build.sh'>build.sh</a>: Simple (hackish) shell script to cross-compile screen for chumby platforms using the chumby provided toolchain.</p>
<pre class="prettyprint">
#!/bin/bash

die()
{
    echo $1
    exit
}

wget http://mirrors.kernel.org/gnu/termcap/termcap-1.3.1.tar.gz
tar xzpvf termcap-1.3.1.tar.gz || die "Failed ot untar termcap"
pushd termcap-1.3.1 || die "No termcap"
autoconf
./configure --host=arm-linux --prefix=$(pwd)/install || die "Failed termcap configure"
make &#038;&#038; make install || die "Failed to make termcap"
popd

export LDFLAGS="-L$(pwd)/termcap-1.3.1/install/lib/"
export LIBS="-ltermcap"

export CFLAGS="-DDEBUG"

wget http://mirrors.kernel.org/gnu/screen/screen-4.0.3.tar.gz
tar xzpvf screen-4.0.3.tar.gz || die "Failed to untar screen"
pushd screen-4.0.3
rm -f configure
patch -p1 < ../update_configure_in.patch
autoconf --warnings=cross
./configure --host=arm-linux --prefix=$(pwd)/install || die "Failed screen configure"
make &#038;&#038; make install || die "Failed to make screen"
popd
unset LDFLAGS
unset LIBS
unset CFLAGS
</pre>
]]></content:encoded>
			<wfw:commentRss>http://matmrosko.com/2011/03/22/gnu-screen-on-chumby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Firewalls, IPTables, and Bears, Oh My!</title>
		<link>http://matmrosko.com/2010/06/23/firewalls-iptables-and-bears-oh-my/</link>
		<comments>http://matmrosko.com/2010/06/23/firewalls-iptables-and-bears-oh-my/#comments</comments>
		<pubDate>Thu, 24 Jun 2010 06:15:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<guid isPermaLink="false">http://matmrosko.com/?p=166</guid>
		<description><![CDATA[I will be playing with iptables over the next couple of weeks in order to more easily change my rule sets to block by IP address, request type, location (if possible), load balance, etc., so if you experience any downtime, I apologize in advance. I will post more information when I am done with the [...]]]></description>
			<content:encoded><![CDATA[<p>I will be playing with iptables over the next couple of weeks in order to more easily change my rule sets to block by IP address, request type, location (if possible), load balance, etc., so if you experience any downtime, I apologize in advance. I will post more information when I am done with the changes.</p>
]]></content:encoded>
			<wfw:commentRss>http://matmrosko.com/2010/06/23/firewalls-iptables-and-bears-oh-my/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Chumby Remote &#8211; Part 1</title>
		<link>http://matmrosko.com/2010/02/26/chumby-remote-part-1/</link>
		<comments>http://matmrosko.com/2010/02/26/chumby-remote-part-1/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 08:49:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<guid isPermaLink="false">http://matmrosko.com/?p=148</guid>
		<description><![CDATA[Part 1 of my &#8220;Chumby Remote&#8221; series will cover the Chumby classic proc entry for emulating touchscreen clicks and bend sensor presses. Overview If you&#8217;re unfamiliar with the Chumby, you should go to their website and check them out. They&#8217;re a &#8216;cute&#8217; little Internet device that is meant to be an always-on appliance to &#8220;keep [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://matmrosko.com/files/2010/02/chumbyLogo.gif" alt="" title="chumbyLogo" width="147" height="113" class="alignright size-full wp-image-161" />Part 1 of my &#8220;Chumby Remote&#8221; series will cover the Chumby classic proc entry for emulating touchscreen clicks and bend sensor presses.</p>
<h3>Overview</h3>
<p>If you&#8217;re unfamiliar with the Chumby, you should go to their website and check them out.  They&#8217;re a &#8216;cute&#8217; little Internet device that is meant to be an always-on appliance to &#8220;keep you connected&#8221; to your digital life.  I have one on my night stand that is no more than a glorified alarm clock that I&#8217;ve had it since April of 2008 and justified the cost by saying it would be a new hobby since I love working with embedded systems devices.  The enjoyment is even better since the Chumby is completely* &#8220;open&#8221; and there&#8217;s a very helpful community.  Unfortunately life got in the way of the new potential &#8220;hobby&#8221; and it took until &#8220;paternity leave&#8221; for my second child for me to have any amount of free time to dedicate to hacking my Chumby.  When the Chumby One was announced, I promptly ordered one since certain aspects were even easier for hacking (microSD rootfs, r/w filesystem, easier to &#8220;hack&#8221; case for adding a serial console).</p>
<h3>The Idea</h3>
<p>This project started because I wanted to be able to remotely start/stop Pandora radio as well as disable alarms if I woke up prior and didn&#8217;t want to wake up my wife.  Chumby provides event interfaces for starting/stopping certain music sources, but Pandora isn&#8217;t one of them.  ChumbyLurker has also written a nifty perl cgi script that will allow remote editing of alarms (which had a couple bugs) that wasn&#8217;t around when I came up with my idea.  I have enough web experience as well as linux experience to get this working rather quickly, so off I went.</p>
<h3>Getting to work</h3>
<p><strong>Step 1</strong> &#8211; See how the touchscreen device is getting information to the Chumby flash player.  With a quick look to the loaded modules, it was obvious the module &#8220;chumby_tsc2100&#8243; was the touchscreen driver.</p>
<p><strong>Step 2</strong> &#8211; Obtaining the source was as easy as going to http://files.chumby.com/ which has the complete source for (almost) everything on the Chumby platform as it is (almost) all GPLv2 software.  I imported all of the Chumby kernels available into a git repository for easy tracking of differences between firmware revisions as released by Chumby Industries.</p>
<p><strong>Step 3</strong> &#8211; Modify the source.  I chose /proc entries as my &#8220;entry point&#8221; for emulating touches because I&#8217;m familiar with them so it would be a quick and easy way to get things working.  With only a few lines of code in an hour or so, I was able to get emulated touch screen presses working by echoing coordinates to the new proc entry.  Similarly I added an entry for the &#8220;bend&#8221; sensor on the top of the chumby.</p>
<pre class="prettyprint">
$ echo "300 300" > /proc/chumby/touchscreen/coordinates
$ dmesg | tail -n 1
[2001256.670000] pen down - set coordinates x=1, y=1
$ echo "0 0" > /proc/chumby/touchscreen/coordinates
$ dmesg | tail -n 1
[2001261.680000] pen up
$ echo 1 > /proc/sense1
$ dmesg | tail -n 1
[2001395.680000] bent
$ echo 0 > /proc/sense1
$ dmesg | tail -n 1
[2001401.220000] not bent
</pre>
<p>If you&#8217;re a git user, you should be able to branch from 2.6.16, throw on the chumby kernel, then use git am to apply these patches:</p>
<ul>
<li><a href='http://matmrosko.com/files/2010/02/0001-Turn-down-noise-in-sense-read.patch'>0001-Turn-down-noise-in-sense-read</a></li>
<li><a href='http://matmrosko.com/files/2010/02/0002-Implement-a-forced-bend-sensor-press-proc-entry.patch'>0002-Implement-a-forced-bend-sensor-press-proc-entry</a></li>
<li><a href='http://matmrosko.com/files/2010/02/0003-Implement-forced-touch-screen-pen-event-proc-entry.patch'>0003-Implement-forced-touch-screen-pen-event-proc-entry</a></li>
</ul>
<p>*Note: The control panel is not open source, although through the Chumby forums Chumby Industries respond to a lot of input from the community.</p>
]]></content:encoded>
			<wfw:commentRss>http://matmrosko.com/2010/02/26/chumby-remote-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SheevaPlug Migration</title>
		<link>http://matmrosko.com/2010/02/10/sheevaplug-migration/</link>
		<comments>http://matmrosko.com/2010/02/10/sheevaplug-migration/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 07:47:30 +0000</pubDate>
		<dc:creator>mat</dc:creator>
		
		<guid isPermaLink="false">http://matmrosko.com/?p=119</guid>
		<description><![CDATA[Recently my wife and I had our second child. Instead of putting the kids in day care and pay somebody else to raise our children we decided that my wife would stay home. This meant a drastic change to our income. As part of our cost cutting measures, I decided to leave my VPS hosting [...]]]></description>
			<content:encoded><![CDATA[<p>Recently my wife and I had our second child.  Instead of putting the kids in day care and pay somebody else to raise our children we decided that my wife would stay home.  This meant a drastic change to our income.  As part of our cost cutting measures, I decided to leave my VPS hosting provider which is heavily overkill for the small traffic our websites generate.  I never once had a problem with Linode and highly recommend them to anybody looking for quality service at a good price.  Their staff is so educated with linux they make my skills seem non-existent.<img src="http://matmrosko.com/files/2010/02/sheevaplug.jpg" alt="SheevaPlug" title="SheevaPlug" width="300" height="300" class="alignright size-full wp-image-122" /></p>
<p>Over the last couple of years I have moved away from running machines at home 24/7.  This used to be the norm for me so I would have constant access to my data, however it became a nuisance for a few reasons.  First, it meant always having a machine on generating heat and sucking power.  Second, the longer the machine was up, the more &#8220;hours&#8221; on things like hard drives and CPUs.  This makes hard drives die much faster.  The downfall with rebooting often is PSUs are more likely to fail.  All in all, I was happy with my solution for a couple of years.  SSH to my <a href="http://en.wikipedia.org/wiki/Linksys_WRT54G_series" title="Linksys WRT54G" target="_blank">router</a> (which is running <a href="http://www.openwrt.org/" title="OpenWrt" target="_blank">OpenWrt</a>) and use wake-on-lan packets to turn on machines if I wanted at my data.  Then I could also remotely shut down my machines to save power when I was done getting what I needed.</p>
<p>I didn&#8217;t exactly like the time I had to wait for things, and my wife couldn&#8217;t then access data without doing &#8220;magic&#8221; which she didn&#8217;t like.  This made it hard for me (an anal-retentive data hoarder) to have a way to &#8220;share&#8221; the family pictures, and other important things since the machines were only on when I wanted them on.  I began looking for a solution and came across the SheevaPlug.  It is an embedded system that ships with an ubuntu installation by default and it&#8217;s only $100.  I had to get one!  It runs a 1.2GHz Kirkwood ARM processor and has 512Mb RAM and 512 Nand flash.</p>
<p>The little thing draws just about 5 watts according to my kill-a-watt with a 500 Gb Seagate drive as the root filesystem.  I have migrated all my services from Linode to my SheevaPlug to run everything from home using my business Internet connection.  The SheevaPlug has plenty of horsepower to run all of my services which include <a href="http://www.apache.org/" title="apache">apache</a> (with <a href="http://php.net/" title="PHP">php5</a>), <a href="http://www.samba.org/" title="samba">samba</a>, <a href="http://nfs.sourceforge.net/" title="NFS">nfs</a>, email (<a href="http://www.postfix.org/" title="postfix" target="_blank">postfix</a>, <a href="http://postgrey.schweikert.ch/" title="postgrey" target="_blank">postgrey</a>, <a href="http://www.courier-mta.org/authlib/" title="courier-authlib" target="_blank">courier-authlib</a>, <a href="http://www.courier-mta.org/imap/" title="courier-imap" target="_blank">courier-imap</a>, <a href="http://www.courier-mta.org/imap/" title="courier-pop" target="_blank">courier-pop</a>, <a href="http://spamassassin.apache.org/" title="spamassassin" target="_blank">spamassassin</a>, <a href="http://www.clamav.net/" title="clamav" target="_blank">clamav</a>, <a href="http://www.amavis.org/" title="amavis" target="_blank">amavis</a>, <a href="http://roundcube.net/" title="roundcube" target="_blank">roundcube</a>).  Quite impressive if you ask me.  It&#8217;s been really stable even though it&#8217;s labeled as a &#8220;development kit&#8221; and my uptime and load average can be seen in the footer of this website.</p>
]]></content:encoded>
			<wfw:commentRss>http://matmrosko.com/2010/02/10/sheevaplug-migration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AddThis WordPress Plugin with WPMU</title>
		<link>http://matmrosko.com/2009/09/30/addthis-wordpress-plugin-with-wpmu/</link>
		<comments>http://matmrosko.com/2009/09/30/addthis-wordpress-plugin-with-wpmu/#comments</comments>
		<pubDate>Wed, 30 Sep 2009 23:04:08 +0000</pubDate>
		<dc:creator>mat</dc:creator>
		
		<guid isPermaLink="false">http://matmrosko.com/?p=105</guid>
		<description><![CDATA[UPDATE 2/9/2010: AddThis recently released a version 1.6.1 which fixes the issues. It contains *basically* this patch with if ( wordpress version &#62; 2.7 ) checks to maintain backward compatibility. I wasn&#8217;t worried about that because people shouldn&#8217;t run old, unsecure versions of wordpress, however I can see why AddThis wouldn&#8217;t care and would want [...]]]></description>
			<content:encoded><![CDATA[<strong><span style="color:#f00">UPDATE 2/9/2010:</span></strong> AddThis recently released a version 1.6.1 which fixes the issues.  It contains *basically* this patch with if ( wordpress version &gt; 2.7 ) checks to maintain backward compatibility.  I wasn&#8217;t worried about that because people shouldn&#8217;t run old, unsecure versions of wordpress, however I can see why AddThis wouldn&#8217;t care and would want their plugin to work across the board.

<p>Recently, I wanted to add the <a href="http://addthis.com/" target="_blank" title="AddThis">AddThis</a> <a href="http://wordpress.org/extend/plugins/addthis/" target="_blank" title="AddThis WordPress Plugin">WordPress Plugin</a> and I couldn&#8217;t get it to work with WPMU.  I found a thread on the <a href="http://www.addthis.com/forum/viewtopic.php?f=4&amp;t=9647" target="_blank" title="AddThis Forums">addthis forums</a> that discussed the exact problem, with a suggestion like the openid problem that had been updated.</p>

<p>The post/bug report on openid suggested to update the plugin to use the new register_setting/settings_fields methods which are now available with WordPress 2.7 and above.  The documentation for that is here: <a href="http://codex.wordpress.org/Creating_Options_Pages" target="_blank" title="Creating Options Pages">http://codex.wordpress.org/Creating_Options_Pages</a>.</p>

<p>I made the same changes, and everything seems to work.  Here is a patch:</p>
<h3><a href="http://matmrosko.com/files/2009/09/addthis_wpmu_fix.patch" title="addthis_wpmu_fix.patch">addthis_wpmu_fix.patch</a></h3>
<pre class="prettyprint">
diff --git a/addthis_social_widget.php b/addthis_social_widget.php
index 39c4a5c..3ed2c5c 100644
--- a/addthis_social_widget.php
+++ b/addthis_social_widget.php
@@ -51,6 +51,26 @@ $addthis_styles = array(
                         , 'custom' => array('img'=>'http://example.com/button.gif', 'w'=>16, 'h'=>16) */
                     );

+if ( is_admin() ) {
+    add_action( 'admin_init', 'register_addthis_settings' );
+}
+
+function register_addthis_settings() {
+    register_setting('addthis', 'addthis_username');
+    register_setting('addthis', 'addthis_style');
+    register_setting('addthis', 'addthis_sidebar_only');
+    register_setting('addthis', 'addthis_isdropdown');
+    register_setting('addthis', 'addthis_showonpages');
+    register_setting('addthis', 'addthis_showoncats');
+    register_setting('addthis', 'addthis_showonhome');
+    register_setting('addthis', 'addthis_showonarchives');
+    register_setting('addthis', 'addthis_language');
+    register_setting('addthis', 'addthis_brand');
+    register_setting('addthis', 'addthis_options');
+    register_setting('addthis', 'addthis_header_background');
+    register_setting('addthis', 'addthis_header_color');
+}
+

 /**
 * Adds WP filter so we can append the AddThis button to post content.
@@ -216,7 +236,7 @@ function addthis_plugin_options_php4() {
     <h2>AddThis</h2>

     <form method="post" action="options.php">
-    
+    

     <h3>Required</h3>
     <table class="form-table">
@@ -305,9 +325,6 @@ function addthis_plugin_options_php4() {
         </tr>
     </table>

-    
-    
-
     <p class="submit">
     <input type="submit" name="Submit" value="" />
     </p>
</pre>]]></content:encoded>
			<wfw:commentRss>http://matmrosko.com/2009/09/30/addthis-wordpress-plugin-with-wpmu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

