Mediawiki Google Plus +1: Difference between revisions
From Rabbi Blog
m (Created page with "'''References:''' [ * [http://www.google.com/webmasters/+1/button/ Google's Add +1 to your pages to help your site stand out] * [http://multiplethreads.blogspot.com/2011/07/embed...") |
mNo edit summary |
||
Line 3: | Line 3: | ||
* [http://multiplethreads.blogspot.com/2011/07/embedding-1-google-plus-on-mediawiki.html http://multiplethreads.blogspot.com/2011/07/embedding-1-google-plus-on-mediawiki.html] | * [http://multiplethreads.blogspot.com/2011/07/embedding-1-google-plus-on-mediawiki.html http://multiplethreads.blogspot.com/2011/07/embedding-1-google-plus-on-mediawiki.html] | ||
* Edit LocalSettings.php and include the code provided by | * Edit LocalSettings.php and include the code provided by Google's page above. | ||
** Example: | ** Example: | ||
<pre> | <pre> |
Revision as of 09:31, 12 September 2011
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>