https://gitee.com/Discuz/DiscuzX/pulls/1801/files
打开 source/function/function_forumlist.php
找到
- $tids = $attach_tids = $attachtableid_array = $threadlist_data = $posttableids = array();
复制代码改为
- $tids = $attach_tids = $price_tids = $attachtableid_array = $threadlist_data = $posttableids = array();
复制代码再找到
- if($value['attachment'] == 2) {
- $attach_tids[] = $value['tid'];
- }
复制代码改为
- if($value['attachment'] == 2) {
- $attach_tids[] = $value['tid'];
- }
- if($value['price'] > 0) {
- $price_tids[] = $value['tid'];
- }
复制代码再找到
- $threadlist_data[$value['tid']]['message'] = messagecutstr($value['message'], 90);
复制代码改为
- if(in_array($value['tid'], $price_tids)) {
- preg_match_all("/\[free\](.+?)\[\/free\]/is", $value['message'], $matches);
- $value['message'] = '';
- if(!empty($matches[1])) {
- foreach($matches[1] as $match) {
- $value['message'] .= $match.' ';
- }
- }
- }
- $threadlist_data[$value['tid']]['message'] = messagecutstr($value['message'], 90);
复制代码