• Discuz 首页图文列表实现


    <div id="shoucang">
    
    <!--{eval $list_count=0;}-->
    <!--{loop $threadlist $thread}-->
    <!--{eval $list_count+=1;}-->
    
            <div class="scitem scitemimage show"{if $list_count%3==0}style="margin-right: 0px;"{/if}>
            
            <!--{eval $syaidtable='forum_attachment_'.$thread[tid]%10;}-->
            <!--{eval $fujian=DB::result_first("SELECT `attachment` FROM ".DB::table($syaidtable)." WHERE tid=$thread[tid] AND isimage=1");}-->
            <!--{if $fujian}-->
                <!--{eval $iconurl='data/attachment/forum/'.$fujian}-->
            <!--{else}-->
                <!--{eval $iconurl='static/image/common/nophotosmall.gif'}--> 
            <!--{/if}-->
            
            <a style="text-decoration:underline;color: #000" class="simage" href="forum.php?mod=viewthread&tid=$thread[tid]" target="_blank">
            <img style=" 290px;height:180px" src="$iconurl" onerror='this.src="template/iscwo_design_2013/img/nophoto.gif"' border='0' />
            <div class="simagemask">
                <p>
                    $thread[subject]{echo messagecutstr(strip_tags($thread['post']['message']), 200);}
                </p>
            </div>
            </a>
            
                <div class="simgbody">
                    <div class="simgh">
                        <a href="forum.php?mod=viewthread&tid=$thread[tid]" class="simgtitle" target="_blank">$thread[subject]</a>
            <!--{eval $syaidtable='forum_attachment_'.$thread[tid]%10;}-->
            <!--{eval $fujian=DB::result_first("SELECT `aid` FROM ".DB::table($syaidtable)." WHERE tid=$thread[tid] AND isimage=0");}-->
            <!--{if $fujian}-->
            <a href="forum.php?mod=viewthread&tid=$thread[tid]" class="sylist_fj" title="有附件"  hidefocus="true"></a> 
            <!--{else}-->
            <a href="forum.php?mod=viewthread&tid=$thread[tid]" class="sylist_blank" title="新窗口打开" hidefocus="true" target="_blank"></a> 
            <!--{/if}-->
    
    
                    </div>
                    <div class="clear">
                    </div>
                    
                    <!--<a href="/" target="_blank">视觉设计</a>-->
    </p>
    
                
                    <div class="clear">
                    </div>
                    <div class="simgfoot">
                        <div>
                            <span class="simgdate"></span><span>2013-07-18</span>
                        </div>
    
            <script type="text/javascript" src="{$_G['setting']['jspath']}forum_viewthread.js?{VERHASH}"></script>
            
            
    
                        <p class="itemfoot">
                            <a href="" class="yyicon2 yy2dian"></a><span class="iftxt">$thread[views]</span>
                            <a href="" class="yyicon2 yy2dian"></a><span class="iftxt">$thread[replies]</span>
    
                 <!--{if ($_G['group']['allowrecommend'] || !$_G['uid']) && $_G['setting']['recommendthread']['status']}-->
                <!--{if !empty($_G['setting']['recommendthread']['addtext'])}-->
                        
                            <a id="recommend_add$list_count" class="yyicon2 yy2xiaoxin" hidefocus="true" href="forum.php?mod=misc&action=recommend&do=add&tid=$thread[tid]&hash={FORMHASH}" {if $_G['uid']}onclick="ajaxmenu(this, 3000, 1, 0, '43', 'recommendupdate({$_G['group']['allowrecommend']})');return false;"{else} onclick="showWindow('login', this.href)"{/if} onmouseover="this.title = $('recommendv_add{$list_count}').innerHTML + ' {lang activity_member_unit}喜欢'"><span class="ftishi">添加到我喜欢</span></a>
                            
                            <span class="iftxt">$thread[recommend_add]</span>
                <!--{/if}-->
                            
              <!--{/if}-->
                        </p>
                    </div>
                </div>
                <div class="clear">
                </div>
            </div>
    
    
    <!--{/loop}-->

    <div style="margin-top:20px;" class="wp1024 mbw cl">

    <p class="{if $lastpage && $nextpage}fd_page2{else}fd_page1{/if}">

    <!--{if $lastpage}--><a class="fd_last" href="forum.php?page=$lastpage"></a><!--{/if}-->

    <!--{if $nextpage}--><a class="fd_next" href="forum.php?page=$nextpage"></a><!--{/if}-->

    </p>

    </div>
  • 相关阅读:
    LeetCode:Remove Duplicates from Sorted List
    LeetCode:Remove Nth Node From End of List
    LeetCode:Delete Node in a Linked List
    LeetCode:Rotate Image
    LeetCode:Anagrams(字母颠倒)
    LeetCode:Single NumberⅡ
    LeetCode:Single Number
    LeetCode:Longest Common Prefix
    bzoj1025
    bzoj1024
  • 原文地址:https://www.cnblogs.com/lingzhao/p/3539361.html
Copyright © 2020-2023  润新知