Google Plus One
From Wiki.cyring.fr
(Difference between revisions)
(→loop.php) |
(→header.php) |
||
Line 3: | Line 3: | ||
<syntaxhighlight lang="html5"> | <syntaxhighlight lang="html5"> | ||
<body <?php body_class(); ?>> | <body <?php body_class(); ?>> | ||
- | + | ... | |
<script type="text/javascript"> | <script type="text/javascript"> | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 17: | Line 17: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
---- | ---- | ||
+ | |||
===== loop.php ===== | ===== loop.php ===== | ||
<syntaxhighlight lang="html5"> | <syntaxhighlight lang="html5"> |
Revision as of 11:40, 31 December 2012
Contents |
WordPress
header.php
<body <?php body_class(); ?>> ... <script type="text/javascript">
window.___gcfg = {lang: '<?php echo qtrans_getLanguage() ?>'}; (function() { var po = document.createElement("script"); po.type = "text/javascript"; po.async = true; po.src = "https://apis.google.com/js/plusone.js"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(po, s); })(); </script> ...
loop.php
<div class="entry-utility"> ... <g:plusone size="small" href="<?php the_permalink(); ?>"></g:plusone> ... </div><!-- .entry-utility -->
MediaWiki
MonoBook.php
<div id="header"> ... <script type="text/javascript">
(function() { var po = document.createElement("script"); po.type = "text/javascript"; po.async = true; po.src = "https://apis.google.com/js/plusone.js"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(po, s); })();
</script> </div> <div id="column-content"><div id="content"> ... <g:plusone size="small" href="<?php echo $this->data[serverurl] . $this->data['content_actions']['nstab-main']['href']; ?>"></g:plusone> ... </div></div>