══════════════════════════════════════
若某版區 主題分類設定太多 會超出表格不美觀 ( 看下圖 )
所以加入這修改 每區可獨立設定 是否使用下拉顯示
══════════════════════════════════════
修改檔案
admin/forums.inc.php
templates/default/admincp.lang.php
templates/default/forumdisplay.htm ( 其它風格有這份檔亦要修改 )
══════════════════════════════════════
升級數據庫
- ALTER TABLE `cdb_forums` ADD `threadtypeselect` tinyint(1) NOT NULL default '0';
复制代码
══════════════════════════════════════
admin/forums.inc.php 找
- showsetting('forums_edit_threadtypes_prefix', 'threadtypesnew[prefix]', $forum['threadtypes']['prefix'], 'radio');
复制代码
之下加入
- showsetting('forums_edit_threadtypeselect', 'threadtypeselectnew', $forum['threadtypeselect'], 'radio');
复制代码
再找
- modnewposts='$modnewpostsnew', recyclebin='$recyclebinnew', jammer='$jammernew',
复制代码
改為
- modnewposts='$modnewpostsnew', recyclebin='$recyclebinnew', jammer='$jammernew', threadtypeselect='$threadtypeselectnew',
复制代码
══════════════════════════════════════
templates/default/admincp.lang.php 找
- 'forums_edit_threadtypes_prefix_comment' => '設置是否在主題列表中,給已分類的主題前加上類別的顯示。注意: 本功能必須「啟用主題分類」後才可使用',
复制代码
之下加入
- 'forums_edit_threadtypeselect' => '下拉顯示分類',
- 'forums_edit_threadtypeselect_comment' => '本版區是否使用下拉型式,顯示主題分類顯示。',
复制代码
══════════════════════════════════════
templates/default/forumdisplay.htm ( 其它風格有這份檔亦要修改 ) 找
- <!--{if $forum['threadtypes'] && $forum['threadtypes']['listable']}-->
- <br><table cellspacing="0" cellpadding="0" border="0"><tr><td>
- <table cellspacing="{INNERBORDERWIDTH}" cellpadding="2" class="tableborder"><tr class="smalltxt">
- <!--{loop $forum['threadtypes']['types'] $id $name}-->
- <!--{if $typeid != $id}-->
- <td class="altbg1"> <a href="forumdisplay.php?fid=$fid&filter=type&typeid=$id">$name</a> </td>
- <!--{else}-->
- <td class="header"> <span class="bold">$name</span> </td>
- <!--{/if}-->
- <!--{/loop}-->
- <!--{if $typeid}--><td class="altbg1"> <a href="forumdisplay.php?fid=$fid">{lang all}</a> </td><!--{else}--><td class="header"> <span class="bold">{lang all}</span> </td><!--{/if}-->
- </tr></table></td></tr><tr><td height="3"></td></tr></table>
- <!--{/if}-->
- </td></tr></table>
复制代码
改為
- <!--{if $forum['threadtypes'] && $forum['threadtypes']['listable']}-->
- <br><table cellspacing="0" cellpadding="0" border="0"><tr><td>
- <!--{if $forum['threadtypeselect']}-->
- <select onchange="window.location=(''+this.options[this.selectedIndex].value)">
- <option value="forumdisplay.php?fid=$fid">{lang all} - {lang admin_type}</option>
- <!--{loop $forum['threadtypes']['types'] $id $name}-->
- <!--{if $typeid != $id}-->
- <option value="forumdisplay.php?fid=$fid&filter=type&typeid=$id">$name</option>
- <!--{else}-->
- <option value="" selected>$name</option>
- <!--{/if}-->
- <!--{/loop}-->
- </select>
- </td></tr><tr><td height="3"></td></tr></table>
- <!--{else}-->
- <table cellspacing="{INNERBORDERWIDTH}" cellpadding="2" class="tableborder"><tr class="smalltxt">
- <!--{loop $forum['threadtypes']['types'] $id $name}-->
- <!--{if $typeid != $id}-->
- <td class="altbg1"> <a href="forumdisplay.php?fid=$fid&filter=type&typeid=$id">$name</a> </td>
- <!--{else}-->
- <td class="header"> <span class="bold">$name</span> </td>
- <!--{/if}-->
- <!--{/loop}-->
- <!--{if $typeid}--><td class="altbg1"> <a href="forumdisplay.php?fid=$fid">{lang all}</a> </td><!--{else}--><td class="header"> <span class="bold">{lang all}</span> </td><!--{/if}-->
- </tr></table></td></tr><tr><td height="3"></td></tr></table>
- <!--{/if}-->
- <!--{/if}-->
- </td></tr></table>
复制代码
══════════════════════════════════════
~ 完 ~
══════════════════════════════════════
[ 本帖最后由 別問我是誰 于 2006-1-31 18:20 编辑 ] |