รายละเอียด จัดเรียงหัวข้อภายในบอร์ดแต่ละบอร์ดตามความต้องการ เช่น จัดเรียงโดยหัวข้อ, ชื่อผู้เริ่มหัวข้อ, ชื่อผู้ตอบล่าสุด, จำนวนตอบ, จำนวนอ่าน, ตอบกระทู้แรก, ตอบกระทู้ล่าสุด
ตัวอย่าง
แก้ไขไฟล์:file $sourcedir/Load.php
ค้นหา -->>
b.id_theme, b.override_theme, b.count_posts, b.id_profile, b.redirect
แก้เป็น -->>
b.id_theme, b.override_theme, b.count_posts, b.id_profile, b.redirect, b.sorting
ค้นหา -->>
'theme' => $row['id_theme'],
'override_theme' => !empty($row['override_theme']),
เพิ่มไว้หลัง -->>
'sorting' => $row['sorting'],
file $sourcedir/ManageBoards.php
ค้นหา -->>
'override_theme' => 0,
เพิ่มไว้หลัง -->>
'sorting' => 6,
ค้นหา -->>
$boardOptions['posts_count'] = isset($_POST['count']);
$boardOptions['override_theme'] = isset($_POST['override_theme']);
เพิ่มไว้หลัง -->>
$boardOptions['sorting'] = (int) $_POST['boardsort'];
file $sourcedir/MessageIndex.php
ค้นหา -->>
// They didn't pick one, default to by last post descending.
เพิ่มไว้ก่อน -->>
// Default Sort for Boards
if (!empty($board_info['sorting']))
{
$methods = array();
foreach ($sort_methods as $sort => $zero)
$methods[] = $sort;
$_REQUEST['sort'] = $methods[$board_info['sorting']];
}
file $sourcedir/Subs-Boards.php
ค้นหา -->>
// Should the board theme override the user preferred theme?
if (isset($boardOptions['override_theme']))
{
$boardUpdates[] = 'override_theme = {int:override_theme}';
$boardUpdateParameters['override_theme'] = $boardOptions['override_theme'] ? 1 : 0;
}
เพิ่มไว้หลัง -->>
// Default Sort for Boards
if (isset($boardOptions['sorting']))
{
$boardUpdates[] = 'sorting = {int:sorting}';
$boardUpdateParameters['sorting'] = (int) $boardOptions['sorting'];
}
ค้นหา -->>
'override_theme' => false,
'board_theme' => 0,
เพิ่มไว้หลัง -->>
'sorting' => 6,
ค้นหา -->>
b.board_order, b.count_posts, b.member_groups, b.id_theme, b.override_theme, b.id_profile, b.redirect
แก้เป็น -->>
b.board_order, b.count_posts, b.member_groups, b.id_theme, b.override_theme, b.id_profile, b.redirect, b.sorting
ค้นหา -->>
'topics' => $row['num_topics'],
'theme' => $row['id_theme'],
เพิ่มไว้หลัง -->>
'sorting' => $row['sorting'],
file $themedir/ManageBoards.template.php
ค้นหา -->>
if (!empty($context['board']['is_recycle']))
echo '<div class="information">', $txt['mboards_recycle_disabled_delete'], '</div>';
เพิ่มไว้ก่อน -->>
// Default Sort for Boards
$sort = explode("|", $txt['mboards_sort_select']);
echo '
<div id="board_sort_method">
<dl class="settings">
<dt>
<strong>', $txt['mboards_sort'], ':</strong><br />
</dt>
<dd>
<select name="boardsort" id="boardsort" onchange="refreshOptions();">';
foreach ($sort as $n => $s)
echo '
<option value="', $n, '"', $context['board']['sorting'] == $n ? ' selected="selected"' : '', '>', $s, '</option>';
echo '
</select>
</dd>
</dl>
</div>';
ค้นหา -->>
// What to show?
document.getElementById("override_theme_div").style.display = redirectEnabled || !nonDefaultTheme ? "none" : "";
เพิ่มไว้หลัง -->>
document.getElementById("board_sort_method").style.display = redirectEnabled ? "none" : "";
file $languagedir/Modifications.thai-utf8.php
เพิ่ม -->>
ขออภัย! ส่วนนี้สงวนไว้เฉพาะสมาชิกเท่านั้น กรุณา เข้าสู่ระบบ หรือ ลงทะเบียนสร้างไฟล์: install.php เพื่อสร้างฐานข้อมูล ไว้ใน $boarddir (ที่เดียวกับไฟล์ SSI.php) รัน http://www.your_url.xxx/$boarddir/install.php -->> Enter เสร็จแล้วลบทิ้ง
<?php
if (file_exists(dirname(__FILE__) . '/SSI.php') && !defined('SMF'))
require_once(dirname(__FILE__) . '/SSI.php');
elseif(!defined('SMF'))
die('<b>Error:</b> Cannot install - please verify that you put this file in the same place as SMF\'s index.php and SSI.php files.');
if ((SMF == 'SSI') && !$user_info['is_admin'])
die('Admin privileges required.');
global $smcFunc;
$result = $smcFunc['db_query']('', "SHOW COLUMNS FROM {db_prefix}boards LIKE 'sorting'", array());
if (!$smcFunc['db_num_rows']($result))
$result = $smcFunc['db_query']('', 'ALTER TABLE {db_prefix}boards ADD sorting SMALLINT(5) UNSIGNED DEFAULT 6', array());
if (SMF == 'SSI')
echo 'Database changes are complete! Please wait...';
?>
การตั้งค่า: ผู้ดูแล -->> แก้ไขบอร์ด [เลือกบอร์ด] -->> แก้ไข -->> จัดเรียงหัวข้อภายในบอร์ด
ลิงค์หัวข้อ:
http://dexmore.com/topic/9076