在ECSHOP商品页增加“分享到开心网、人人网”的

2016-09-07 22:03 来源:www.chinab4c.com 作者:ecshop专家

效果图如下:


(注:以下修改是在ECSHOP官方默认模板基础上进行的),
打开 模板文件 /themes/default/goods.dwt 文件,

找到

<!-- {if $affiliate.on} -->
      <a href="user.php?act=affiliate&goodsid={$goods.goods_id}"><img src='images/bnt_recommend.gif'></a>
      <!-- {/if} -->
      </li>

在它下面增加以下代码即可
<li class="padd">
      分享到:
      <a href="javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(kaixin=window.open('http://www.kaixin001.com/~repaste/repaste.php?&amp;rurl='+escape(d.location.href)+'&amp;rtitle='+escape(d.title)+'&amp;rcontent='+escape(d.title),'kaixin'));kaixin.focus();"><img src="/uploads/allimg/c101102/12XFT11Y0-313b.gif" alt="转贴到开心网" border="0" height="16" width="16"></a> 
      <a href="javascript:void((function(s,d,e){if(/renren\\.com/.test(d.location))return;var f='http://share.renren.com/share/buttonshare?link=',u=d.location,l=d.title,p=[e(u),'&title=',e(l)].join('');function%20a(){if(!window.open([f,p].join(''),'xnshare',['toolbar=0,status=0,resizable=1,width=626,height=436,left=',(s.width-626)/2,',top=',(s.height-436)/2].join('')))u.href=[f,p].join('');};if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else%20a();})(screen,document,encodeURIComponent));" title="分享到人人"><img src="/uploads/allimg/c101102/12XFT1224410-440Q.gif" title="分享到人人"/></a> 
      <a href="javascript:window.open('http://v.t.sina.com.cn/share/share.php?title='+encodeURIComponent(document.title)+'&url='+encodeURIComponent(location.href)+'&source=bookmark','_blank','width=450,height=400');void(0)"><img src='/uploads/allimg/101112/1002411031-0.gif' alt='分享到新浪微博' border='0'></a>
      <a href="javascript:window.open('http://shuqian.qq.com/post?from=3&title='+encodeURIComponent(document.title)+'&uri='+encodeURIComponent(document.location.href)+'&jumpback=2&noui=1','favit','');void(0)"><img src="/uploads/allimg/c101102/12XFT126160-52G7.gif" alt="QQ书签" border="0" ></a> 
      <a href="javascript:window.open('http://cang.baidu.com/do/add?it='+encodeURIComponent(document.title.substring(0,76))+'&iu='+encodeURIComponent(location.href)+'&fr=ien#nw=1','_blank','scrollbars=no,width=600,height=450,left=75,top=20,status=no,resizable=yes'); void 0" ><IMG alt=添加到百度搜藏 src="http://www.ecshop120.com/images/toshare/ico_soucang.gif"  border=0></a>  
<a href="javascript:void(window.open('http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url='+encodeURIComponent(document.location.href)));" title="分享到QQ空间"><img src="/uploads/allimg/c101102/12XFT133U60-J633.png" alt="" /></a> 
      <a href="#" onclick="window.open('http://myweb.cn.yahoo.com/popadd.html?url='+encodeURIComponent(document.location.href)+'&title='+encodeURIComponent(document.title), 'Yahoo','scrollbars=yes,width=780,height=550,left=80,top=80,status=yes,resizable=yes');"><img src="/uploads/allimg/c101102/12XFT2T4A0-QH9.gif" alt="雅虎收藏" border="0" height="16" width="16"></a>
      </li>

 

(责任编辑:chinab4c)