Created
September 2, 2011 07:32
-
-
Save awendt/1188098 to your computer and use it in GitHub Desktop.
Like und +1 mit Datenschutz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.custom img#plusone { | |
cursor: pointer; | |
} | |
.custom #fbl { | |
cursor: pointer; | |
color:#2361A1; | |
font:0.65em Verdana, sans-serif; | |
border: 1px solid #CAD4E7; | |
border-radius: 3px; | |
padding:2px; | |
background-color:#ECEEF5; | |
} | |
.custom #fbl span { | |
text-decoration: underline; | |
background:transparent url(http://static.ak.fbcdn.net/rsrc.php/v1/y7/r/ql9vukDCc4R.png) no-repeat 0 -30px; | |
padding: 2px 3px 2px 20px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function share() { | |
if (is_single()) { | |
?> | |
<div id="share"> | |
<div class="google"> | |
<img id="plusone" title="Datenschutz: Dieser Platzhalter wird beim ersten Klick durch den echten +1-Button ersetzt. Erst dann wird eine Verbindung zu Google hergestellt" src="/plusone-h24-nc.png" width="38" height="24" /> | |
</div> | |
<div class="facebook"> | |
<span id="fbl" title="Datenschutz: Dieser Platzhalter wird beim ersten Klick durch den echten Gefällt-mir-Button ersetzt. Erst dann wird eine Verbindung zu Facebook hergestellt."><span>Gefällt mir</span></span> | |
</div> | |
<div style="clear:left;"></div> | |
<?php | |
} | |
} | |
add_action('thesis_hook_after_post', 'share'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
jQuery(function(){ | |
jQuery("#fbl").click(function() { | |
jQuery(this).replaceWith('<iframe src="http://www.facebook.com/plugins/like.php?href='+encodeURI(document.URL)+'&send=false&layout=button_count&width=450&show_faces=false&action=like&colorscheme=light&font=verdana&height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:150px; height:21px;" allowTransparency="true"></iframe>'); | |
}); | |
jQuery("#plusone").click(function() { | |
var script = document.createElement("script"); | |
script.type = "text/javascript"; | |
script.src = "https://apis.google.com/js/plusone.js"; | |
script.text = "{lang: 'de'}"; | |
document.body.appendChild(script); | |
jQuery(this).replaceWith('<g:plusone></g:plusone>'); | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment