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

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

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


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
icon message
general เมื่อ: 11 กรกฎาคม 2553, 16:19:51
  • ชื่อ: Tidy Child Boards
  • ผู้เขียน: Robbo_  
  • นำเสนอโดย: DexMoreGroup
  • ประเภท: Theme Enhancements
  • รองรับ: SMF 1.1.xx, 2.0.xx
  • ปรับปรุงล่าสุด: 19 มีนาคม 2553
  • ต้นฉบับ: Tidy Child Boards

รายละเอียด
      จัดเรียงบอร์ดย่อยที่แสดงในหน้าแรกให้ดูเป็นระเบียบ โดยสามารถกำหนดให้แสดงเป็นคอลัมน์ได้ถึง 4 คอลัมน์ และยังสามารถกำหนดให้แสดง/ไม่แสดงไอค่อนขนาดเล็ก แสดง/ไม่แสดง [new] เมื่อมีกระทู้ใหม่ แสดง/ไม่แสดงกระทู้ที่ยังไม่ได้อ่าน ในบอร์ดย่อย เหมาะสำหรับบอร์ดที่มีบอร์ดย่อยมากๆ ครับ ส่วนที่นี่มีไม่มากก็ซ่อนมันไว้ไม่แสดงซะเลย เพื่อความสวยงามของหน้าบอร์ด

ตัวอย่าง


สำหรับ SMF 1.1.xx

แก้ไขไฟล์:

file $sourcedir/BoardIndex.php

ค้นหา -->>
โค๊ด: [Select]
?>

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
//For tidying boards; examine the children and realign into groups for tidying
function tidyBoards(&$board) {
global $modSettings, $context, $settings;

$limit = ceil(count($board['children']) / $modSettings['tidy_child_boards']);
$children = array();
$this_count = $limit + 1;
$this_division = 0;
foreach($board['children'] as $child) {
if($this_count >= $limit) {
$this_division++;
$this_count = 0;
}
$children[$this_division][] = $child;
$this_count++;
}

$board['tidy_children'] = $children;

// We don't need the original children (plus this means way less mess in templates)
unset($board['children']);
}

ค้นหา -->>
โค๊ด: [Select]
// Find all boards

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
if(empty($context['added_tidy_header']) && !empty($modSettings['tidy_child_boards']) && $modSettings['tidy_child_boards'] > 1) {
if(empty($context['html_headers']))
$context['html_headers'] = '';
$context['html_headers'] .= '
<link rel="stylesheet" type="text/css" href="' . $settings['default_theme_url'] . '/tidyboards.css?1110" />
<style type="text/css">.tidy_child { width:' . floor(100/$modSettings['tidy_child_boards']) . '%; }</style>';
$context['added_tidy_header'] = 1;
}


file $sourcedir/MessageIndex.php

ค้นหา -->>
โค๊ด: [Select]
?>

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
//For tidying boards; examine the children and realign into groups for tidying
function tidyBoards(&$board) {
global $modSettings, $context, $settings;

$limit = ceil(count($board['children']) / $modSettings['tidy_child_boards']);
$children = array();
$this_count = $limit + 1;
$this_division = 0;
foreach($board['children'] as $child) {
if($this_count >= $limit) {
$this_division++;
$this_count = 0;
}
$children[$this_division][] = $child;
$this_count++;
}

$board['tidy_children'] = $children;

// We don't need the original children (plus this means way less mess in templates)
unset($board['children']);
}

ค้นหา -->>
โค๊ด: [Select]
// Aren't children

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
if(empty($context['added_tidy_header']) && !empty($modSettings['tidy_child_boards']) && $modSettings['tidy_child_boards'] > 1) {
if(empty($context['html_headers']))
$context['html_headers'] = '';
$context['html_headers'] .= '
<link rel="stylesheet" type="text/css" href="' . $settings['default_theme_url'] . '/tidyboards.css?1110" />
<style type="text/css">.tidy_child { width:' . floor(100/$modSettings['tidy_child_boards']) . '%; }</style>';
$context['added_tidy_header'] = 1;
}


