ผู้เขียน หัวข้อ: บันทึก... ช่วยจำ การปรับแต่บอร์ด... (www.bp.or.th/webboard/)  (อ่าน 5454 ครั้ง)

0 สมาชิก และ 1 บุคคลทั่วไป กำลังดูหัวข้อนี้

ออฟไลน์ เว็บมาสเตอร์...

  • ผู้ดูแลระบบ
  • *****
  • กระทู้: 571
  • เพศ: ชาย
    • ดูรายละเอียด
    • www.bp.or.th
ย้าย เริ่มหัวข้อใหม่ มาอยู่ด้านหน้า



ไฟล์... ./Themes/default/MessageIndex.template.php

ค้นหา...
   
โค๊ด: [Select]
// Create the button set...
$normal_buttons = array(
'markread' => array('text' => 'mark_read_short', 'image' => 'markread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=board;board=' . $context['current_board'] . '.0;sesc=' . $context['session_id']),
'notify' => array('test' => 'can_mark_notify', 'text' => 125, 'image' => 'notify.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_board'] : $txt['notification_enable_board']) . '\');"', 'url' => $scripturl . '?action=notifyboard;sa=' . ($context['is_marked_notify'] ? 'off' : 'on') . ';board=' . $context['current_board'] . '.' . $context['start'] . ';sesc=' . $context['session_id']),
'new_topic' => array('test' => 'can_post_new', 'text' => 'smf258', 'image' => 'new_topic.gif', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0'),
'post_poll' => array('test' => 'can_post_poll', 'text' => 'smf20', 'image' => 'new_poll.gif', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0;poll'),
);


วางทับแทนที่หา...
   
โค๊ด: [Select]
// Create the button set...
$normal_buttons = array(
'new_topic' => array('test' => 'can_post_new', 'text' => 'smf258', 'image' => 'new_topic.gif', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0'),

'markread' => array('text' => 'mark_read_short', 'image' => 'markread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=board;board=' . $context['current_board'] . '.0;sesc=' . $context['session_id']),

'notify' => array('test' => 'can_mark_notify', 'text' => 125, 'image' => 'notify.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_board'] : $txt['notification_enable_board']) . '\');"', 'url' => $scripturl . '?action=notifyboard;sa=' . ($context['is_marked_notify'] ? 'off' : 'on') . ';board=' . $context['current_board'] . '.' . $context['start'] . ';sesc=' . $context['session_id']),

'post_poll' => array('test' => 'can_post_poll', 'text' => 'smf20', 'image' => 'new_poll.gif', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0;poll'),
);

ค่อยๆ นึก...

เดี๋ยวเอามาลง...

:002:
« แก้ไขครั้งสุดท้าย: 27 ก.ย. 2552, 07:46:03 โดย หลวงพี่เว็บ... »

ออฟไลน์ เว็บมาสเตอร์...

  • ผู้ดูแลระบบ
  • *****
  • กระทู้: 571
  • เพศ: ชาย
    • ดูรายละเอียด
    • www.bp.or.th
แก้ไขให้เรียงกระทู้ตามวันที่ตั้ง

ไฟล์... ./Sources/MessageIndex.php

ค้นหา...
	
// They didn't pick one, default to by last post descending.
	
if (!isset(
$_REQUEST['sort']) || !isset($sort_methods[$_REQUEST['sort']]))
	
{
	
	
$context['sort_by'] = 'last_post';
	
	
$_REQUEST['sort'] = 'ID_LAST_MSG';
	
	
$ascending = isset($_REQUEST['asc']);
	
}


วางทับแทนที่หา...
	
// They didn't pick one, default to by last post descending.
	
if (!isset(
$_REQUEST['sort']) || !isset($sort_methods[$_REQUEST['sort']]))
	
{
	
	
$context['sort_by'] = 'last_post';
	
	
$_REQUEST['sort'] = 'ID_TOPIC';
	
	
$ascending = isset($_REQUEST['asc']);
	
}
« แก้ไขครั้งสุดท้าย: 27 ก.ย. 2552, 07:47:23 โดย หลวงพี่เว็บ... »

ออฟไลน์ เว็บมาสเตอร์...

  • ผู้ดูแลระบบ
  • *****
  • กระทู้: 571
  • เพศ: ชาย
    • ดูรายละเอียด
    • www.bp.or.th
คลิกเปิดกระทู้ในหน้าต่างใหม่

ไฟล์... ./Sources/MessageIndex.php

ค้นหา...
'link' => '<a href="' $scripturl '?topic=' $row['ID_TOPIC'] . '.0">' $row['firstSubject'] . '</a>'

วางทับแทนที่หา...
'link' => '<a href="' $scripturl '?topic=' $row['ID_TOPIC'] . '.0" target="_blank">' $row['firstSubject'] . '</a>'

ออฟไลน์ เว็บมาสเตอร์...

  • ผู้ดูแลระบบ
  • *****
  • กระทู้: 571
  • เพศ: ชาย
    • ดูรายละเอียด
    • www.bp.or.th
แยกระหว่างหัวข้อติดหมุดกับหัวข้อปกติออกจากกัน

ไฟล์... ./Themes/default/MessageIndex.template.php


ค้นหา...
	
	
	
// Do we want to seperate the sticky and lock status out?


วางไว้ก่อนที่หา...
//---------------แยกระหว่างหัวข้อติดหมุดกับหัวข้อปกติออกจากกัน --------------- //

if (isset($previousTopicClass) && strpos($previousTopicClass'sticky') !== false && !$topic['is_sticky'])
echo 
'
<tr class="titlebg" style="font-size: 1ex;">
<td colspan="7">&nbsp;</td>
</tr>'
;
$previousTopicClass $topic['class'];

//---------------แยกระหว่างหัวข้อติดหมุดกับหัวข้อปกติออกจากกัน --------------- //

ออฟไลน์ เว็บมาสเตอร์...

  • ผู้ดูแลระบบ
  • *****
  • กระทู้: 571
  • เพศ: ชาย
    • ดูรายละเอียด
    • www.bp.or.th
แก้ปัญหาการอ่านภาษาไทยไม่ออก (ทั้ง Hotmail และ Yahoo)

สำหรับการส่งอีเมลยืนยันการสมัครสมาชิกและการส่งข้อความ(pm) ระหว่างสมาชิก

ใช้ได้ทั้ง tis-620 และ UTF-8


ไฟล์... ./Sources/Subs-Post.php

ค้นหา... (ประมาณบรรทัด ๕๗๘)
โค๊ด: [Select]
list (, $from_name) = mimespecialchars(addcslashes($from !== null ? $from : $context['forum_name'], '<>()\'\\"'), true, $hotmail_fix, $line_break);



วางทับแทนที่หา...
โค๊ด: [Select]
list (, $from_name) = mimespecialchars(addcslashes($from !== null ? $from : $context['forum_name'], '<>()\'\\"'), true, false, $line_break);




ค้นหา... (ประมาณบรรทัด ๕๗๙)
โค๊ด: [Select]
list (, $subject) = mimespecialchars($subject, true, $hotmail_fix, $line_break);

วางทับแทนที่หา...
โค๊ด: [Select]
list (, $subject) = mimespecialchars($subject, true, false, $line_break);

ขอบคุณ : tosakp
« แก้ไขครั้งสุดท้าย: 02 ต.ค. 2552, 09:43:49 โดย หลวงพี่เว็บ... »

ออฟไลน์ เว็บมาสเตอร์...

  • ผู้ดูแลระบบ
  • *****
  • กระทู้: 571
  • เพศ: ชาย
    • ดูรายละเอียด
    • www.bp.or.th
แสดงวันเวลาเริ่มต้นของผู้ตั้งกระทู้



ไฟล์... .Themes/default/MessageIndex.template.php


ค้นหา...
	
	
	
	
	
	
<
td class="windowbg2" valign="middle" width="14%">
	
	
	
	
	
	
	
', $topic['first_post']['member']['link'], '
	
	
	
	
	
	
</
td>


วางทับแทนที่หา...
	
	
	
	
	
	
<
td class="windowbg2" valign="middle" width="18%">
	
	
	
	
	
	
	
', $topic['first_post']['member']['link'], '<br />
	
	
	
	
	
	
	
<
span class="smalltext">
	
	
	
	
	
	
	
' . $topic['first_post']['time'] . '
	
	
	
	
	
	
	
</
span>
	
	
	
	
	
	
</
td>