|´・ω・)ノ不想百度了

帖子列表页
精华图标代码

<!--{if $thread['digest'] &gt; 0 &amp;&amp; $filter != 'digest'}-->
<img src="{IMGDIR}/digest_$thread[digest].gif" align="absmiddle" alt="digest" title="{lang thread_digest} $thread[digest]">
<!--{/if}-->

图片附件代码

<!--{if $thread['attachment'] == 2}-->
<img src="{STATICURL}image/filetype/image_s.gif" alt="attach_img" title="{lang attach_img}" align="absmiddle">
<!--{elseif $thread['attachment'] == 1}-->
<img src="{STATICURL}image/filetype/common.gif" alt="attachment" title="{lang attachment}" align="absmiddle">
<!--{/if}-->

回帖奖励

<!--{if $thread['replycredit'] > 0}-->
<span class="xi1">[{lang replycredit} <strong> $thread['replycredit']</strong> ]</span>
<!--{/if}-->

主题图标(推荐、美图等红色圆框的那种)

<!--{if $thread[icon] >= 0}-->
<img src="{STATICURL}image/stamp/{$_G[cache][stamps][$thread[icon]][url]}" alt="{$_G[cache][stamps][$thread[icon]][text]}" align="absmiddle">
<!--{/if}-->

主题售价、悬赏价

<!--{if $thread['price'] > 0}-->
<!--{if $thread['special'] == '3'}-->

<a href="forum.php?mod=forumdisplay&fid=$_G[fid]&amp;filter=specialtype&amp;specialtype=reward$forumdisplayadd[specialtype]{if $_GET['archiveid']}&amp;archiveid={$_GET['archiveid']}{/if}&rewardtype=1" title="{lang show_rewarding_only}"><span class="xi1">{lang thread_reward} <span class="xw1">$thread[price]&lt;/span&gt; {$_G[setting$_G['setting']['creditstransextra'][2]][unit]}{$_G[setting$_G['setting'[2]][title]}]</span></a>
<!--{else}-->
{lang price} <span class="xw1">$thread[price]&lt;/span&gt; {$_G[setting$_G['setting']['creditstransextra'][1]][unit]}{$_G[setting$_G['setting'[1]][title]}]
<!--{/if}-->
<!--{elseif $thread['special'] == '3' &amp;&amp; $thread['price'] < 0}-->

<a href="forum.php?mod=forumdisplay&fid=$_G[fid]&amp;filter=specialtype&amp;specialtype=reward$forumdisplayadd[specialtype]{if $_GET['archiveid']}&amp;archiveid={$_GET['archiveid']}{/if}&rewardtype=2" title="{lang show_rewarded_only}">[{lang reward_solved}]</a>

是否为手机发帖

<!--{if $thread['mobile']}-->
<img src="{IMGDIR}/mobile-attach-$thread['mobile'].png" alt="{lang post_mobile}" align="absmiddle">
<!--{/if}-->

评价指数

<!--{if $thread[recommendicon] &amp;&amp; $filter != 'recommend'}-->
<img src="{IMGDIR}/recommend_$thread[recommendicon].gif" align="absmiddle" alt="recommend" title="{lang thread_recommend} $thread[recommends]">
<!--{/if}-->

帖子热度

<!--{if $thread[heatlevel]}-->
<img src="{IMGDIR}/hot_$thread[heatlevel].gif" align="absmiddle" alt="heatlevel" title="{lang heats}: {$thread[heats]}">
<!--{/if}-->

帖子被加分减分

<!--{if $thread['rate'] > 0}-->
<img src="{IMGDIR}/agree.gif" align="absmiddle" alt="agree" title="{lang rate_credit_add}">
<!--{elseif $thread['rate'] < 0}-->
<img src="{IMGDIR}/disagree.gif" align="absmiddle" alt="disagree" title="{lang posts_deducted}">
<!--{/if}-->

主题分类文字、图标、分类帖子数。

<!--{if $_G'forum'}-->
<!--{loop $_G['forum']['threadtypes']['types'] $id $name}-->
<!--{if $_GET['typeid'] == $id}-->
<li class="xw1 a"><a href="forum.php?mod=forumdisplay&fid=$_G[fid]{if $_GET['sortid']}&filter=sortid&sortid=$_GET['sortid']{/if}{if $_GET['archiveid']}&archiveid={$_GET['archiveid']}{/if}"&gt;&lt;!--{if $_Gforumicons'threadtypes' == 2}--><img class="vm" src="$_G[forum][threadtypes][icons][$id]" alt=""> <!--{/if}-->$name&lt;!--{if $showthreadclasscounttypeid[$id]</span><!--{/if}--></a></li>
<!--{else}-->
<li><a href="forum.php?mod=forumdisplay&fid=$_G[fid]&amp;filter=typeid&amp;typeid=$id$forumdisplayadd[typeid]{if $_GET['archiveid']}&archiveid={$_GET['archiveid']}{/if}"&gt;&lt;!--{if $_Gforumicons'threadtypes' == 2}--><img class="vm" src="$_G[forum][threadtypes][icons][$id]" alt=""> <!--{/if}-->$name&lt;!--{if $showthreadclasscounttypeid[$id]</span><!--{/if}--></a></li>
<!--{/if}-->
<!--{/loop}-->
<!--{/if}-->

完美解决了帖子摘要,其中:120为摘要的字数@(狂汗)

<!--{eval require_once(DISCUZ_ROOT."./source/function/function_post.php");}--> <!--{echo messagecutstr(DB::result_first('SELECT message FROM '.DB::table('forum_post').' WHERE tid ='.$thread[tid].' AND first =1'),120);}-->

css代码巧妙鼠标经过图片变换

<img src="#" name="picture" width="330" height="210" border="0" align="middle" onMouseOver="this.src='#" onMouseOut="this.src='#">

首先你需要了解js事件名称(百科不谢)
算了,我还是写出来吧 onMouseOver就是鼠标移动到这边时的,onMouseOut鼠标又移动出来后

版权属于:染念
本文链接: https://dyedd.cn/49.html
作品采用:本作品采用 知识共享署名-相同方式共享 4.0 国际许可协议 进行许可。
更新于: 2020年08月12日 20:56
0
发表评论


178 文章数
667 评论量
4 分类数
182 页面数
已在风雨中度过 7年37天1小时1分
目录
来自 《笔记*dz开发常用的代码》
© 2024 染念Blog
浙ICP备19020194号-1
暗黑模式
暗黑模式
评论
返回顶部
© 2024 染念Blog
浙ICP备19020194号-1
暗黑模式
暗黑模式
评论
返回顶部