在ECSHOP商品页增加“分享到开心网、人人网”的功能-站长杂谈下载

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

来自版块: 站长杂谈发表于: 2015-8-8 23:36:30
31640
0
如本资源下载地址失效,请点击此处进行反馈
开通本站Svip会员,全站资源免费下
效果图如下:3 u( r, T! x7 n3 j0 ?* u8 i+ f
100912114826640627p81jlf.jpg
, |9 G3 X4 I9 j. I7 ]' Y( r- p6 D0 v3 A4 W4 z% b/ U
(注:以下修改是在ECSHOP官方默认模板基础上进行的),
' p4 H1 w$ j# z6 F打开 模板文件 /themes/default/goods.dwt 文件,
/ W7 r/ a/ N. u3 v; r
. _' \. F8 y3 C2 B找到
  1. <!-- {if $affiliate.on} -->) {& N! t7 |$ z" u: }1 ]8 s. d; e! f
  2.       <a href="user.php?act=affiliate&goodsid={$goods.goods_id}"><img src='images/bnt_recommend.gif'></a>3 u$ i- N! s9 G3 }3 c2 T
  3.       <!-- {/if} -->$ |. q  n: {$ T+ X
  4.       </li>
复制代码

7 Y% x  f# }+ h( l1 v, p- n6 V) e5 A7 B. [- ^
在它下面增加以下代码即可
  1. <li class="padd">. I5 S  u6 W) N* I4 @) G2 ~
  2.       分享到:/ i* M2 L3 C1 J  p: H2 H
  3.       <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?&rurl='+escape(d.location.href)+'&rtitle='+escape(d.title)+'&rcontent='+escape(d.title),'kaixin'));kaixin.focus();"><img src="http://www.ecshop120.com/images/toshare/ico_kaixin.gif" alt="转贴到开心网" border="0" height="16" width="16"></a>  3 y8 {9 R8 S& d7 {9 Q$ W/ y4 T/ h$ n
  4.       <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="http://www.ecshop120.com/images/toshare/ico_renren.gif" title="分享到人人"/></a>  
    ) z; A/ S! x  A5 @$ h8 m9 r! Y
  5.       <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='http://www.ecshop120.com/images/toshare/ico_sina.gif' alt='分享到新浪微博' border='0'></a>  e7 }, W1 Y8 @
  6.       <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="http://www.ecshop120.com/images/toshare/ico_qqshuqian.gif" alt="QQ书签" border="0" ></a>  ; Q" z3 K. z# d5 g& N( {# v
  7.       <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>  
    9 I  u7 C# [, _' q1 S# \: n
  8. <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="http://qzonestyle.gtimg.cn/qzonestyle/qzone_app/app_share_v1/qz_logo.png" alt="" /></a>  
    4 ]; w0 v, f  X& E' L
  9.       <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="http://www.ecshop120.com/images/toshare/ico_yahoo.gif" alt="雅虎收藏" border="0" height="16" width="16"></a>: y/ J+ _3 [/ n3 ^3 D, w. m
  10.       </li>
复制代码

全部评论 0

您需要登录后才可以回帖 立即登录
登录
0
0
0
返回顶部