程序目录source\module\forum\forum_viewthread.PHP 搜索$post['relateitem']
改为 if($post['tags']) { $post['relateitem'] = getrelateitem($post['tags'], $post['tid'], $_G['setting']['relatenum'], $_G['setting']['relatetime']); foreach($post['relateitem'] as $k=>$img) { $threada= C::t('forum_attachment')->fetch_all_by_id('tid', $img['tid'], 'aid'); $threadaid = reset($threada); $threadpic = C::t('forum_attachment_n')->fetch_by_aid_uid($threadaid['tableid'], $threadaid['aid'], $thread['authorid']); $thread['pic'] = $threadpic['attachment']; $post['relateitem'][$k]['img'] = 'data/attachment/forum/'.$thread['pic']; } }
模板目录\template\default\forum\viewthread_node.htm
<!--{if $post['relateitem']}--> <div class="mtw mbw"> <h3 class="pbm mbm bbda">{lang related_thread}</h3> <ul class="xl xl2 cl"> <!--{loop $post['relateitem'] $var}--> <li>• <a href="forum.PHP?mod=viewthread&tid=$var[tid]" title="$var[subject]" target="_blank"> <img src="$var[img]" height="252" width="175" alt="$var[subject]" >$var[subject]</a> </li> <!--{/loop}--> </ul> </div> <!--{/if}-->
调用标签 $var[img]
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。