1.对于6.0.0版的修改:
查找:- if($post['attachment']) {
- if($allowgetattach) {
- $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($allowgetattach) {
- $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']);
- // }
- }
复制代码 2. 针对6.1.0版的修改:
查找:
- 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];
- }
- }
- }
复制代码 这里保留了“付费浏览状态下附件仍然不可见”的功能。
* 以上均经过各版本默认风格下运行测试。如果出现“可以查看也可以下载”的情况,请检查论坛版块和用户组权限中“是否允许下查看/下载附件”的设置。游客和版块的默认设置是没有这两项权限的 |