Mediawiki Google Plus +1
From Rabbi Blog
References: [
- Google's Add +1 to your pages to help your site stand out
- http://multiplethreads.blogspot.com/2011/07/embedding-1-google-plus-on-mediawiki.html
- Edit LocalSettings.php and include the code provided by Google's page above.
- Example:
$wgHooks['BeforePageDisplay'][] = 'MyExtensionJavaScript'; function MyExtensionJavaScript( $out ) { # Add Google +1 $script = '<script type="text/javascript" language="javascript" src="https://apis.google.com/js/plusone.js">' . '</script>'; $out->addScript( $script); return true; }
- Edit your skin template (mine is SGuMax.php) and add <g:plusone size="small" href="/"></g:plusone>
- Example:
<h1 class="firstHeading"><?php $this->data['displaytitle']!=""?$this->html('title'):$this->text('title') ?> <g:plusone size="small" href="/"></g:plusone></h1>