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

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[插件] [整合美化]首页四格+社区之星后台控制全Cache版 FOR DZ4.1正式版[6.1更新]

[复制链接]
mousecat 发表于 2006-5-12 08:50:01 | 显示全部楼层 |阅读模式
插件名称:整合首页四格cache+社区发贴之星后台控制全Cache版 FOR DZ4.1正式版
插件修改:mousecat
插件原作者:33201,oytktk (靖飒),scropion~
数据库升级:有
安装难度:中

插件演示地址:http://bbs.uwcssa.com/

整合了首页四格cache版和社区法帖之星,可以在后台开启关闭相关版面。

图片演示如下:

首页四格功能:

社区法帖之星功能:

安装方法请看二楼。

[ 本帖最后由 mousecat 于 2006-5-31 23:11 编辑 ]

本帖子中包含更多资源

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

x

评分

1

查看全部评分

 楼主| mousecat 发表于 2006-5-12 08:50:18 | 显示全部楼层
[6月1日重要更新]

全新安装:

1。首先安装:

TOPLIST_首页四格_全Cache版FOR DZ4.1.0 原插件由 oytktk (靖飒) 制作,the 4.1.0 edition is modified by apple123.net

地址: https://discuz.dismall.com/viewthread.php?tid=247056

先不要上传原贴所带附件,只要按步骤2-7改代码即可,第8步修改index.htm留在完成下面的修改之后再来做。

2。然后安装:

社区发贴之星(今日+昨日+本周+本月+本年)后台控制全Cache版 FOR DZ4.1正式版

插件作者:33201

地址: https://discuz.dismall.com/thread-277742-1-1.html

先不要上传原贴所带附件,只要按步骤1-9改代码即可。

3。下面开始修改相应模版目录下面的 index.htm。

查找

  1. <!--{if !empty($newpmexists)}-->
  2.         <div class="maintable">
  3.         {template pmprompt}
  4.         </div>
  5. <!--{/if}-->
复制代码


在下面添加--带后台控制功能

  1. <!--{if empty($gid)}-->
  2. <!--{if $show_poststar}-->
  3. <div class="maintable">
  4. {template toplist}
  5. </div>
  6. <!--{/if}-->
  7. <!--{/if}-->
复制代码



如果不需要后台控制则只需要添加

  1. <!--{if empty($gid)}-->
  2. <div class="maintable">
  3. {template toplist}
  4. </div>
  5. <!--{/if}-->
复制代码



4。上传本贴所带附件到相应目录即可。
如需要修改美化相应功能,只需修改模版目录下toplist.htm即可

p.s. 只是拿来整合,版权完全属于原作者,如果原作者有任何建议或者意见的话,请和我联系。

本贴所带附件为utf-8版,如需要gbk版请看17楼。多谢终结者4提供。

不显示某个子板块:

可以在cache.func.php里面把新加入的那段代码中4个ORDER BY前全部加上and f.fid!=''(引号里是隐藏帖子所在论坛的fid号,例如:and f.fid!='3')更新缓存就行了

时间不准问题:

把首页四格插件里

  1. $timeoffset * 3600
复制代码


换成:

  1. $GLOBALS['timeoffset'] * 3600
复制代码


即可改正。

首页四格列表主题超出一行的修改方法:

由于我用的是1280X1024的分辨率,并不存在这个问题,可是在1024X768的分辨率下就出现了首页四格列表主题超出一行的问题,这个问题可以用如下方法解决:

1:修改限制主题显示字数

