24 พฤษภาคม 2555, 13:49:22
ยินดีต้อนรับผู้เยี่ยมชม
  • noavata
  • ยินดีต้อนรับคุณ, ผู้เยี่ยมชม กรุณา เข้าสู่ระบบ หรือ ลงทะเบียน
    เข้าสู่ระบบด้วยชื่อผู้ใช้ รหัสผ่าน และระยะเวลาในเซสชั่น
Page Rank

ทำเว็บไซต์ | แต่งบอร์ด | ออกแบบ | SMF | Joomla | Drupal | WordPress | JQuery | CMS | ECommerce | Tel. +668-08577477

ส่งหัวข้อนี้พิมพ์ หน้า: 1 
icon message ผู้เขียน หัวข้อ: Default Sort for Boards จัดเรียงหัวข้อภายในบอร์ดตามความต้องการ  (อ่าน 714 ครั้ง)
0 สมาชิก และ 1 ผู้เยี่ยมชม กำลังดูหัวข้อนี้
*
*


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
  • ชื่อ: Default Sort for Boards
  • ผู้เขียน: Bugo
  • นำเสนอโดย: DexMoreGroup
  • ประเภท: Administrative
  • รองรับ: SMF 2.0.x
  • ปรับปรุงล่าสุด: 9 ตุลาคม 2554
  • ต้นฉบับ: Default Sort for Boards

รายละเอียด
      จัดเรียงหัวข้อภายในบอร์ดแต่ละบอร์ดตามความต้องการ เช่น จัดเรียงโดยหัวข้อ, ชื่อผู้เริ่มหัวข้อ, ชื่อผู้ตอบล่าสุด, จำนวนตอบ, จำนวนอ่าน, ตอบกระทู้แรก, ตอบกระทู้ล่าสุด

ตัวอย่าง

แก้ไขไฟล์:

file $sourcedir/Load.php

ค้นหา -->>
โค๊ด: [Select]
b.id_theme, b.override_theme, b.count_posts, b.id_profile, b.redirect

แก้เป็น -->>
โค๊ด: [Select]
b.id_theme, b.override_theme, b.count_posts, b.id_profile, b.redirect, b.sorting

ค้นหา -->>
โค๊ด: [Select]
'theme' => $row['id_theme'],
'override_theme' => !empty($row['override_theme']),

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
'sorting' => $row['sorting'],

file $sourcedir/ManageBoards.php

ค้นหา -->>
โค๊ด: [Select]
'override_theme' => 0,

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
'sorting' => 6,

ค้นหา -->>
โค๊ด: [Select]
$boardOptions['posts_count'] = isset($_POST['count']);
$boardOptions['override_theme'] = isset($_POST['override_theme']);

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
$boardOptions['sorting'] = (int) $_POST['boardsort'];

file $sourcedir/MessageIndex.php

ค้นหา -->>
โค๊ด: [Select]
// They didn't pick one, default to by last post descending.

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
// 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

ค้นหา -->>
โค๊ด: [Select]
// 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;
}

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
  // Default Sort for Boards
if (isset($boardOptions['sorting']))
{
$boardUpdates[] = 'sorting = {int:sorting}';
$boardUpdateParameters['sorting'] = (int) $boardOptions['sorting'];
}

ค้นหา -->>
โค๊ด: [Select]
'override_theme' => false,
'board_theme' => 0,

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
'sorting' => 6,

ค้นหา -->>
โค๊ด: [Select]
b.board_order, b.count_posts, b.member_groups, b.id_theme, b.override_theme, b.id_profile, b.redirect

แก้เป็น -->>
โค๊ด: [Select]
b.board_order, b.count_posts, b.member_groups, b.id_theme, b.override_theme, b.id_profile, b.redirect, b.sorting

ค้นหา -->>
โค๊ด: [Select]
'topics' => $row['num_topics'],
'theme' => $row['id_theme'],

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
'sorting' => $row['sorting'],

file $themedir/ManageBoards.template.php

ค้นหา -->>
โค๊ด: [Select]
if (!empty($context['board']['is_recycle']))
echo '<div class="information">', $txt['mboards_recycle_disabled_delete'], '</div>';

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
// 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>';

ค้นหา -->>
โค๊ด: [Select]
// What to show?
document.getElementById("override_theme_div").style.display = redirectEnabled || !nonDefaultTheme ? "none" : "";

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
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 เสร็จแล้วลบทิ้ง
โค๊ด: [Select]
<?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
Windows XP    Firefox 7.0.1   see ip บันทึกการเข้า
ดูรายการสิ่งของสำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  สำหรับติดหมุดกระทู้ของคุณ!  เพิ่มเวลาที่อยู่ในระบบอีก 12 ชั่วโมง  น้องหมี..เอาไว้กอดนอนแทนกิ๊ก  สำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  
*



Thailand   ชาย ออฟไลน์
icon message
general ความคิดเห็นที่ 1 เมื่อ: 15 ตุลาคม 2554, 17:17:54
Unknown column 'b.sorting' in 'field list'


ขึ้นแบบนี้จะแก้ยังไงครับ

ลิงค์หัวข้อ: http://dexmore.com/topic/9076
Mac OS X    Safari   see ip บันทึกการเข้า
โฮสต์ดีๆ บริการด้วยใจ
*
*


!NeverDie

United States Minor Outlying Islands   หญิง ออฟไลน์ เว็บไซต์
icon message
general ความคิดเห็นที่ 2 เมื่อ: 15 ตุลาคม 2554, 22:10:12
การนำเสนอไม่สมบูรณ์ต้องขออภัย แก้ไขแล้วลองทบทวนทำใหม่

สร้างไฟล์ install.php แล้วรัน

