主题图标实现二次分类等待高手完善
[color=DarkSlateBlue][b][size=4]其实不懂代码,是靠不断的测试弄出来的希望高手可以帮忙修改得完美[/size][/b][/color]
好像很多人需要主题二次分类功能,但6.0好像还没有这个插件,
用主题图标代替二次分类,不用动数据库,修改也少,应该是不错的选择
————————————————————
打开forumdisplay.htm
找到[code]<td class="icon"> </td>[/code]有两处,都删除掉
再找[code]<td class="icon">
<!--{if $thread['special'] == 1}-->
<img src="{IMGDIR}/pollsmall.gif" alt="{lang thread_poll}" />
<!--{elseif $thread['special'] == 2}-->
<img src="{IMGDIR}/tradesmall.gif" alt="{lang thread_trade}" />
<!--{elseif $thread['special'] == 3}-->
<!--{if $thread['price'] > 0}-->
<img src="{IMGDIR}/rewardsmall.gif" alt="{lang thread_reward}" />
<!--{elseif $thread['price'] < 0}-->
<img src="{IMGDIR}/rewardsmallend.gif" alt="{lang thread_rewardend}" />
<!--{/if}-->
<!--{elseif $thread['special'] == 4}-->
<img src="{IMGDIR}/activitysmall.gif" alt="{lang thread_activity}" />
<!--{elseif $thread['special'] == 5}-->
<img src="{IMGDIR}/debatesmall.gif" alt="{lang thread_debate}" />
<!--{elseif $thread['special'] == 6}-->
<img src="{IMGDIR}/videosmall.gif" alt="{lang thread_video}" />
<!--{else}-->
$thread['icon']
<!--{/if}-->
</td>[/code]去掉头尾,即<td class="icon">和</td>将中间部分放到[code]$thread[typeid]
<!--{if isset($circle[$thread['sgid']])}-->
<em>[<a href="$supe[siteurl]/?action_mygroup_gid_$thread[sgid]"
target="_blank"><span class="lighttxt">$circle[$thread['sgid']]</span></a>]</em>
<!--{/if}-->[/code]的前面即可。
另外在css.htm中可能要调整一下[code].threadlist th img.icon { float:
left; margin-left: 7px; }[/code]默认是-22px,我调到7px差不多,可以根据实际情况调整
——————————————————————
将主题图标换成你需要的二次分类,上传到images/icons即可
演示:
[[i] 本帖最后由 心血来潮 于 2008-1-23 17:50 编辑 [/i]] 楼主不错,值得鼓励,希望再接再厉! 不能上传附件:Q :Q
页:
[1]
