Last active
May 7, 2016 08:34
-
-
Save heyjoecampbell/a3181beec8116ccd4fee to your computer and use it in GitHub Desktop.
AddThis Non-JavaScript Social Share (@heyjoecampbell)
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
// Produce and size pop-up | |
<script> | |
function PopupCenter(pageURL, title,w,h) { | |
var left = (screen.width/2)-(w/2); | |
var top = (screen.height/2)-(h/2); | |
var targetWin = window.open (pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left); | |
} | |
</script> | |
<a rel="nofollow" href="javascript:void(0);" onclick="PopupCenter('http://api.addthis.com/oexchange/0.8/forward/facebook/offer?url=<?php echo $this->item->absoluteURL; ?>&pubid=ra-XXXXXX', 'FacebookShare',650,400);" title="Facebook Share">Facebook</a> | |
<a rel="nofollow" href="javascript:void(0);" onclick="PopupCenter('http://api.addthis.com/oexchange/0.8/forward/twitter/offer?url=<?php echo $this->item->absoluteURL; ?>&title=<?php echo $this->item->title; ?> - &pubid=ra-XXXXXX', 'Tweet',550,450);" title="Tweet">Twitter</a> | |
<a rel="nofollow" href="javascript:void(0);" onclick="PopupCenter('http://pinterest.com/pin/create/bookmarklet/?media=<?php echo $this->item->image; ?>&url=<?php echo $this->item->absoluteURL; ?>&is_video=false&description=<?php echo $this->item->title; ?> - <?php echo $this->item->introtext; ?>', 'PinIt',750,350);" title="Pin It">Pinterest</a> | |
<a rel="nofollow" href="javascript:void(0);" onclick="PopupCenter('http://api.addthis.com/oexchange/0.8/forward/linkedin/offer?url=<?php echo $this->item->absoluteURL; ?>&pubid=ra-XXXXXX', 'LinkedinShare',600,450);" title="Share on Linkedin">LinkedIn</a> | |
<a rel="nofollow" href="javascript:void(0);" onclick="PopupCenter('http://api.addthis.com/oexchange/0.8/forward/google_plusone_share/offer?url=<?php echo $this->item->absoluteURL; ?>&pubid=ra-XXXXXX', 'PlusOne',550,500);" title="Google Plus One">Google+</a> | |
<a rel="nofollow" href="javascript:void(0);" onclick="PopupCenter('http://api.addthis.com/oexchange/0.8/forward/tumblr/offer?url=<?php echo $this->item->absoluteURL; ?>&pubid=ra-XXXXXX', 'TumblrPost',600,550);" title="Post to Tumblr">Tumblr</a> | |
[/code] | |
// Change "XXXXXX" to your AddThis ID. Change/style each social media text name to your desire. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment