discuz 模板中一些代码记录-Discuz教程下载

discuz 模板中一些代码记录

开通本站Svip会员,全站资源免费下
因为不懂php代码,在网上又检索不到,只好不断的测试,测试后知道的都记录下来,以备以后使用。
一、帖子列表页
1. 精华图标代码
  1. <!--{if $thread['digest'] > 0 && $filter != 'digest'}-->
  2. <img src="{IMGDIR}/digest_$thread[digest].gif" align="absmiddle" alt="digest" title="{lang thread_digest} $thread[digest]" />
  3. <!--{/if}-->
复制代码
2. 图片附件代码
  1. <!--{if $thread['attachment'] == 2}-->
  2. <img src="{STATICURL}image/filetype/image_s.gif" alt="attach_img" title="{lang attach_img}" align="absmiddle" />
  3. <!--{elseif $thread['attachment'] == 1}-->
  4. <img src="{STATICURL}image/filetype/common.gif" alt="attachment" title="{lang attachment}" align="absmiddle" />
  5. <!--{/if}-->
复制代码
3. 回帖奖励
  1. <!--{if $thread['replycredit'] > 0}-->
  2. - <span class="xi1">[{lang replycredit} <strong> $thread['replycredit']</strong> ]</span>
  3. <!--{/if}-->
复制代码
4. 主题图标(推荐、美图等红色圆框的那种)
  1. <!--{if $thread[icon] >= 0}-->
  2. <img src="{STATICURL}image/stamp/{$_G[cache][stamps][$thread[icon]][url]}" alt="{$_G[cache][stamps][$thread[icon]][text]}" align="absmiddle" />
  3. <!--{/if}-->
复制代码
5. 主题售价、悬赏价
  1. <!--{if $thread['price'] > 0}-->
  2. <!--{if $thread['special'] == '3'}-->
  3. - <a href="forum.php?mod=forumdisplay&fid=$_G[fid]&filter=specialtype&specialtype=reward$forumdisplayadd[specialtype]{if $_GET['archiveid']}&archiveid={$_GET['archiveid']}{/if}&rewardtype=1" title="{lang show_rewarding_only}"><span class="xi1">[{lang thread_reward} <span class="xw1">$thread[price]</span> {$_G[setting][extcredits][$_G['setting']['creditstransextra'][2]][unit]}{$_G[setting][extcredits][$_G['setting']['creditstransextra'][2]][title]}]</span></a>
  4. <!--{else}-->
  5. - [{lang price} <span class="xw1">$thread[price]</span> {$_G[setting][extcredits][$_G['setting']['creditstransextra'][1]][unit]}{$_G[setting][extcredits][$_G['setting']['creditstransextra'][1]][title]}]
  6. <!--{/if}-->
  7. <!--{elseif $thread['special'] == '3' && $thread['price'] < 0}-->
  8. - <a href="forum.php?mod=forumdisplay&fid=$_G[fid]&filter=specialtype&specialtype=reward$forumdisplayadd[specialtype]{if $_GET['archiveid']}&archiveid={$_GET['archiveid']}{/if}&rewardtype=2" title="{lang show_rewarded_only}">[{lang reward_solved}]</a>
  9. <!--{/if}-->
复制代码
6. 是否为手机发帖
  1. <!--{if $thread['mobile']}-->
  2. <img src="{IMGDIR}/mobile-attach-$thread['mobile'].png" alt="{lang post_mobile}" align="absmiddle" />
  3. <!--{/if}-->
复制代码
7. 评价指数
  1. <!--{if $thread[recommendicon] && $filter != 'recommend'}-->
  2. <img src="{IMGDIR}/recommend_$thread[recommendicon].gif" align="absmiddle" alt="recommend" title="{lang thread_recommend} $thread[recommends]" />
  3. <!--{/if}-->
复制代码
8. 帖子热度
  1. <!--{if $thread[heatlevel]}-->
  2. <img src="{IMGDIR}/hot_$thread[heatlevel].gif" align="absmiddle" alt="heatlevel" title="{lang heats}: {$thread[heats]}" />
  3. <!--{/if}-->
复制代码
9. 帖子被加分/减分
  1. <!--{if $thread['rate'] > 0}-->
  2. <img src="{IMGDIR}/agree.gif" align="absmiddle" alt="agree" title="{lang rate_credit_add}" />
  3. <!--{elseif $thread['rate'] < 0}-->
  4. <img src="{IMGDIR}/disagree.gif" align="absmiddle" alt="disagree" title="{lang posts_deducted}" />
  5. <!--{/if}-->
复制代码
10.主题分类文字、图标、分类帖子数。
  1.      <!--{if $_G['forum']['threadtypes']}-->
  2.           <!--{loop $_G['forum']['threadtypes']['types'] $id $name}-->
  3.                 <!--{if $_GET['typeid'] == $id}-->
  4.                      <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}"><!--{if $_G[forum][threadtypes][icons][$id] && $_G['forum']['threadtypes']['prefix'] == 2}--><img class="vm" src="$_G[forum][threadtypes][icons][$id]" alt="" /> <!--{/if}-->$name<!--{if $showthreadclasscount[typeid][$id]}--><span class="xg1 num">$showthreadclasscount[typeid][$id]</span><!--{/if}--></a></li>
  5.                 <!--{else}-->
  6.                      <li><a href="forum.php?mod=forumdisplay&fid=$_G[fid]&filter=typeid&typeid=$id$forumdisplayadd[typeid]{if $_GET['archiveid']}&archiveid={$_GET['archiveid']}{/if}"><!--{if $_G[forum][threadtypes][icons][$id] && $_G['forum']['threadtypes']['prefix'] == 2}--><img class="vm" src="$_G[forum][threadtypes][icons][$id]" alt="" /> <!--{/if}-->$name<!--{if $showthreadclasscount[typeid][$id]}--><span class="xg1 num">$showthreadclasscount[typeid][$id]</span><!--{/if}--></a></li>
  7.                 <!--{/if}-->
  8.           <!--{/loop}-->
  9.     <!--{/if}-->
复制代码
二、头部header_userstatus.htm会员登录状态代码
1.会员积分、管理组。(带弹出菜单)
  1.     <a href="home.php?mod=spacecp&ac=credit&showcredit=1" id="extcreditmenu"{if !$_G[setting][bbclosed]} onmouSEOver="delayShow(this, showCreditmenu);" class="showmenu"{/if}>{lang credits}: $_G[member][credits]</a>
  2.                     <span class="pipe">|</span><a href="home.php?mod=spacecp&ac=usergroup" id="g_upmine" class="showmenu" onmouseover="delayShow(this, showUpgradeinfo)">{lang usergroup}: $_G[group][grouptitle]<!--{if $_G[member]['freeze']}--><span class="xi1">({lang freeze})</span><!--{/if}--></a>
复制代码

全部评论 0

您需要登录后才可以回帖 立即登录
登录
0
0
0
返回顶部