我们可以想在dede系统的文章下面加个分享到功能:
比如,把网站内容分享到某些大网站.象百度啊 ,QQ啊.
非常好的功能,可以在不知不觉中增加你的外链,提高你网站的流量。
实际上功能实现起来并不复杂。
下面都是一些可以直接使用的js代码。
只要将这些代码添加到dede模板的相应位置即可。
分享到QQ书签
<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="更换成自己的图片地址/images/qq.gif" alt="QQ书签" border="0" height="16" width="16"></a>
分享到百度收藏。
<a href="javascript:u=location.href;t=document.title;c = %22%22 + (window.getSelection ? window.getSelection() : document.getSelection ? document.getSelection() : document.selection.createRange().text);var url=%22" alt="百度搜藏" border="0" height="16" width="16"></a>
分享到google书签。
<a href="javascript:(function(){var a=window,b=document,c=encodeURIComponent,d=a.open('http://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk='+c(b.location)+'&title='+c(b.title),'bkmk_popup','left='+((a.screenX||a.screenLeft)+10)+',top='+((a.screenY||a.screenTop)+10)+',height=420px,width=550px,resizable=1,alwaysRaised=1');a.setTimeout(function(){d.focus()},300)})();"><img src="更换成自己的图片地址/images/google.gif" alt="Google书签" border="0" height="16" width="16"></a>
分享到雅虎收藏
<a href="#"><img src="更换成自己的图片地址/images/yahoo.gif" alt="雅虎收藏" border="0" height="16" width="16"></a>
分享到校内网
<a href="javascript:void((function(s,d,e){if(/xiaonei.com/.test(d.location))return;var%20f='http://share.xiaonei.com/share/butt*****hare.do?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));"><img src="更换成自己的图片地址/images/renren.gif" alt="分享到校内人人网" border="0" height="16" width="16"></a>
分享到开心网
<a href="javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(kaixin=window.open('" alt="转贴到开心网" border="0" height="16" width="16"></a>
转帖到服务易
<A title=分享到服务易 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.fuwuyi.cn/home.php?mod=spacecp&ac=share&fchannel=xmenus&u='+escape(d.location.href)+'&t='+escape(d.title),'fuwuyi'));fuwuyi.focus();"><IMG alt=转帖到服务易 src="http://www.fuwuyi.cn/favicon.ico" align=absMiddle border=0><FONT color=#996699>服务易</FONT></A>

免责声明:本站所有文章和图片均来自用户分享和网络收集,文章和图片版权归原作者及原出处所有,仅供学习与参考,请勿用于商业用途,如果损害了您的权利,请联系网站客服处理。

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。