久久久久av_欧美日韩一区二区在线_国产精品三区四区_日韩中字在线

Discuz! 官方交流社區

標題: 出售貼的隱藏內容顯示在版塊列表里 [打印本頁]

作者: kofkof    時間: 2022-11-2 22:59
標題: 出售貼的隱藏內容顯示在版塊列表里
貼子設置了主題售價后,手機版可以直接看到 貼子內容顯示在列表頁

作者: 1314學習網    時間: 2022-11-16 10:59
https://gitee.com/Discuz/DiscuzX/pulls/1801/files
打開 source/function/function_forumlist.php

找到
  1. $tids = $attach_tids = $attachtableid_array = $threadlist_data = $posttableids = array();
復制代碼
改為
  1. $tids = $attach_tids = $price_tids = $attachtableid_array = $threadlist_data = $posttableids = array();
復制代碼
再找到
  1. if($value['attachment'] == 2) {
  2.                         $attach_tids[] = $value['tid'];
  3.                 }
復制代碼
改為
  1. if($value['attachment'] == 2) {
  2.                         $attach_tids[] = $value['tid'];
  3.                 }
  4.                 if($value['price'] > 0) {
  5.                         $price_tids[] = $value['tid'];
  6.                 }
復制代碼
再找到
  1. $threadlist_data[$value['tid']]['message'] = messagecutstr($value['message'], 90);
復制代碼
改為
  1. if(in_array($value['tid'], $price_tids)) {
  2.                                 preg_match_all("/\[free\](.+?)\[\/free\]/is", $value['message'], $matches);
  3.                                 $value['message'] = '';
  4.                                 if(!empty($matches[1])) {
  5.                                         foreach($matches[1] as $match) {
  6.                                                 $value['message'] .= $match.' ';
  7.                                         }
  8.                                 }
  9.                         }
  10.                         $threadlist_data[$value['tid']]['message'] = messagecutstr($value['message'], 90);
復制代碼






歡迎光臨 Discuz! 官方交流社區 (http://www.9999xn.com/) Powered by Discuz! W1.0