discuz 帖子列表页获取文章图片

cbk cbk 1 小时前 1 阅读 所属分类: WEB交流
discuz 帖子列表页获取文章图片   getforumimg($zhanzhuai_imgs['aid'], 0, 140, 140)  140是缩略图大小。

  1. <!--{if $thread['attachment'] == 2}-->
  2.         <!--{eval $zhanzhuai_img = substr($thread['tid'], -1); $zhanzhuai_img_jh = DB::fetch_all("SELECT * FROM ".DB::table('forum_attachment_'.$zhanzhuai_img.'')." WHERE `tid`= $thread[tid] AND isimage = '1' ORDER BY `dateline` ASC limit 0 , 2");}-->                             
  3.           <!--{if is_array($threadlist_data[$thread['tid']]['attachment'])}-->
  4.                 <!--{eval $attach_on = 0;}-->
  5.                 <!--{loop $zhanzhuai_img_jh $zhanzhuai_imgs}-->
  6.                         <!--{eval $attach_on++; if($attach_on > 2) break;}-->
  7.                         <!--{eval $piclists = getforumimg($zhanzhuai_imgs['aid'], 0, 140, 140);}-->              
  8.                                     <div class="kmimg_box imgs_{$attach_on}">
  9.                                        <a href="forum.php?mod=viewthread&tid={$thread['tid']}" class="kmimg" target="_blank"><img src="$piclists "></a>
  10.                                      </div>
  11.                 <!--{/loop}-->
  12.         <!--{/if}-->
  13. <!--{/if}-->
复制代码

评论
B Color Smilies

登录 后才能评论

Powered by cbk! 1.0  © 2001-2027   藏宝库It社区 Team. ( 冀ICP备14008649号 )