[插件发布] [原创] [DST]【DZ7.0首发插件】【帖子布景V0.4.1】

  • 插件名称: 帖子布景
  • 适用版本: 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"文件修改其中部分代码:
    找到:
    1. $query = $sdb->query("SELECT p.*, m.uid, m.username, m.groupid, m.adminid, m.regdate, m.lastactivity, m.posts, m.digestposts, m.oltime,
    复制代码
    替换为:
    1. $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,
    复制代码
    找到:
    1. LEFT JOIN {$tablepre}memberfields mf ON mf.uid=m.uid
    复制代码
    替换为:
    1. LEFT JOIN {$tablepre}memberfields mf ON mf.uid=m.uid LEFT JOIN displu_dress_users bg ON bg.uid=m.uid
    复制代码
    找到:
    1. $postlist[$post['pid']] = viewthread_procpost($post);
    复制代码
    下面加:
    1.                 include_once './plugins/DisPlu_Dress/displu_config.php';
    2.                 $membg = $conbg = array();
    3.                 if($postlist[$post['pid']]['number'] <= $bgfloor || $bgfloor == 0){
    4.                         if($postlist[$post['pid']]['membg']!=''){
    5.                                 $membg = unserialize($postlist[$post['pid']]['membg']);
    6.                                 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].';"';
    7.                         }
    8.                         if($postlist[$post['pid']]['conbg']!=''){
    9.                                 $conbg = unserialize($postlist[$post['pid']]['conbg']);
    10.                                 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].';"';
    11.                         }
    12.                 }
    复制代码
    4-打开templates\default目录下的"viewthread_node.htm"文件修改部分代码(如果你用的其他模板中有viewthread_node.htm文件,请相应修改该文件)

    找到: (找到第一处的(共有多处,只替换第一处!)
    1. <td class="postauthor">
    复制代码
    替换为:
    1. <td class="postauthor" $post[membg]>
    复制代码
    找到: (找到第一处的(共有多处,只替换第一处!)
    1. <td class="postcontent">
    复制代码
    替换为:
    1. <td class="postcontent" $post[conbg]>
    复制代码
    演示:













    附件:[hide][/hide]
    附件: 您所在的用户组无法下载或查看附件
    好东西支持
    一定要看看一定要看看一定要看看
    前来看看
    前来看看
    看看好不好啊~~
    1

    评分次数

    • ⿴追忆困ㄋ

    看看,怎么用的呀.
    好东西支持
    看看哦!!好东西哦
    yao shi yincang
    看看好不好啊~~
    看看是什么效果
    一定要看看
    瞧一瞧  看一看
    支持, 看看
    我一定要看看啊,嘻嘻