花魁直播高品质美女在线视频互动社区 - 花魁直播官方版

 歡迎來(lái)到素材無(wú)憂網(wǎng),按 + 收藏我們
登錄 注冊(cè) 退出 找回密碼

discuz 帖內(nèi)調(diào)用作者所有帶封面帖子

時(shí)間: 2019-05-24 11:57 閱讀: 作者:素材無(wú)憂網(wǎng)

目錄 帖內(nèi)調(diào)用作者所有帶封面帖子,可在viewthread.htm中使用。         
<div class="uc-piclist">
            <!--{eval $theuid = $_G[forum_thread][authorid]}-->
            <!--{eval $authorthreads = DB::fetch_all("SELECT * FROM ".DB::table('forum_thread')." WHERE `authorid`= '$theuid' AND `cover`!=0 ORDER by dateline DESC LIMIT 0,9;");}-->
            <ul>
                <!--{loop $authorthreads $authorthread}-->
                <!--{eval $threadcover = DB::result(DB::query("SELECT attachment FROM ".DB::table('forum_threadimage')." WHERE `tid`= '$authorthread[tid]'"));}-->
                <!--{eval $threadfname = DB::result(DB::query("SELECT name FROM ".DB::table('forum_forum')." WHERE `fid`= '$authorthread[fid]'"));}-->
                <li>
                    <div class="uc-piclist-con-top">
                        <div class="uc-thumb">
                            <a href="forum.php?mod=viewthread&tid={$authorthread['tid']}" onclick="atarget(this)" title="$authorthread[subject] by admin" class="z">
                            <img src="http://file.cmsbj.cn/cmsbj_file/forum/$threadcover" alt="$authorthread[subject] by $authorthread[author]" width="265" height="auto">
                            </a>
                        </div>
                        <div class="uc-title">
                            <a href="forum.php?mod=viewthread&tid={$authorthread['tid']}" onclick="atarget(this)" title="$authorthread[subject] by $authorthread[author]" class="uc-title-a"><span>$authorthread[subject]</span></a>
                            <div class="uc-title-bg"></div>
                        </div>
                    </div>
                    <div class="uc-piclist-con-bot">
                        <div class="uc-stat">
                            <span title="查看"><i class="ico-eye-open ico-gray"></i>$authorthread[views]</span>
                            <span title="回復(fù)"><i class="ico-comment ico-gray"></i>$authorthread[replies]</span>
                            <span title="喜歡"><i class="ico-heart ico-gray"></i>$authorthread[favtimes]</span>
                            <!--{if $authorthread[digest] > 0}--><span title="精華"><font color=red>精華</font></span><!--{/if}-->
                        </div>
                        <div class="uc-author">
                            <span><!--{echo dgmdate($authorthread[dateline], 'u', '9999', getglobal('setting/dateformat'))}--></span>
                            <a href="forum.php?mod=forumdisplay&fid={$authorthread[fid]}" class="uc-forumname" title="TA發(fā)表在<!--{$threadfname}-->"><!--{$threadfname}--></a>
                        </div>
                    </div>
                </li>
                <!--{/loop}-->
            </ul>
            <div class="morethreads cl pgbtn"><a href="home.php?mod=space&uid=$authorthread[authorid]" hidefocus="true">去看更多...</a></div>
        </div>

根據(jù)帖子作者uid查詢(xún)帖子,再用獲取到的tid查詢(xún)帖子封面表獲取封面。 圖片路徑是遠(yuǎn)程附件路徑,本服務(wù)器的換成data/attachment/forum/$threadcover 也可縮略圖顯示,loop中加入<!--{eval $imagelistkeys = getforumimg($threadcover, 0, 265, 0); }-->。

版權(quán)聲明: 本站資源均來(lái)自互聯(lián)網(wǎng)或會(huì)員發(fā)布,如果侵犯了您的權(quán)益請(qǐng)與我們聯(lián)系,我們將在24小時(shí)內(nèi)刪除!謝謝!

轉(zhuǎn)載請(qǐng)注明: discuz 帖內(nèi)調(diào)用作者所有帶封面帖子

標(biāo)簽:  
相關(guān)文章
模板推薦