|
  
- 帖子
- 312
- 精华
- 6
- 学习值
- 15 点
- 最后登录
- 2009-7-3
|
楼主
发表于 2009-3-6 14:39
| 只看该作者
插件名称: 帖子布景
适用版本: Discuz!7.0
语言编码: GBK
插件作者: 追忆
版权所属: 追忆
支持网站: http://www.q-bei.com
插件简介: 帖子布景V0.4.1
本帖最后由 ⿴追忆困ㄋ 于 2009-3-15 22:25 编辑
插件说明:用户可以利用论坛设置的交易积分购买帖子布景,所谓帖子布景就是用来装饰位于帖子左边的用户信息处和帖子正文处的背景图片。用户购买最小期限为30天,用户可以设置是否启用帖子布景,可对详细显示方式进行设置。
安装前:
1-确认你的论坛的"全局"-"积分设置"中的"交易积分设置"不为"无"。
2-确认在你论坛的"工具"-"数据库"-"升级"中可以运行数据库升级语句。
安装步骤:
1-上传upload文件夹中的所有文件和DisPlu_install.php文件到论坛根目录。
2-运行DisPlu_install.php安装数据库。如果运行错误,需手动安装,论坛后台-"工具"-"数据库"-"升级",复制"SQL.txt"文档中的全部内容进去,提交。
3-打开论坛根目录下的"viewthread.php"文件修改其中部分代码:
找到:- $query = $sdb->query("SELECT p.*, m.uid, m.username, m.groupid, m.adminid, m.regdate, m.lastactivity, m.posts, m.digestposts, m.oltime,
复制代码 替换为:- $query = $sdb->query("SELECT bg.membg, bg.conbg, p.*, m.uid, m.username, m.groupid, m.adminid, m.regdate, m.lastactivity, m.posts, m.digestposts, m.oltime,
复制代码 找到:- LEFT JOIN {$tablepre}memberfields mf ON mf.uid=m.uid
复制代码 替换为:- LEFT JOIN {$tablepre}memberfields mf ON mf.uid=m.uid LEFT JOIN displu_dress_users bg ON bg.uid=m.uid
复制代码 找到:- $postlist[$post['pid']] = viewthread_procpost($post);
复制代码 下面加:- include_once './plugins/DisPlu_Dress/displu_config.php';
- $membg = $conbg = array();
- if($postlist[$post['pid']]['number'] <= $bgfloor || $bgfloor == 0){
- if($postlist[$post['pid']]['membg']!=''){
- $membg = unserialize($postlist[$post['pid']]['membg']);
- if($membg[active]&&$membg[expiration]>$timestamp) $postlist[$post['pid']]['membg'] = 'style="background-image:url(plugins/DisPlu_Dress/images/bg/'.$membg[file].');background-repeat:'.$membg[repeat].';background-position:'.$membg[position].';"';
- }
- if($postlist[$post['pid']]['conbg']!=''){
- $conbg = unserialize($postlist[$post['pid']]['conbg']);
- if($conbg[active]&&$conbg[expiration]>$timestamp) $postlist[$post['pid']]['conbg'] = 'style="background-image:url(plugins/DisPlu_Dress/images/bg/'.$conbg[file].');background-repeat:'.$conbg[repeat].';background-position:'.$conbg[position].';"';
- }
- }
复制代码 4-打开templates\default目录下的"viewthread_node.htm"文件修改部分代码(如果你用的其他模板中有viewthread_node.htm文件,请相应修改该文件)
找到: (找到第一处的(共有多处,只替换第一处!)替换为:- <td class="postauthor" $post[membg]>
复制代码 找到: (找到第一处的(共有多处,只替换第一处!)替换为:- <td class="postcontent" $post[conbg]>
复制代码 演示:  
附件:[hide][/hide] |
附件: 您所在的用户组无法下载或查看附件
|