ลิงค์หัวข้อ: http://dexmore.com/topic/9076
Windows XP    Firefox 7.0.1   see ip บันทึกการเข้า
ดูรายการสิ่งของบัตรผ่านห้องเกมส์ใช้ได้ 30 วัน  

-:-DexMore.Com แหล่งมั่วสุมทางปัญญา-:-
*



Thailand   ชาย ออฟไลน์
icon message
general ความคิดเห็นที่ 3 เมื่อ: 16 ตุลาคม 2554, 09:24:35
ก็ลงได้เรียบร้อยแล้วครับ(รันแล้วขึ้นDatabase changes are complete! Please wait... ) แต่ว่าตอนเข้าผู้ดูแล -->> แก้ไขบอร์ด [เลือกบอร์ด] -->> แก้ไข -->> จัดเรียงหัวข้อภายในบอร์ด พอเลือกแล้ว กดบันทึก แล้วมันไม่เซฟอะครับ พอเข้าไปดูใหม่มันก็กลายเป็นโดยค่ามาตรฐาน ตลอดเลยอะครับ จะแก้ยังไงต่อดี T -T

ลิงค์หัวข้อ: http://dexmore.com/topic/9076
« แก้ไขครั้งสุดท้าย: 16 ตุลาคม 2554, 09:30:43 โดย Kairyu » Mac OS X    Safari   see ip บันทึกการเข้า
โฮสต์ดีๆ บริการด้วยใจ
*
*


!NeverDie

United States Minor Outlying Islands   หญิง ออฟไลน์ เว็บไซต์
icon message
general ความคิดเห็นที่ 4 เมื่อ: 16 ตุลาคม 2554, 16:45:12
ขอดูสถานที่จริง

ลิงค์หัวข้อ: http://dexmore.com/topic/9076
Windows XP    Firefox 7.0.1   see ip บันทึกการเข้า
ดูรายการสิ่งของบัตรผ่านห้องเกมส์ใช้ได้ 30 วัน  

-:-DexMore.Com แหล่งมั่วสุมทางปัญญา-:-
*



Thailand   ชาย ออฟไลน์
icon message
general ความคิดเห็นที่ 5 เมื่อ: 16 ตุลาคม 2554, 21:19:55
Www.pokecosmic.com

ลิงค์หัวข้อ: http://dexmore.com/topic/9076
Mac OS X    Safari   see ip บันทึกการเข้า
โฮสต์ดีๆ บริการด้วยใจ
*
*


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
icon message
general ความคิดเห็นที่ 6 เมื่อ: 18 ตุลาคม 2554, 16:45:40
เคลียร์แคชหรือยัง?

ลิงค์หัวข้อ: http://dexmore.com/topic/9076
Windows XP    Firefox 7.0.1   see ip บันทึกการเข้า
ดูรายการสิ่งของสำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  สำหรับติดหมุดกระทู้ของคุณ!  เพิ่มเวลาที่อยู่ในระบบอีก 12 ชั่วโมง  น้องหมี..เอาไว้กอดนอนแทนกิ๊ก  สำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  
*



Thailand   ชาย ออฟไลน์
icon message
general ความคิดเห็นที่ 7 เมื่อ: 18 ตุลาคม 2554, 18:41:16
ยังอะครับ - - (เคลียร์ยังไงอะครับ ที่เว็บหรือที่เบราเซอร์อะครับ)
เพราะผมเป็นอีกปัญหาหนึ่งอะครับตรงuser cp พอเข้าหน้าแรก มันขึ้นuser cp แต่พอเปลี่ยนหน้าอื่นมันก็ขึ้นภาษาตามที่ผมเซตไว้ ผมยังงงอยู่เลย

ลิงค์หัวข้อ: http://dexmore.com/topic/9076
« แก้ไขครั้งสุดท้าย: 18 ตุลาคม 2554, 18:46:52 โดย Kairyu » Mac OS X    Safari   see ip บันทึกการเข้า
โฮสต์ดีๆ บริการด้วยใจ
*
*


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
icon message
general ความคิดเห็นที่ 8 เมื่อ: 18 ตุลาคม 2554, 19:03:22
ผมจำได้ว่าตอนคุณใช้ 1.1.x ก็ไปไม่รอด แล้วหันมาจับ 2.0 ผมก็หมดปัญญาช่วยครับ

ลิงค์หัวข้อ: http://dexmore.com/topic/9076
Windows XP    Firefox 7.0.1   see ip บันทึกการเข้า
ดูรายการสิ่งของสำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  สำหรับติดหมุดกระทู้ของคุณ!  เพิ่มเวลาที่อยู่ในระบบอีก 12 ชั่วโมง  น้องหมี..เอาไว้กอดนอนแทนกิ๊ก  สำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  
*



Thailand   ชาย ออฟไลน์
icon message
general ความคิดเห็นที่ 9 เมื่อ: 18 ตุลาคม 2554, 19:36:03
อืมงั้นหาเองก็ได้ - -

ลิงค์หัวข้อ: http://dexmore.com/topic/9076
Mac OS X    Safari   see ip บันทึกการเข้า
โฮสต์ดีๆ บริการด้วยใจ
ส่งหัวข้อนี้พิมพ์ หน้า: 1 
กระโดดไป:  

Creative Commons License

SMF Thai Translation Powered by SMF © 2006–2012, Simple Machines LLC

WordPress Google เข้าเยี่ยมชมหน้านี้ล่าสุดเมื่อ : 16 พฤษภาคม 2555, 20:19:56

jQuery Plugin Copyright © 2551-2555 Themes Design & Hosting by DexMoreGroup

Sitemap | Thai Simple Machines Forum support SMF Thai

Web Begining | SMF Modifications | SMF Thai Translation Web Begining

Drupal | WordPress | CMS Joomla | jQuery Plugin | Web Graphics CMS Joomla