Diff of /trunk/extensions/WeCoWi/WeCoWi.php [r481] .. [r482] Maximize Restore

  Switch to side-by-side view

--- a/trunk/extensions/WeCoWi/WeCoWi.php
+++ b/trunk/extensions/WeCoWi/WeCoWi.php
@@ -17,6 +17,7 @@
 $wgHooks['MagicWordwgVariableIDs'][]       = 'wfAddCustomVariableID';
 $wgHooks['LanguageGetMagic'][]             = 'wfAddCustomVariableLang';
 $wgHooks['ParserGetVariableValueSwitch'][] = 'wfGetCustomVariable';
+$wgHooks['SkinBuildSidebar'][] = 'SocialSidebar';
  
 function wfAddCustomVariable(&$magicWords) {
         foreach($GLOBALS['wgCustomVariables'] as $var) $magicWords[] = "MAG_$var";
@@ -54,4 +55,22 @@
                         break;
                 }
         return true;
-        }+        }
+function SocialSidebar ($skin, &$bar ) {
+        $bar['socialsidebar'] = '<span class="social">
+			<a href="https://twitter.com/share" class="twitter-share-button" data-via="WeCoWi" data-lang="de">Twittern</a>
+<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script></div>
+			</span>';
+		$bar['socialsidebar']  .= '<span class="social">
+			<script>(function(d, s, id) {
+					  var js, fjs = d.getElementsByTagName(s)[0];
+					  if (d.getElementById(id)) {return;}
+					  js = d.createElement(s); js.id = id;
+					  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
+					  fjs.parentNode.insertBefore(js, fjs);
+					}(document, "script", "facebook-jssdk"));</script>
+					<fb:like send="false" layout="button_count" width="60" show_faces="true"></fb:like></span>';
+		$bar['socialsidebar'] .= '<span class="social">
+			<g:plusone size="small"></g:plusone></span>';
+	return true;
+}