6.1.0版简单修改完美解决“游客可以查看但不能下载附件”难题

DISCUZ!   评论

查找:

复制内容到剪贴板

代码:

        if($post['attachment']) {
                if($allowgetattach && !$threadpay) {
                        $attachpids .= ",$post[pid]";
                        $post[’attachment’] = 0;
                        if(preg_match_all("/\[attach\](\d+)\[\/attach\]/i", $post[’message’], $matchaids)) {
                                $attachtags[$post[’pid’]] = $matchaids[1];
                        }
                } else {
                        $post[’message’] = preg_replace("/\[attach\](\d+)\[\/attach\]/i", ”, $post[’message’]);
                }
        }

改为:

复制内容到剪贴板

代码:

if($post['attachment']) {
                if(!$threadpay) {
                        $attachpids .= ",$post[pid]";
                        $post[’attachment’] = 0;
                        if(preg_match_all("/\[attach\](\d+)\[\/attach\]/i", $post[’message’], $matchaids)) {
                                $attachtags[$post[’pid’]] = $matchaids[1];
                        }
                }
        }

 

原帖地址:http://www.discuz.net/viewthread.php?tid=645342&highlight=%2Bsdaupp

相关文章

  • 使用CSS截字
  • 域名争议成立三要件
  • 地方性网站独特运营方法(真实可行)
  • 田纪云:近距离感受邓小平
  • 搜索引擎的页面各个元素的权重比例参考
  • 李爱珍女士第5次落选中国院士
  • 如何区分真假蜂蜜
  • 做站还是com,炒米可以多元化
  • 评论本文

    GlossyBlue & 皖ICP备05001516号 CopyRight 2007,玉楼春
    Entries RSS Comments RSS Login