[問題] 後台版面排序問題

phpBB Installation & Usage Support
phpBB 2 安裝於各類型作業平台之問題討論;外掛問題,請到相關版面依發問格式發表!
(發表文章請按照公告格式發表,違者砍文)

版主: 版主管理群

版面規則
本區是討論關於 phpBB 2.0.X 架設安裝上的問題,只要有安裝任何外掛,請到外掛討論相關版面按照公告格式發表。
(發表文章請按照公告格式發表,違者砍文)
主題已鎖定
minotaur
星球公民
星球公民
文章: 170
註冊時間: 2005-01-05 20:52
聯繫:

[問題] 後台版面排序問題

文章 minotaur »

以下是我的版面部份的配置圖
在後台版面管理時也是這樣的順序
是很有規則的


圖檔

但為何在群組管理裡權限設定時
他所排列的卻是不規則的呢\r
譬如上下對調等等

我該改哪php原碼的哪部份或哪個檔呢
Kill
竹貓忠實會員
竹貓忠實會員
文章: 874
註冊時間: 2003-07-31 12:40
來自: CKD Studio
聯繫:

文章 Kill »

群組那邊好像是照id來排的
少的好像是在前面的樣子
喜歡...就是淡淡ㄉ愛... ...則是深深ㄉ喜歡...
圖檔
提供phpBB代架服務以及外掛安裝

有付費服務的問題請移駕至CKD Studio發問 ╮( ̄▽ ̄)╭
minotaur
星球公民
星球公民
文章: 170
註冊時間: 2005-01-05 20:52
聯繫:

文章 minotaur »

http://xxxxxxxx/viewforum.php?f=1&sid=3 ... 9235298549

你是說f=???
這的數字嗎

可是也不是耶\r
我第一個是f=1
但是第二個卻是f=21
minotaur
星球公民
星球公民
文章: 170
註冊時間: 2005-01-05 20:52
聯繫:

文章 minotaur »

我該參考哪部分原碼作修改呢\r

以下的外掛是顯示全部版面權限的列表外掛
Overall forums permissions on one page 1.0.0
http://220.135.89.85/overall_forums_per ... ge_118.rar

他的可以照版面排序
能幫我看看要改哪兒嗎

以下是擷取他php程式碼部分

代碼: 選擇全部

<?php
/***************************************************************************
 *                               admin_forumauth_list.php
 *                            -------------------
 *   copyright            : (C) Antony Bailey & Freakin' Booty ;-P
\n *   email                : antony_bailey@lycos.co.uk
 *
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

define('IN_PHPBB', 1);

if( !empty($setmodules) )
{
	$filename = basename(__FILE__);
	$module['Forums']['權限進階列表'] = $filename;

	return;
}


//
// Load default header
//
$no_page_header = TRUE;
$phpbb_root_path = './../';
require($phpbb_root_path . 'extension.inc');
require('./pagestart.' . $phpEx);

//
// Start program - define vars
//
$forum_auth_fields = array('auth_view', 'auth_read', 'auth_post', 'auth_reply', 'auth_edit', 'auth_delete', 'auth_sticky', 'auth_announce', 'auth_vote', 'auth_pollcreate');

$field_names = array(
	'auth_view' => $lang['View'],
	'auth_read' => $lang['Read'],
	'auth_post' => $lang['Post'],
	'auth_reply' => $lang['Reply'],
	'auth_edit' => $lang['Edit'],
	'auth_delete' => $lang['Delete'],
	'auth_sticky' => $lang['Sticky'],
	'auth_announce' => $lang['Announce'],
	'auth_vote' => $lang['Vote'],
	'auth_pollcreate' => $lang['Pollcreate']);

$forum_auth_levels = array('ALL', 'REG', 'PRIVATE', 'MOD', 'ADMIN');
$forum_auth_const = array(AUTH_ALL, AUTH_REG, AUTH_ACL, AUTH_MOD, AUTH_ADMIN);
attach_setup_forum_auth($simple_auth_ary, $forum_auth_fields, $field_names);

//
// Get required information, for all forums
//
$sql = "SELECT f.*
		FROM " . FORUMS_TABLE . " f, " . CATEGORIES_TABLE . " c
		WHERE c.cat_id = f.cat_id
		ORDER BY c.cat_order ASC, f.forum_order ASC";
if( !$result = $db->sql_query($sql) )
{
	message_die(GENERAL_ERROR, 'Couldn\'t obtain forum list', '', __LINE__, __FILE__, $sql);
}

$forum_rows = $db->sql_fetchrowset($result);
$db->sql_freeresult($result);


//
// Start program proper
//
if( $HTTP_POST_VARS['submit'] )
{
	for( $i = 0; $i < count($forum_rows); $i++ )
	{
		$sql = '';
		$forum_id = $forum_rows[$i]['forum_id'];

		for( $j = 0; $j < count($forum_auth_fields); $j++ )
		{
			$value = $HTTP_POST_VARS[$forum_auth_fields[$j]][$forum_id];

			if ( $forum_auth_fields[$j] == 'auth_vote' )
			{
				if ( $HTTP_POST_VARS['auth_vote'][$forum_id] == AUTH_ALL )
				{
					$value = AUTH_REG;
				}
			}

			$sql .= ( ( $sql != '' ) ? ', ' : '' ) . $forum_auth_fields[$j] . ' = ' . $value;
		}

		$sql = "UPDATE " . FORUMS_TABLE . " SET $sql WHERE forum_id = $forum_id";
		if( !$db->sql_query($sql) )
		{
			message_die(GENERAL_ERROR, 'Couldn\'t update forum permissions', '', __LINE__, __FILE__, $sql);
		}
	}

	$template->assign_vars(array(
		'META' => '<meta http-equiv="refresh" content="3; url=' . append_sid("admin_forumauth_list.$phpEx") . '" />'
		)
	);
	$message = $lang['Forum_auth_updated'] . '<br /><br />' . sprintf($lang['Click_return_forumauth'],  '<a href="' . append_sid("admin_forumauth_list.$phpEx") . '">', '</a>');
	message_die(GENERAL_MESSAGE, $message);
}


//
// Default page
//
$colspan = count($forum_auth_fields) + 1;

//
// Output the authorisation details
//
$template->set_filenames(array(
	'body' => 'admin/auth_forum_list_body.tpl'
	)
);

$template->assign_vars(array(
	'L_SUBMIT' => $lang['Submit'],
	'L_RESET' => $lang['Reset'],

	'COLSPAN' => $colspan,

	'S_FORM_ACTION' => append_sid("admin_forumauth_list.$phpEx")
	)
);

$template->assign_block_vars('forum_auth_titles', array(
	'CELL_TITLE' => '版面名稱'
	)
);

for( $i = 0; $i < count($forum_auth_fields); $i++ )
{
	$template->assign_block_vars('forum_auth_titles', array(
		'CELL_TITLE' => $field_names[$forum_auth_fields[$i]]
		)
	);
}

for ($i=0; $i<count($forum_rows); $i++)
{
	$temp_url = append_sid("admin_forumauth.$phpEx?" . POST_FORUM_URL . '=' . $forum_rows[$i]['forum_id']);
	$s_forum = '<a href="' . $temp_url . '">' . $forum_rows[$i]['forum_name'] . '</a>';

	$template->assign_block_vars('forum_row', array(
		'ROW_CLASS' => ( !($i % 2) ) ? 'row1' : 'row2',

		'S_FORUM' => $s_forum
		)
	);

	for( $j = 0; $j < count($forum_auth_fields); $j++ )
	{
		$custom_auth[$j] = '&nbsp;<select name="' . $forum_auth_fields[$j] . '[' . $forum_rows[$i]['forum_id'] . ']">';

		for( $k = 0; $k < count($forum_auth_levels); $k++ )
		{
			$selected = ( $forum_rows[$i][$forum_auth_fields[$j]] == $forum_auth_const[$k] ) ? ' selected="selected"' : '';
			$custom_auth[$j] .= '<option value="' . $forum_auth_const[$k] . '"' . $selected . '>' . $lang['Forum_' . $forum_auth_levels[$k]] . '</option>';
		}
		$custom_auth[$j] .= '</select>&nbsp;';

		$cell_title = $field_names[$forum_auth_fields[$j]];

		$template->assign_block_vars('forum_row.forum_auth_data', array(
			'S_AUTH_LEVELS_SELECT' => $custom_auth[$j]
			)
		);
	}
}

include('./page_header_admin.'.$phpEx);

$template->pparse('body');

include('./page_footer_admin.'.$phpEx);

?>
minotaur
星球公民
星球公民
文章: 170
註冊時間: 2005-01-05 20:52
聯繫:

文章 minotaur »

剛剛比對phpbb的admin_forumauth.php
發現底下這行

代碼: 選擇全部

		$template->assign_block_vars('forum_auth_titles', array(
			'CELL_TITLE' => $lang['Simple_mode'])
		);
		$template->assign_block_vars('forum_auth_data', array(
			'S_AUTH_LEVELS_SELECT' => $simple_auth)
		);
然後比照上列外掛相似部份

代碼: 選擇全部

$template->assign_block_vars('forum_auth_titles', array(
	'CELL_TITLE' => '版面名稱'
	)
);

for( $i = 0; $i < count($forum_auth_fields); $i++ )
{
	$template->assign_block_vars('forum_auth_titles', array(
		'CELL_TITLE' => $field_names[$forum_auth_fields[$i]]
		)
	);
問題是在這嗎??
請問各位學長如果是\r
小弟我該怎改呢
主題已鎖定

回到「phpBB 2 安裝與使用」