本美化只是重新发布适合容易查找修改代码,版权归原作者。
.
要是你版区多及设定分类多,就会发觉主題分类右方 进入版区 及 编辑版区
会显示太多太长 不大美观 全改用下拉选单 不再全部版区数出來。希望各站长修改!
================================================
修改档案:admin/forums.inc.php
演示:http://rosesky.3322.org/bbs/(需要后台管理权限才能看到)
下面有图示对比
=================================================
admin/forums.inc.php
- } elseif($action == 'threadtypes') {
- if(!submitcheck('typesubmit')) {
- $forumsarray = $fidsarray = 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>]';
- $fidsarray[$typeid][] = $forum['fid'];
- }
- }
- }
- $threadtypes = '';
- $query = $db->query("SELECT * FROM {$tablepre}threadtypes ORDER BY displayorder");
- while($type = $db->fetch_array($query)) {
- $threadtypes .= "<tr align="center"><td class="altbg1"><input class="checkbox" type="checkbox" name="delete[]" value="$type[typeid]"></td>\n".
- "<td class="altbg2"><input type="text" size="15" name="namenew[$type[typeid]]" value="".dhtmlspecialchars($type['name']).""></td>\n".
- "<td class="altbg1"><input type="text" size="2" name="displayordernew[$type[typeid]]" value="$type[displayorder]"></td>\n".
- "<td class="altbg2"><input type="text" size="30" name="descriptionnew[$type[typeid]]" value="$type[description]"></td>\n".
- "<td class="altbg1">".(is_array($forumsarray[$type['typeid']]) ? implode(', ', $forumsarray[$type['typeid']])."<input type="hidden" name="fids[$type[typeid]]" value="".implode(', ', $fidsarray[$type['typeid']])."">" : '')."</td></tr>\n";
- }
- shownav('menu_forums_threadtypes');
- showtips('forums_threadtypes_tips');
- ?>
- <form method="post" action="admincp.php?action=threadtypes">
- <input type="hidden" name="formhash" value="<?=FORMHASH?>">
- <table width="100%" border="0" cellpadding="0" cellspacing="0" class="tableborder">
- <tr class="header"><td colspan="5"><?=$lang['forums_threadtypes']?></td></tr>
- <tr align="center" class="category"><td><input class="checkbox" type="checkbox" name="chkall" class="category" onclick="checkall(this.form)"><?=$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 align="center" class="altbg1"><td><?=$lang['add_new']?></td><td><input type='text' name="newname" size="15"></td><td><input type="text" name="newdisplayorder" size="2" value="0"></td><td><input type="text" name="newdescription" size="30" value=""></td><td> </td></tr>
- </table><br>
- <center><input class="button" 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>
复制代码
================== 完 成 ========================
[ 本帖最后由 e_zailai 于 2006-10-16 23:38 编辑 ] |