share buttons(google+,facebook,twitter,pinterest,linkedin)

	$url = site_url() . $_SERVER["REQUEST_URI"];
	$save_url = urlencode($url);
	//https://developers.google.com/+/
	//https://developers.facebook.com/docs/web/
	//https://dev.twitter.com/docs/tweet-button
	//http://business.pinterest.com/widget-builder/#do_pin_it_button
	//http://developer.linkedin.com/publishers
	echo <<<EDO
<!-- google + -->
<div class="share_buttons">
	<div class="share_button google_share_button">
		<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);
			window.___gcfg = {
			lang: 'es'
		})();
		</script>
		<g:plusone size="medium" href="{$url}"></g:plusone>
	</div>
<!-- google + end -->

<!-- facebook -->
	<div class="share_button facebook_share_button">
		<div id="fb-root"></div>
		<script>(function(d, s, id) {
		var js, fjs = d.getElementsByTagName(s)[0];
		if (d.getElementById(id)) return;
		js = d.createElement(s); js.id = id;
		js.src = "//connect.facebook.net/zh_CN/all.js#xfbml=1";
		fjs.parentNode.insertBefore(js, fjs);
		}(document, 'script', 'facebook-jssdk'));</script>

		<div class="fb-like" data-href="{$url}" data-send="false" data-layout="button_count" data-width="300" data-show-faces="false" data-action="recommend"></div>
	</div>
<!-- facebook end -->

<!-- twitter -->
	<div class="share_button twitter_share_button">
		<a href="https://twitter.com/share" class="twitter-share-button" url="{$url}" data-lang="es">Tweet</a>

		<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
	</div>
<!-- twitter end -->

<!-- pinterest -->
	<div class="share_button pinterest_share_button">
		<script type="text/javascript">
		(function(d){
		var f = d.getElementsByTagName('SCRIPT')[0], p = d.createElement('SCRIPT');
		p.type = 'text/javascript';
		p.async = true;
		p.src = '//assets.pinterest.com/js/pinit.js';
		f.parentNode.insertBefore(p, f);
		}(document));
		</script>
		<a href="//pinterest.com/pin/create/button/?url={$save_url}&media=&description=Orientate" data-pin-do="buttonPin" data-pin-config="beside"><img src="//assets.pinterest.com/images/pidgets/pin_it_button.png" /></a>
	</div>
<!-- pinterest end -->

<!-- linkedin -->
	<div class="share_button linkedin_share_button">
		<script src="//platform.linkedin.com/in.js" type="text/javascript">
		lang: es_ES
		</script>
		<script type="IN/Share" data-url="{$url}" data-counter="right"></script>
	</div>
<!-- linkedin end -->
</div>
EDO;

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值