discuz怎么在帖子列表页获取到帖子内容中的所有图片的路径地址(不光是只要封面图哟)

2025-03-10 23:41:54
推荐回答(2个)
回答1:

if( $thread['attachment'] ) {
    if(preg_match_all("/\[attach\](\d+)\[\/attach\]/i", $thread['message'], $matchaids)) {
        $attachpids = $matchaids[1];
    }
    $thread['imagelist'] = C::t('forum_attachment_n')->fetch_all_by_id('tid:'.$thread['tid'], 'tid', $thread['tid'], '', true);
}
加在forumdisplay.php 812行后

回答2:

用火车头采集啊