在https://discuz.dismall.com/viewthread.php?tid=247056 首页四格的修改中第2步修改include/cache.func.php时,在这一步:
  1. //首页四格TOPLIST_CACHE版, By oytktk 代码首

  2.                 case 'newthread':
  3.                         $colorarray = array('', 'red', 'orange', 'yellow', 'green', 'cyan', 'blue', 'purple', 'gray');
  4.                         while($topthread = $db->fetch_array($query)) {
  5.                                 $threadcolor = sprintf('%02d', $topthread['highlight']);
  6.                                 $topthread['author'] = $topthread['author'] ? $topthread['author'] : '游客';
  7.                                 $topthread['subjectc'] = cutstr($topthread['subject'], 28);
  8.                                 $topthread['threadcolor'] = $threadcolor[1] ? " style="color: ".$colorarray[$threadcolor[1]].""" : NULL;
  9.                                 $topthread['dateline'] = gmdate("Y-m-d H:i", $topthread['dateline'] + $timeoffset * 3600);
  10.                                 $topthread['lastpost'] = gmdate("Y-m-d H:i", $topthread['lastpost'] + $timeoffset * 3600);
  11.                                 $topthread['name'] =  AddSlashes(strip_tags(trim($topthread['name'])));
  12.                                 $data[] = $topthread;
  13.                         }
  14.                         break;

  15.                 case 'newreply':
  16.                         $colorarray = array('', 'red', 'orange', 'yellow', 'green', 'cyan', 'blue', 'purple', 'gray');
  17.                         while($topthread = $db->fetch_array($query)) {
  18.                                 $threadcolor = sprintf('%02d', $topthread['highlight']);
  19.                                 $topthread['author'] = $topthread['author'] ? $topthread['author'] : '游客';
  20.                                 $topthread['subjectc'] = cutstr($topthread['subject'], 26);
  21.                                 $topthread['threadcolor'] = $threadcolor[1] ? " style="color: ".$colorarray[$threadcolor[1]].""" : NULL;
  22.                                 $topthread['dateline'] = gmdate("Y-m-d H:i", $topthread['dateline'] + $timeoffset * 3600);
  23.                                 $topthread['lastpost'] = gmdate("Y-m-d H:i", $topthread['lastpost'] + $timeoffset * 3600);
  24.                                 $topthread['name'] =  AddSlashes(strip_tags(trim($topthread['name'])));
  25.                                 $data[] = $topthread;
  26.                         }
  27.                         break;

  28.                 case 'topdigest':
  29.                         $colorarray = array('', 'red', 'orange', 'yellow', 'green', 'cyan', 'blue', 'purple', 'gray');
  30.                         while($topthread = $db->fetch_array($query)) {
  31.                                 $threadcolor = sprintf('%02d', $topthread['highlight']);
  32.                                 $digest = array('1'=>'[Ⅰ]','2'=>'[Ⅱ]','3'=>'[Ⅲ]');
  33.                                 $topthread['subjectc'] = $digest[$topthread['digest']]."-".cutstr($topthread['subject'], 23);
  34.                                 $topthread['author'] = $topthread['author'] ? $topthread['author'] : '游客';
  35.                                 $topthread['threadcolor'] = $threadcolor[1] ? " style="color: ".$colorarray[$threadcolor[1]].""" : NULL;
  36.                                 $topthread['dateline'] = gmdate("Y-m-d H:i", $topthread['dateline'] + $timeoffset * 3600);
  37.                                 $topthread['lastpost'] = gmdate("Y-m-d H:i", $topthread['lastpost'] + $timeoffset * 3600);
  38.                                 $topthread['name'] =  AddSlashes(strip_tags(trim($topthread['name'])));
  39.                                 $data[] = $topthread;
  40.                         }
  41.                         break;

  42.                 case 'topviews':
  43.                         $colorarray = array('', 'red', 'orange', 'yellow', 'green', 'cyan', 'blue', 'purple', 'gray');
  44.                         while($topthread = $db->fetch_array($query)) {
  45.                                 $threadcolor = sprintf('%02d', $topthread['highlight']);
  46.                                 $topthread['subjectc'] = cutstr($topthread['subject'], 32);
  47.                                 $topthread['threadcolor'] = $threadcolor[1] ? " style="color: ".$colorarray[$threadcolor[1]].""" : NULL;
  48.                                 $topthread['author'] = $topthread['author'] ? $topthread['author'] : '游客';
  49.                                 $topthread['dateline'] = gmdate("Y-m-d H:i", $topthread['dateline'] + $timeoffset * 3600);
  50.                                 $topthread['lastpost'] = gmdate("Y-m-d H:i", $topthread['lastpost'] + $timeoffset * 3600);
  51.                                 $topthread['name'] =  AddSlashes(strip_tags(trim($topthread['name'])));
  52.                                 $data[] = $topthread;
  53.                         }
  54.                         break;


  55.                 //首页四格TOPLIST_CACHE版, By oytktk 代码尾
