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

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

帖子中[hide]标签最大有效天数的问题

[复制链接]
军刀闪亮 发表于 2012-7-27 17:04:54 | 显示全部楼层 |阅读模式
在“帖子中[hide]标签最大有效天数”设置了有效期后,过期时不但隐藏帖代码失效了,就连加密帖的代码也失效了。
也许官方就是这么设计,但这样确实不妥。
论坛搞活动的持续时间不固定,还有些帖子是个人的隐私内容且不想公开的,代码一失效就完全暴露了。
其实,使用隐藏帖和加密帖的权限就应该是分开设置的,现在是都在一起了,要有就都有,要没有就都没有。
m.king 发表于 2012-7-27 18:01:36 | 显示全部楼层
该问题我们再讨论下,感谢您的反馈!
回复

使用道具 举报

 楼主| 军刀闪亮 发表于 2012-7-27 18:37:37 | 显示全部楼层
m.king 发表于 2012-7-27 18:01
该问题我们再讨论下,感谢您的反馈!

现在我想使“帖子中[hide]标签最大有效天数”的设置只对隐藏帖有效,对加密帖无效,需要修改代码实现。
我想应该是在下面的文件里修改,只是对DZ还不是太熟悉,看看应该怎样修改才能使该设置只对[hide]标签起作用,对类似[hide=9999999]标签不起作用:
source\function\function_discuzcode.php
  1.                 if($parsetype != 1 && strpos($msglower, '[/hide]') !== FALSE && $pid) {
  2.                         if($_G['setting']['hideexpiration'] && $pdateline && (TIMESTAMP - $pdateline) / 86400 > $_G['setting']['hideexpiration']) {
  3.                                 $message = preg_replace("/\[hide[=]?(d\d+)?[,]?(\d+)?\]\s*(.*?)\s*\[\/hide\]/is", "\\3", $message);
  4.                                 $msglower = strtolower($message);
  5.                         }
  6.                         if(strpos($msglower, '[hide=d') !== FALSE) {
  7.                                 $message = preg_replace("/\[hide=(d\d+)?[,]?(\d+)?\]\s*(.*?)\s*\[\/hide\]/ies", "expirehide('\\1','\\2','\\3', $pdateline)", $message);
  8.                                 $msglower = strtolower($message);
  9.                         }
  10.                         if(strpos($msglower, '[hide]') !== FALSE) {
  11.                                 if($authorreplyexist === null) {
  12.                                         if(!$_G['forum']['ismoderator']) {
  13.                                                 if($_G['uid']) {
  14.                                                         $authorreplyexist = C::t('forum_post')->fetch_pid_by_tid_authorid($_G['tid'], $_G['uid']);
  15.                                                 }
  16.                                         } else {
  17.                                                 $authorreplyexist = TRUE;
  18.                                         }
  19.                                 }
  20.                                 if($authorreplyexist) {
  21.                                         $message = preg_replace("/\[hide\]\s*(.*?)\s*\[\/hide\]/is", tpl_hide_reply(), $message);
  22.                                 } else {
  23.                                         $message = preg_replace("/\[hide\](.*?)\[\/hide\]/is", tpl_hide_reply_hidden(), $message);
  24.                                         $message .= '<script type="text/javascript">replyreload += \',\' + '.$pid.';</script>';
  25.                                 }
  26.                         }
  27.                         if(strpos($msglower, '[hide=') !== FALSE) {
  28.                                 $message = preg_replace("/\[hide=(\d+)\]\s*(.*?)\s*\[\/hide\]/ies", "creditshide(\\1,'\\2', $pid, $authorid)", $message);
  29.                         }
  30.                 }
  31.         }
复制代码
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-2-26 20:54 , Processed in 0.035264 second(s), 4 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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