Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[修改] DX为文章页、日志页、相册页添加新浪微博、腾讯微博、QQ空间一键转播按钮和链接[1228]

[复制链接]
a327173196 发表于 2011-1-4 21:55:22 | 显示全部楼层 |阅读模式
插件发布
插件名称: DX门户文章、家园日志、相册分享组件
插件来源:
适用版本: Discuz! X1.5
语言编码: GBK简体 
最后更新时间:
插件作者: vwu.cc
插件简介: DX为文章页、日志页、相册页添加新浪微博、腾讯微博、QQ空间一键转播按钮和链接[基于1228版开发]
本帖最后由 a327173196 于 2011-1-4 22:07 编辑

首先上演示:

文章页:


日志页:



相册页:


不喜可点击右上角X,支持的可以往下看。

功能简述:
①完全绿色,学习后可添加在任何页面
②实现一键转播,增加网站人气来源
③新浪微博支持转播图片,腾讯目前仍然无办法解决转播图片

操作方法:
备份
view.htm
space_blog_view.htm
space_album_pic.htm


一、文章页
找到:
<!--{if $article[from]}--><span class="pipe">|</span>{lang from}: <!--{if $article[fromurl]}--><a href="$article[fromurl]" target="_blank">$article[from]</a><!--{else}-->$article[from]<!--{/if}--><!--{/if}-->

在其下面加入:

<span class="pipe">|</span>
<script type="text/javascript">document.write('<iframe  frameborder="0" scrolling="no" src="http://hits.sinajs.cn/A1/weiboshare.html?url=%url%&appkey=1775043196&type=3&ralateUid=1904044821" width="16" height="16"></iframe>'.replace(/%url%/,encodeURIComponent(location.href)));</script>
<span class="pipe">|</span>
<a href="javascript:void(0)" class="tmblog"><img src="http://v.t.qq.com/share/images/s/weiboicon16.png"></a> <script type="text/javascript">
function postToWb(){
var _t = encodeURI(document.title);
var _url = encodeURI(document.location);
var _appkey = encodeURI("014b5ac196244f90a23670d609615605");//你从腾讯获得的appkey
var _pic = encodeURI('');//(列如:var _pic='图片url1|图片url2|图片url3....)
var _site = 'http://www.vwu.cc';//你的网站地址
var _u = 'http://v.t.qq.com/share/share.php?title='+_t+'&url='+_url+'&appkey='+_appkey+'&site='+_site+'&pic='+_pic;
window.open( _u,'转播到腾讯微博', 'width=700, height=680, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, location=yes, resizable=no, status=no' );
}
</script>
<span class="pipe">|</span>
<a href="javascript:void(0);" title="分享到QQ空间"><img src="http://qzonestyle.gtimg.cn/ac/qzone_v5/app/app_share/qz_logo.png" alt="分享到QQ空间" /></a><span class="pipe">|</span>


上传文件,完成。

二、日志页

找到:

<!--{/if}-->
     <!--{if $_G['uid'] != $blog['uid']}-->
     <a href="javascript:;">{lang report}</a>


下方添加:
<span class="pipe">|</span>
<script type="text/javascript">document.write('<iframe  frameborder="0" scrolling="no" src="http://hits.sinajs.cn/A1/weiboshare.html?url=%url%&appkey=1775043196&type=3&ralateUid=1904044821" width="16" height="16"></iframe>'.replace(/%url%/,encodeURIComponent(location.href)));</script>
<span class="pipe">|</span>
<a href="javascript:void(0)" class="tmblog"><img src="http://v.t.qq.com/share/images/s/weiboicon16.png"></a> <script type="text/javascript">
function postToWb(){
var _t = encodeURI(document.title);
var _url = encodeURI(document.location);
var _appkey = encodeURI("014b5ac196244f90a23670d609615605");//你从腾讯获得的appkey
var _pic = encodeURI('');//(列如:var _pic='图片url1|图片url2|图片url3....)
var _site = 'http://www.vwu.cc';//你的网站地址
var _u = 'http://v.t.qq.com/share/share.php?title='+_t+'&url='+_url+'&appkey='+_appkey+'&site='+_site+'&pic='+_pic;
window.open( _u,'转播到腾讯微博', 'width=700, height=680, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, location=yes, resizable=no, status=no' );
}
</script>
<span class="pipe">|</span>
<a href="javascript:void(0);" title="分享到QQ空间"><img src="http://qzonestyle.gtimg.cn/ac/qzone_v5/app/app_share/qz_logo.png" alt="分享到QQ空间" /></a><span class="pipe">|</span>

