<?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 &#187; addthis</title>
	<atom:link href="http://matmrosko.com/tag/addthis/feed/" rel="self" type="application/rss+xml" />
	<link>http://matmrosko.com</link>
	<description>geeky thoughts</description>
	<lastBuildDate>Thu, 24 Jun 2010 06:15:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<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>
				<category><![CDATA[php]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[addthis]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[patch]]></category>
		<category><![CDATA[plugin]]></category>

		<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>
