.
下圖已証明一切 只要你版區多 及設定分類多
就會發覺 主題分類右方 進入版區 及 編輯版區
會顯示太多太長 不大美觀
可看下圖 ( 注意:下圖共有三種顯示 每5秒轉一格 )
全改用下拉選單 不再全部版區數出來
=================================================
修改方法亦十分簡單 只找一段替換便可 :em33:
修改檔案:admin/forums.inc.php
=================================================
admin/forums.inc.php 找
- } elseif($action == 'threadtypes') {
- if(!submitcheck('typesubmit')) {
- $forumsarray = array();
- $query = $db->query("SELECT f.fid, f.name, ff.threadtypes FROM {$tablepre}forums f , {$tablepre}forumfields ff WHERE ff.threadtypes<>'' AND f.fid=ff.fid");
- while($forum = $db->fetch_array($query)) {
- $forum['threadtypes'] = unserialize($forum['threadtypes']);
- if(is_array($forum['threadtypes']['types'])) {
- foreach($forum['threadtypes']['types'] as $typeid => $name) {
- $forumsarray[$typeid][] = '<a href="forumdisplay.php?fid='.$forum['fid'].'" target="_blank">'.$forum['name'].'</a> [<a href="admincp.php?action=forumdetail&fid='.$forum['fid'].'">'.$lang['edit'].'</a>]';
- }
- }
- }
- $threadtypes = '';
- $query = $db->query("SELECT * FROM {$tablepre}threadtypes ORDER BY displayorder");
- while($type = $db->fetch_array($query)) {
- $threadtypes .= "<tr align="center"><td bgcolor="".ALTBG1.""><input type="checkbox" name="delete[]" value="$type[typeid]"></td>\n".
- "<td bgcolor="".ALTBG2.""><input type="text" size="15" name="namenew[$type[typeid]]" value="".dhtmlspecialchars($type['name']).""></td>\n".
- "<td bgcolor="".ALTBG1.""><input type="text" size="2" name="displayordernew[$type[typeid]]" value="$type[displayorder]"></td>\n".
- "<td bgcolor="".ALTBG2.""><input type="text" size="30" name="descriptionnew[$type[typeid]]" value="$type[description]"></td>\n".
- "<td bgcolor="".ALTBG1."">".(is_array($forumsarray[$type['typeid']]) ? implode(', ', $forumsarray[$type['typeid']]) : '')."</td></tr>\n";
- }
- ?>
- <table cellspacing="<?=INNERBORDERWIDTH?>" cellpadding="<?=TABLESPACE?>" width="95%" align="center" class="tableborder">
- <tr class="header"><td><?=$lang['tips']?></td></tr>
- <tr bgcolor="<?=ALTBG1?>"><td>
- <br><?=$lang['forums_threadtypes_tips']?>
- </td></tr></table>
- <form method="post" action="admincp.php?action=threadtypes">
- <input type="hidden" name="formhash" value="<?=FORMHASH?>">
- <table cellspacing="<?=INNERBORDERWIDTH?>" cellpadding="<?=TABLESPACE?>" width="95%" align="center" class="tableborder">
- <tr class="header"><td colspan="5"><?=$lang['forums_threadtypes']?></td></tr>
- <tr align="center" class="category"><td><?=$lang['del']?></td><td><?=$lang['forums_threadtypes']?></td><td><?=$lang['display_order']?></td><td><?=$lang['description']?></td><td><?=$lang['forums_threadtypes_forums']?></td></tr>
- <?=$threadtypes?>
- <tr><td colspan="5" class="singleborder"> </td></tr>
- <tr align="center"><td bgcolor="<?=ALTBG1?>"><?=$lang['add_new']?></td><td bgcolor="<?=ALTBG2?>"><input type='text' name="newname" size="15"></td><td bgcolor="<?=ALTBG1?>"><input type="text" name="newdisplayorder" size="2" value="0"></td><td bgcolor="<?=ALTBG2?>"><input type="text" name="newdescription" size="30" value=""></td><td bgcolor="<?=ALTBG1?>"> </td></tr>
- </table><br>
- <center><input type="submit" name="typesubmit" value="<?=$lang['submit']?>"></center>
- </form>
复制代码
改為:
- //--------------------------------------------------------------
- } elseif($action == 'threadtypes') {
- if(!submitcheck('typesubmit')) {
- $forumsarray = array();
- $query = $db->query("SELECT f.fid, f.name, ff.threadtypes FROM {$tablepre}forums f , {$tablepre}forumfields ff WHERE ff.threadtypes<>'' AND f.fid=ff.fid");
- while($forum = $db->fetch_array($query)) {
- $forum['threadtypes'] = unserialize($forum['threadtypes']);
- if(is_array($forum['threadtypes']['types'])) {
- foreach($forum['threadtypes']['types'] as $typeid => $name) {
- $forumsarrayforum[$typeid][] = '<option value="forumdisplay.php?fid='.$forum['fid'].'">'.$forum['name'].'</option>';
- $forumsarrayedit[$typeid][] = '<option value="admincp.php?action=forumdetail&fid='.$forum['fid'].'">'.$forum['name'].'</option>';
- }
- }
- }
- $threadtypes = '';
- $query = $db->query("SELECT * FROM {$tablepre}threadtypes ORDER BY displayorder");
- while($type = $db->fetch_array($query)) {
- $threadtypes .= "<tr align="center"><td bgcolor="".ALTBG1.""><input type="checkbox" name="delete[]" value="$type[typeid]"></td>\n".
- "<td bgcolor="".ALTBG2.""><input type="text" size="15" name="namenew[$type[typeid]]" value="".dhtmlspecialchars($type['name']).""></td>\n".
- "<td bgcolor="".ALTBG1.""><input type="text" size="6" name="displayordernew[$type[typeid]]" value="$type[displayorder]"></td>\n".
- "<td bgcolor="".ALTBG2.""><input type="text" size="30" name="descriptionnew[$type[typeid]]" value="$type[description]"></td>\n".
- "<td bgcolor="".ALTBG1.""><select style="width: 130px" onChange="admin_goto(this)"><option value="">== 進入版區 ==</option>".(is_array($forumsarrayforum[$type['typeid']]) ? implode('', $forumsarrayforum[$type['typeid']]) : '')."</select></td>\n".
- "<td bgcolor="".ALTBG1.""><select style="width: 130px" onchange="window.location=(''+this.options[this.selectedIndex].value)"><option value="">== 編輯版區 ==</option>".(is_array($forumsarrayedit[$type['typeid']]) ? implode('', $forumsarrayedit[$type['typeid']]) : '')."</select></td>\n";
- }
- ?>
- <table cellspacing="<?=INNERBORDERWIDTH?>" cellpadding="<?=TABLESPACE?>" width="97%" align="center" class="tableborder">
- <tr class="header"><td><?=$lang['tips']?></td></tr>
- <tr bgcolor="<?=ALTBG1?>"><td>
- <br><?=$lang['forums_threadtypes_tips']?>
- </td></tr></table>
- <script language="JavaScript">
- function admin_goto(selObj){
- window.open(selObj.options[selObj.selectedIndex].value);
- }
- </script>
- <form method="post" name="mod" action="admincp.php?action=threadtypes">
- <input type="hidden" name="formhash" value="<?=FORMHASH?>">
- <table cellspacing="<?=INNERBORDERWIDTH?>" cellpadding="<?=TABLESPACE?>" width="97%" align="center" class="tableborder">
- <tr class="header"><td colspan="6"><?=$lang['forums_threadtypes']?></td></tr>
- <tr align="center" class="category">
- <td><?=$lang['del']?></td>
- <td><?=$lang['forums_threadtypes']?></td>
- <td><?=$lang['display_order']?></td>
- <td><?=$lang['description']?></td>
- <td><?=$lang['forums_threadtypes_forums']?></td>
- <td><?=$lang['forums_threadtypes_forums']?></td></tr>
- <?=$threadtypes?>
- <tr><td colspan="6" class="singleborder"> </td></tr>
- <tr align="center"><td bgcolor="<?=ALTBG1?>"><?=$lang['add_new']?></td><td bgcolor="<?=ALTBG2?>"><input type='text' name="newname" size="15"></td><td bgcolor="<?=ALTBG1?>"><input type="text" name="newdisplayorder" size="2" value="0"></td><td bgcolor="<?=ALTBG2?>"><input type="text" name="newdescription" size="30" value=""></td><td colspan="2" bgcolor="<?=ALTBG1?>"> </td></tr>
- </table><br>
- <center><input type="submit" name="typesubmit" value="<?=$lang['submit']?>"></center>
- </form>
复制代码
================== 完 成 ========================
[ 本帖最后由 別問我是誰 于 2005-12-15 05:43 编辑 ] |