m.king 发表于 2012-7-27 18:01 
该问题我们再讨论下,感谢您的反馈!
现在我想使“帖子中[hide]标签最大有效天数”的设置只对隐藏帖有效,对加密帖无效,需要修改代码实现。
我想应该是在下面的文件里修改,只是对DZ还不是太熟悉,看看应该怎样修改才能使该设置只对[hide]标签起作用,对类似[hide=9999999]标签不起作用:
source\function\function_discuzcode.php- if($parsetype != 1 && strpos($msglower, '[/hide]') !== FALSE && $pid) {
- if($_G['setting']['hideexpiration'] && $pdateline && (TIMESTAMP - $pdateline) / 86400 > $_G['setting']['hideexpiration']) {
- $message = preg_replace("/\[hide[=]?(d\d+)?[,]?(\d+)?\]\s*(.*?)\s*\[\/hide\]/is", "\\3", $message);
- $msglower = strtolower($message);
- }
- if(strpos($msglower, '[hide=d') !== FALSE) {
- $message = preg_replace("/\[hide=(d\d+)?[,]?(\d+)?\]\s*(.*?)\s*\[\/hide\]/ies", "expirehide('\\1','\\2','\\3', $pdateline)", $message);
- $msglower = strtolower($message);
- }
- if(strpos($msglower, '[hide]') !== FALSE) {
- if($authorreplyexist === null) {
- if(!$_G['forum']['ismoderator']) {
- if($_G['uid']) {
- $authorreplyexist = C::t('forum_post')->fetch_pid_by_tid_authorid($_G['tid'], $_G['uid']);
- }
- } else {
- $authorreplyexist = TRUE;
- }
- }
- if($authorreplyexist) {
- $message = preg_replace("/\[hide\]\s*(.*?)\s*\[\/hide\]/is", tpl_hide_reply(), $message);
- } else {
- $message = preg_replace("/\[hide\](.*?)\[\/hide\]/is", tpl_hide_reply_hidden(), $message);
- $message .= '<script type="text/javascript">replyreload += \',\' + '.$pid.';</script>';
- }
- }
- if(strpos($msglower, '[hide=') !== FALSE) {
- $message = preg_replace("/\[hide=(\d+)\]\s*(.*?)\s*\[\/hide\]/ies", "creditshide(\\1,'\\2', $pid, $authorid)", $message);
- }
- }
- }
复制代码 |