复制代码


修改
  1. $topthread['subjectc'] = cutstr($topthread['subject'], 28);
复制代码

其中的数字为你需要的字节数即可。

然后更新缓存!

[6月1日重要更新]

1。解决分组论坛显示不正确问题

如果已经安装过本插件,修改相应模版目录下面的 index.htm。

查找

  1. <!--{if $show_poststar}-->
  2. <div class="maintable">
  3. {template toplist}
  4. </div>
  5. <!--{/if}-->
复制代码


修改成为:

  1. <!--{if empty($gid)}-->
  2. <!--{if $show_poststar}-->
  3. <div class="maintable">
  4. {template toplist}
  5. </div>
  6. <!--{/if}-->
  7. <!--{/if}-->
复制代码


如果不需要后台控制则只需要添加

  1. <!--{if empty($gid)}-->
  2. <div class="maintable">
  3. {template toplist}
  4. </div>
  5. <!--{/if}-->
复制代码

[ 本帖最后由 mousecat 于 2006-6-4 05:29 编辑 ]

本帖子中包含更多资源

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

x
回复

使用道具 举报

 楼主| mousecat 发表于 2006-5-12 08:51:01 | 显示全部楼层
首页4格的优化版本:

如我的网站演示,首页4格用圆角表格来修饰。

如需要此版本的话只需要上传下面附件到相应目录即可。

注意:本附件toplist+poststar[1.1].rarutf-8版本,需要gbk的请下载toplist+poststar[1.1][GBK].rar

GBK版已经上传!~

[ 本帖最后由 mousecat 于 2006-5-14 12:54 编辑 ]

本帖子中包含更多资源

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

x
回复

使用道具 举报

yinet 发表于 2006-5-12 09:08:59 | 显示全部楼层


方法?

[ 本帖最后由 yinet 于 2006-5-12 09:10 编辑 ]
回复

使用道具 举报

33201 发表于 2006-5-12 09:12:00 | 显示全部楼层
确实也省了不少地方!
回复

使用道具 举报

shenstef 发表于 2006-5-12 09:12:39 | 显示全部楼层
支持一个  路过
回复

使用道具 举报

 楼主| mousecat 发表于 2006-5-12 09:15:35 | 显示全部楼层
原帖由 33201 于 2006-5-12 09:12 发表
确实也省了不少地方!

呵呵,原作者出现了。。。多谢捧场阿
回复

使用道具 举报

killua_bo 发表于 2006-5-12 09:35:04 | 显示全部楼层
支持啊!
回复

使用道具 举报

amoshuang 发表于 2006-5-12 09:51:18 | 显示全部楼层
原来的那个bug有没有补上?

原来可以显示还没有通过审核的文章标题,吓得我取消了
回复

使用道具 举报

 楼主| mousecat 发表于 2006-5-12 10:06:00 | 显示全部楼层
原帖由 amoshuang 于 2006-5-12 09:51 发表
原来的那个bug有没有补上?

原来可以显示还没有通过审核的文章标题,吓得我取消了


应该没有吧,我改的过程中没发现有什么权限验证的语句,不过我的论坛法帖也不需要审核。。。倒是有的受限制的分区标题会出现在4格当中。
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-4 14:45 , Processed in 0.103212 second(s), 18 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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