上传文件,完成。

三、图片页
找到:
<span class="pipe">|</span><a href="home.php?mod=spacecp&ac=album&picid=$pic[picid]&op=edithot&handlekey=picedithothk_{$pic[picid]}" id="a_hot_$pic[picid]">{lang hot}</a>
      <!--{/if}-->

在下面添加:
<span class="pipe">|</span>
<script type="text/javascript">document.write('<iframe  frameborder="0" scrolling="no" src="
http://hits.sinajs.cn/A1/weiboshare.html?url=%url%&appkey=1775043196&type=3&ralateUid=1904044821" width="16" height="16"></iframe>'.replace(/%url%/,encodeURIComponent(location.href)));</script>
<span class="pipe">|</span>
<a href="javascript:void(0)" class="tmblog"><img src="http://v.t.qq.com/share/images/s/weiboicon16.png"></a> <script type="text/javascript">
function postToWb(){
var _t = encodeURI(document.title);
var _url = encodeURI(document.location);
var _appkey = encodeURI("014b5ac196244f90a23670d609615605");//你从腾讯获得的appkey
var _pic = encodeURI('');//(列如:var _pic='图片url1|图片url2|图片url3....)
var _site = 'http://www.vwu.cc';//你的网站地址
var _u = 'http://v.t.qq.com/share/share.php?title='+_t+'&url='+_url+'&appkey='+_appkey+'&site='+_site+'&pic='+_pic;
window.open( _u,'转播到腾讯微博', 'width=700, height=680, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, location=yes, resizable=no, status=no' );
}
</script>
<span class="pipe">|</span>
<a href="javascript:void(0);" title="分享到QQ空间"><img src="http://qzonestyle.gtimg.cn/ac/qzone_v5/app/app_share/qz_logo.png" alt="分享到QQ空间" /></a><span class="pipe">|</span>


上传文件,完成。

四、代码解释

</a><span class="pipe">|</span>

分隔符

http://hits.sinajs.cn/A1/weiboshare.html?url=%url%&appkey=1775043196&type=3&ralateUid=1904044821

新浪转播链接 可以到新浪微博开放平台获取

014b5ac196244f90a23670d609615605

腾讯微博APP  可以到腾讯微博开放平台获取

教程完毕,印记。

另:鄙视代码框,害我内容丢失。



AD:新浪微博、腾讯微博登录框美化https://discuz.dismall.com/thread-2015950-1-1.html
演示:

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
海盗伟 发表于 2011-1-4 21:58:54 | 显示全部楼层
沙发啊!要的 就要这个!
回复

使用道具 举报

红人清茶 发表于 2011-1-4 22:01:09 | 显示全部楼层
回复

使用道具 举报

liuwei722 发表于 2011-1-4 22:31:17 | 显示全部楼层

学习中....
回复

使用道具 举报

ilei365 发表于 2011-1-4 22:59:41 | 显示全部楼层
好帖一定要顶。
回复

使用道具 举报

 楼主| a327173196 发表于 2011-1-5 08:35:30 | 显示全部楼层
回复 21newyouth 的帖子

7.2.....这两天忙,有空了弄一个~
回复

使用道具 举报

因素1971 发表于 2011-1-23 19:00:27 | 显示全部楼层
求助,麻烦加我一下QQ100100100
回复

使用道具 举报

liujiie 发表于 2011-1-23 19:16:39 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

222la 发表于 2011-1-23 19:20:03 | 显示全部楼层
回复

使用道具 举报

ayun0351 发表于 2011-1-23 21:08:36 | 显示全部楼层
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-6-18 13:05 , Processed in 0.106723 second(s), 21 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表