file $sourcedir/ModSettings.php

ค้นหา -->>
โค๊ด: [Select]
array('check', 'enableVBStyleLogin'),

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
'',
array('select', 'tidy_child_boards', array(1 => &$txt['tidy_child_boards_no'], 2 => &$txt['tidy_child_boards_2col'], 3 => &$txt['tidy_child_boards_3col'], 4 => &$txt['tidy_child_boards_4col'])),
array('check', 'tidy_child_boards_bold'),
array('check', 'tidy_child_boards_icon'),
array('check', 'tidy_child_boards_new'),

file $themedir/BoardIndex.template.php

ค้นหา -->>
โค๊ด: [Select]
foreach ($category['boards'] as $board)
{

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
if(!empty($board['children']) && !empty($modSettings['tidy_child_boards']) && $modSettings['tidy_child_boards'] > 1)
tidyBoards($board);

ค้นหา -->>
โค๊ด: [Select]
// Show some basic

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
if(!empty($board['tidy_children'])) {
$context['tidy_board'] = $board;
template_tidy_children();
}

ค้นหา -->>
โค๊ด: [Select]
?>

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
function template_tidy_children() {
global $context, $settings, $txt, $modSettings;
echo '
<div class="board_children">';
foreach($context['tidy_board']['tidy_children'] as $key => $child_block) {
echo '
<div class="tidy_child">
<ul>';
foreach($child_block as $child) {
echo '
<li>';

if(!empty($modSettings['tidy_child_boards_icon']))
echo '<img src="', $settings['images_url'], '/', ($child['new'] ? 'on' : 'off'), '.gif" width="12" height="12" alt=""> ';

$child['link'] = '<a href="' . $child['href'] . '" ' . ($child['new'] ? 'class="new_posts" ' : '') . 'title="' . ($child['new'] ? $txt[333] : $txt[334]) . ' (' . $txt[330] . ': ' . comma_format($child['topics']) . ', ' . $txt[21] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . '</a>';

if (!empty($modSettings['tidy_child_boards_new']) && $child['new'])
$child['link'] .= ' <a href="' . $child['href'] . '" title="' . ($child['new'] ? $txt[333] : $txt[334]) . ' (' . $txt[330] . ': ' . comma_format($child['topics']) . ', ' . $txt[21] . ': ' . comma_format($child['posts']) . ')"><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" class="new_posts" alt="" /></a>';

if(!empty($modSettings['tidy_child_boards_bold']) && $child['new'])
$child['link'] = '<strong>' . $child['link'] . '</strong>';

echo $child['link'], '</li>';
}
echo '
</ul>
</div>';
}
echo '
</div>';
}

file $themedir/MessageIndex.template.php

ค้นหา -->>
โค๊ด: [Select]
foreach ($context['boards'] as $board)
{

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
if(!empty($board['children']) && !empty($modSettings['tidy_child_boards']) && $modSettings['tidy_child_boards'] > 1)
tidyBoards($board);

ค้นหา -->>
         
โค๊ด: [Select]
// Show some basic

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
if(!empty($board['tidy_children'])) {
$context['tidy_board'] = $board;
template_tidy_children();
}

ค้นหา -->>
โค๊ด: [Select]
// Show some basic

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
if(!empty($board['tidy_children'])) {
$context['tidy_board'] = $board;
template_tidy_children();
}

ค้นหา -->>
โค๊ด: [Select]
?>

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
function template_tidy_children() {
global $context, $settings, $txt, $modSettings;
echo '
<div class="board_children">';
foreach($context['tidy_board']['tidy_children'] as $key => $child_block) {
echo '
<div class="tidy_child">
<ul>';
foreach($child_block as $child) {
echo '
<li>';

if(!empty($modSettings['tidy_child_boards_icon']))
echo '<img src="', $settings['images_url'], '/', ($child['new'] ? 'on' : 'off'), '.gif" width="12" height="12" alt=""> ';

$child['link'] = '<a href="' . $child['href'] . '" ' . ($child['new'] ? 'class="new_posts" ' : '') . 'title="' . ($child['new'] ? $txt[333] : $txt[334]) . ' (' . $txt[330] . ': ' . comma_format($child['topics']) . ', ' . $txt[21] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . '</a>';

if (!empty($modSettings['tidy_child_boards_new']) && $child['new'])
$child['link'] .= ' <a href="' . $child['href'] . '" title="' . ($child['new'] ? $txt[333] : $txt[334]) . ' (' . $txt[330] . ': ' . comma_format($child['topics']) . ', ' . $txt[21] . ': ' . comma_format($child['posts']) . ')"><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" class="new_posts" alt="" /></a>';

if(!empty($modSettings['tidy_child_boards_bold']) && $child['new'])
$child['link'] = '<strong>' . $child['link'] . '</strong>';

echo $child['link'], '</li>';
}
echo '
</ul>
</div>';
}
echo '
</div>';
}

file languagesdir/Modifications.thai-utf8.php

เพิ่ม -->>
ขออภัย! ท่านไม่สามารถเข้าถึงข้อมูลส่วนนี้ได้ กรุณาอ่าน เงื่อนไขการใช้งาน DexMore.Com

การตั้งค่า: ผู้ดูแล -->> ส่วนปรับแต่งค่าการใช้งาน -->> วางรูปแบบ -->> จัดเรียงบอร์ดย่อยเป็นคอลัมน์

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


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
icon message
general ความคิดเห็นที่ 1 เมื่อ: 11 กรกฎาคม 2553, 17:06:00
สำหรับ SMF 2.0.xx

แก้ไขไฟล์:

file $sourcedir/Subs-BoardIndex.php

ค้นหา -->>
โค๊ด: [Select]
?>

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
//For tidying boards; examine the children and realign into groups for tidying
function tidyBoards(&$board) {
global $modSettings, $context, $settings;

$limit = ceil(count($board['children']) / $modSettings['tidy_child_boards']);
$children = array();
$this_count = $limit + 1;
$this_division = 0;
foreach($board['children'] as $child) {
if($this_count >= $limit) {
$this_division++;
$this_count = 0;
}
$children[$this_division][] = $child;
$this_count++;
}

$board['tidy_children'] = $children;

// We don't need the original children (plus this means way less mess in templates)
unset($board['children']);
}

file $sourcedir/BoardIndex.php

ค้นหา -->>
โค๊ด: [Select]
// Do not let search engines index anything if there is a random thing in $_GET.

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
if(empty($context['added_tidy_header']) && !empty($modSettings['tidy_child_boards']) && $modSettings['tidy_child_boards'] > 1) {
if(empty($context['html_headers']))
$context['html_headers'] = '';
$context['html_headers'] .= '
<link rel="stylesheet" type="text/css" href="' . $settings['default_theme_url'] . '/css/tidyboards.css?rc2" />
<style type="text/css">.tidy_child { width:' . floor(100/$modSettings['tidy_child_boards']) . '%; }</style>';
$context['added_tidy_header'] = 1;
}


file $sourcedir/MessageIndex.php

ค้นหา -->>
โค๊ด: [Select]
// If we can view unapproved

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
if(empty($context['added_tidy_header']) && !empty($modSettings['tidy_child_boards']) && $modSettings['tidy_child_boards'] > 1) {
if(empty($context['html_headers']))
$context['html_headers'] = '';
$context['html_headers'] .= '
<link rel="stylesheet" type="text/css" href="' . $settings['default_theme_url'] . '/css/tidyboards.css?rc2" />
<style type="text/css">.tidy_child { width:' . floor(100/$modSettings['tidy_child_boards']) . '%; }</style>';
$context['added_tidy_header'] = 1;
}


file $sourcedir/ManageSettings.php

ค้นหา -->>
โค๊ด: [Select]
array('check', 'enableVBStyleLogin'),

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
'',
array('select', 'tidy_child_boards', array(1 => $txt['tidy_child_boards_no'], 2 => $txt['tidy_child_boards_2col'], 3 => $txt['tidy_child_boards_3col'], 4 => $txt['tidy_child_boards_4col'])),
array('check', 'tidy_child_boards_bold'),
array('check', 'tidy_child_boards_icon'),
array('check', 'tidy_child_boards_new'),

สำหรับ Themes core

แก้ไขไฟล์:

file BoardIndex.template.php

ค้นหา -->>
โค๊ด: [Select]
foreach ($category['boards'] as $board)
{

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
if(!empty($board['children']) && !empty($modSettings['tidy_child_boards']) && $modSettings['tidy_child_boards'] > 1)
tidyBoards($board);

ค้นหา -->>
โค๊ด: [Select]
// Show some basic

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
if(!empty($board['tidy_children'])) {
$context['tidy_board'] = $board;
template_tidy_children();
}

ค้นหา -->>
โค๊ด: [Select]
?>

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
function template_tidy_children() {
global $context, $settings, $txt, $modSettings, $scripturl;
echo '
<div class="board_children">';
foreach($context['tidy_board']['tidy_children'] as $key => $child_block) {
echo '
<div class="tidy_child">
<ul>';
foreach($child_block as $child) {
echo '
<li>';

if(!empty($modSettings['tidy_child_boards_icon']))
echo '<img src="', $settings['images_url'], '/', ($child['new'] ? 'on' : 'off'), '.gif" width="12" height="12" alt=""> ';

if (!$child['is_redirect'])
$child['link'] = '<a href="' . $child['href'] . '" ' . ($child['new'] ? 'class="new_posts" ' : '') . 'title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . '</a>';
else
$child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . '">' . $child['name'] . '</a>';

if (!empty($modSettings['tidy_child_boards_new']) && $child['new'])
$child['link'] .= ' <a href="' . $child['href'] . '" title="' . $txt['new_posts'] . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')"><img src="' . $settings['lang_images_url'] . '/new.gif" class="new_posts" alt="" /></a>';

// Has it posts awaiting approval?
if ($child['can_approve_posts'] && ($child['unapproved_posts'] | $child['unapproved_topics']))
$child['link'] .= ' <a href="' . $scripturl . '?action=moderate;area=postmod;sa=' . ($child['unapproved_topics'] > $child['unapproved_posts'] ? 'topics' : 'posts') . ';brd=' . $child['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" title="' . sprintf($txt['unapproved_posts'], $child['unapproved_topics'], $child['unapproved_posts']) . '" class="moderation_link">(!)</a>';

if(!empty($modSettings['tidy_child_boards_bold']) && $child['new'])
$child['link'] = '<strong>' . $child['link'] . '</strong>';

echo $child['link'], '</li>';
}
echo '
</ul>
</div>';
}
echo '
</div>';
}

file MessageIndex.template.php

ค้นหา -->>
โค๊ด: [Select]
foreach ($context['boards'] as $board)
{

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
if(!empty($board['children']) && !empty($modSettings['tidy_child_boards']) && $modSettings['tidy_child_boards'] > 1)
tidyBoards($board);

ค้นหา -->>
โค๊ด: [Select]
// Show some basic

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
if(!empty($board['tidy_children'])) {
$context['tidy_board'] = $board;
template_tidy_children();
}

ค้นหา -->>
โค๊ด: [Select]
?>

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
function template_tidy_children() {
global $context, $settings, $txt, $modSettings;
echo '
<div class="board_children">';
foreach($context['tidy_board']['tidy_children'] as $key => $child_block) {
echo '
<div class="tidy_child">
<ul>';
foreach($child_block as $child) {
echo '
<li>';

if(!empty($modSettings['tidy_child_boards_icon']))
echo '<img src="', $settings['images_url'], '/', ($child['new'] ? 'on' : 'off'), '.gif" width="12" height="12" alt=""> ';

if (!$child['is_redirect'])
$child['link'] = '<a href="' . $child['href'] . '" ' . ($child['new'] ? 'class="new_posts" ' : '') . 'title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . '</a>';
else
$child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . '">' . $child['name'] . '</a>';

if (!empty($modSettings['tidy_child_boards_new']) && $child['new'])
$child['link'] .= ' <a href="' . $child['href'] . '" title="' . $txt['new_posts'] . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')"><img src="' . $settings['lang_images_url'] . '/new.gif" class="new_posts" alt="" /></a>';

// Has it posts awaiting approval?
if ($child['can_approve_posts'] && ($child['unapproved_posts'] | $child['unapproved_topics']))
$child['link'] .= ' <a href="' . $scripturl . '?action=moderate;area=postmod;sa=' . ($child['unapproved_topics'] > $child['unapproved_posts'] ? 'topics' : 'posts') . ';brd=' . $child['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" title="' . sprintf($txt['unapproved_posts'], $child['unapproved_topics'], $child['unapproved_posts']) . '" class="moderation_link">(!)</a>';

if(!empty($modSettings['tidy_child_boards_bold']) && $child['new'])
$child['link'] = '<strong>' . $child['link'] . '</strong>';

echo $child['link'], '</li>';
}
echo '
</ul>
</div>';
}
echo '
</div>';
}

สำหรับ Themes curve

แก้ไขไฟล์:

file BoardIndex.template.php

ค้นหา -->>
โค๊ด: [Select]
foreach ($category['boards'] as $board)
{

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
if(!empty($board['children']) && !empty($modSettings['tidy_child_boards']) && $modSettings['tidy_child_boards'] > 1)
tidyBoards($board);

ค้นหา -->>
โค๊ด: [Select]
// Show some basic

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
if(!empty($board['tidy_children'])) {
$context['tidy_board'] = $board;
template_tidy_children();
}

ค้นหา -->>
โค๊ด: [Select]
?>

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
function template_tidy_children() {
global $context, $settings, $txt, $modSettings, $scripturl;
echo '
<div class="board_children">';
foreach($context['tidy_board']['tidy_children'] as $key => $child_block) {
echo '
<div class="tidy_child">
<ul>';
foreach($child_block as $child) {
echo '
<li>';

if(!empty($modSettings['tidy_child_boards_icon']))
echo '<img src="', $settings['images_url'], '/', ($child['new'] ? 'on' : 'off'), '.png" width="12" height="12" alt=""> ';

if (!$child['is_redirect'])
$child['link'] = '<a href="' . $child['href'] . '" ' . ($child['new'] ? 'class="new_posts" ' : '') . 'title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . '</a>';
else
$child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . '">' . $child['name'] . '</a>';

if (!empty($modSettings['tidy_child_boards_new']) && $child['new'])
$child['link'] .= ' <a href="' . $child['href'] . '" title="' . $txt['new_posts'] . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')"><img src="' . $settings['lang_images_url'] . '/new.gif" class="new_posts" alt="" /></a>';

// Has it posts awaiting approval?
if ($child['can_approve_posts'] && ($child['unapproved_posts'] | $child['unapproved_topics']))
$child['link'] .= ' <a href="' . $scripturl . '?action=moderate;area=postmod;sa=' . ($child['unapproved_topics'] > $child['unapproved_posts'] ? 'topics' : 'posts') . ';brd=' . $child['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" title="' . sprintf($txt['unapproved_posts'], $child['unapproved_topics'], $child['unapproved_posts']) . '" class="moderation_link">(!)</a>';

if(!empty($modSettings['tidy_child_boards_bold']) && $child['new'])
$child['link'] = '<strong>' . $child['link'] . '</strong>';

echo $child['link'], '</li>';
}
echo '
</ul>
</div>';
}
echo '
</div>';
}

file MessageIndex.template.php

ค้นหา --->>
โค๊ด: [Select]
foreach ($context['boards'] as $board)
{

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
if(!empty($board['children']) && !empty($modSettings['tidy_child_boards']) && $modSettings['tidy_child_boards'] > 1)
tidyBoards($board);

ค้นหา -->>
โค๊ด: [Select]
// Show some basic

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
if(!empty($board['tidy_children'])) {
$context['tidy_board'] = $board;
template_tidy_children();
}

ค้นหา -->>
โค๊ด: [Select]
?>

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
function template_tidy_children() {
global $context, $settings, $txt, $modSettings;
echo '
<div class="board_children">';
foreach($context['tidy_board']['tidy_children'] as $key => $child_block) {
echo '
<div class="tidy_child">
<ul>';
foreach($child_block as $child) {
echo '
<li>';

if(!empty($modSettings['tidy_child_boards_icon']))
echo '<img src="', $settings['images_url'], '/', ($child['new'] ? 'on' : 'off'), '.png" width="12" height="12" alt=""> ';

if (!$child['is_redirect'])
$child['link'] = '<a href="' . $child['href'] . '" ' . ($child['new'] ? 'class="new_posts" ' : '') . 'title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . '</a>';
else
$child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . '">' . $child['name'] . '</a>';

if (!empty($modSettings['tidy_child_boards_new']) && $child['new'])
$child['link'] .= ' <a href="' . $child['href'] . '" title="' . $txt['new_posts'] . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')"><img src="' . $settings['lang_images_url'] . '/new.gif" class="new_posts" alt="" /></a>';

// Has it posts awaiting approval?
if ($child['can_approve_posts'] && ($child['unapproved_posts'] | $child['unapproved_topics']))
$child['link'] .= ' <a href="' . $scripturl . '?action=moderate;area=postmod;sa=' . ($child['unapproved_topics'] > $child['unapproved_posts'] ? 'topics' : 'posts') . ';brd=' . $child['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" title="' . sprintf($txt['unapproved_posts'], $child['unapproved_topics'], $child['unapproved_posts']) . '" class="moderation_link">(!)</a>';

if(!empty($modSettings['tidy_child_boards_bold']) && $child['new'])
$child['link'] = '<strong>' . $child['link'] . '</strong>';

echo $child['link'], '</li>';
}
echo '
</ul>
</div>';
}
echo '
</div>';
}

file languagesdir/Modifications.thai-utf8.php

เพิ่ม -->>
ขออภัย! ท่านไม่สามารถเข้าถึงข้อมูลส่วนนี้ได้ กรุณาอ่าน เงื่อนไขการใช้งาน DexMore.Com

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



Bhutan   ชาย ออฟไลน์ เว็บไซต์
icon message
general ความคิดเห็นที่ 2 เมื่อ: 9 กรกฎาคม 2554, 01:28:32
ลอง double check code แล้วแต่ไม่ทราบว่าผิดตรงไหน เป็น SMF 1.1.x ครับ



เคยเจอไหมเอ่ย มันขึ้นเครื่องหมาย . หน้า กระทู้ย่อย แถมไม่ยอมขึ้นคอลัมม์ใหม่อีกต่างหาก

ลิงค์หัวข้อ: http://dexmore.com/topic/2356
Windows NT 6.1    Firefox 5.0   see ip บันทึกการเข้า
*
*


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
icon message
general ความคิดเห็นที่ 3 เมื่อ: 9 กรกฎาคม 2554, 04:39:01
สร้างไฟล์ tidyboards.css ไว้ในธีม default

โค๊ด: [Select]
.tidy_child ul {
list-style:none;
padding:0 0.5em 0 0.5em;
}

.tidy_child {
display:block;
float:left;
}

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

Creative Commons License

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

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

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