วันจันทร์ที่ 21 กุมภาพันธ์ พ.ศ. 2554

Hosting VS webediter ทำโฮสต์คนละเรื่องกับทำเว็บ

Hosting VS webediter ทำโฮสต์คนละเรื่องกับทำเว็บ

วันนี้มีลูกค้าโฮสต์โทรมาถามว่า หน้าเว็บเขาไม่แสดง เป็นที่อะไร ถ้าเขาจะใส่ตัวหนังสือสีแดงทำยังไง
อันไหนที่ไม่ยากเย้นพอตอบได้เราก็ตอบให้ 

แต่ที่จริงแล้วคนให้บริการโฮสติ้ง ไม่มีข้อบังคับใดบอกไว้ว่าจะต้องเก่งงานออกแบบหรืองานเว็บแอพพลิเคชันอื่นๆ
เพราะถ้าว่ากันตามจริง เขาคือผู้ให้บริการพื้นที่  ไม่ใช่บริการจัดทำ หรือดูแลเว็บ
บางคนไม่เข้าใจ ก็โวยวายว่าไม่รับผิดชอบต่อลูกค้า
ทั้งๆที่ปัญหามันเกิดจากลูกค้าเอง  ทั้งเรื่องเล็กๆ อย่างใช้เอฟทีพีไม่เป็น
ใช้ดรีมเวพเวอไม่เป็น  ทำหน้าอินเด็กไม่ได้
จนไปถึงเรื่องใหญ่ๆ อย่างเว็บโดนแฮ๊ค โดนบ็อท-สแปมบอมพ์เว็บ
ปัญหกาแบบนี้มันอยู่ที่ผู้ใช้ ต้องมีความเข้าใจ ต้องมีการรับผิดชอบตัวเองด้วย
ความปลอดภัยเบื้องต้น ต้องดูแลเอง เช่น เปอมิสชันไฟล์
ยูสเซอ-พาสเวิด ล็อกอินเอฟทีพี 

Why choose smf.

For a fixed link basic HTML is inevitable or not, it might come a little more brief. Use a little shortcut. The web applications such as Edith Signs frontpage dreamweaver enough to do with the templates and other experts. Now, most will have a problem with a database Amooea (database).

cms smf is another task, but focus on Community. Is social in nature Forum - A bulletin board.

Web Forum has a lot to choose from. Why then use this SMF (Simple Machines Forum) is a free web board or forum Forum categories suitable for adaptation to the forum and much more. There are several types of multiple looks.

When installing new SMF. All file systems and databases together less than 10 MB if the cut does not only out to approximately 5MB SMF requested to do so much customization and flexibility. Especially those who have some basic html to be able to adjust very well.
 
SMF themes to choose from a lot. Extra modules including many English SMF multi Forum for their support jackpot question - answer the problem.
 
 
 

ทำไมถึงเลือกใช้ smf

สำหรับคนทำเว็บแล้วพื้นฐานคงหนีไม่พ้น HTML
หรือไม่ก็อาจจะย่นย่อเข้ามาอีกหน่อย  ใช้วิธีลัดอีกนิด โดยโปรแกรมเว็บอีดิตทั้งหลาย
เช่น frontpage dreamweaver  พอทำๆร่วมกับเทมเพลทจนชำนาญ
ทีนี้ส่วนใหญ่ก็จะเจอปัญหากับการทำฐานข้อมูละ (database)

บางคนอาจจะหาหนังสือ PHP มาลองหัดเขียนเอง
แต่ก็มีหลายคนที่ไม่ใช้วิธีนี้ เพราะการเขียนเอง และให้ชำนาญใช้ได้จริง
ใช้เวลาไม่ต่ำกว่า 1-2 ปี แล้วมันจะไปทันทำมาหากินอะไรได้ 
สุดท้ายก็ต้องหันหน้าเข้าหาเว็บกึ่งสำเร็จรูปทั้งหลายแหล่

mambo joomla wordpress discuz drupal อีกมากมาย  แต่ในที่นี้เราจะพูดถึงเฉพาะ smf เท่านั้น
smf เป็น cms อีกชนิดหนึ่ง  แต่เน้นหนักงานด้านคอมมูนิตี้ คือสังคมออนไลน์ในลักษณะกระดานถาม-ตอบ
กระดานข่าว   แต่ที่จริงแล้ว smf สามารถดัดแปลงทำเว็บได้แทบทุกชนิด
และหากมีความชำนาญด้าน PHP เพียงพอ
ก็สามารถอินทิเกรตรวมกับเว็บแอพพลิเคชันอื่นๆได้สบาย

เว็บกระดานถามตอบนั้นมีให้เลือกใช้เยอะ แล้วทำไมต้องเลือกใช้ตัวนี้
SMF (Simple Machines Forum) เป็นฟรีเว็บบอร์ด หรือฟอรัม เหมาะสมกับงานประเภทกระดานสนทนา กระดานข่าว และดัดแปลงได้อีกมากมาย ทำได้หลายชนิดหลายหน้าตา
SMF ใช้ภาษา php ในการเขียน แต่ก็ยังมีการใช้ html ในบางจุด ฐานข้อมูลเป็นแบบ MySQL
SMF ความเด่นอยู่ที่การประหยัดทรัพยากร แตกต่างจาก CMS อีกหลายตัวที่อาจจะดูโฉบเฉี่ยว แต่กินทรัพยากรมาก เช่นดีสคัส พีเอชพีวินท์
SMF เมื่อติดตั้งใหม่ ไฟล์ทั้งหมดในระบบและฐานข้อมูลรวมกันไม่ถึง 10 MB ถ้าตัดส่วนไม่จำเป็นออก เหลือประมาณ 5MB เท่านั้น
SMF การรปรับแต่งสามารถทำได้มากและยืดหยุ่น โดยเฉพาะผู้ที่มีพื้นฐานทาง html มาบ้างจะสามารถปรับแต่งได้อย่างดี
SMF มีธีมให้เลือกใช้เยอะ รวมถึงโมดูลเสริมอีกมากมาย
SMF ภาษาไทย มีหลายเว็บบอร์ดที่ให้การซัพพอร์อตถาม-ตอบปัญหา
SMF มีให้เลือกใช้ 2 เวอร์ชั่น
SMF 1.1.* ใช้งานค่อนข้างง่าย ปรับแต่งง่าย เหมาะสำหรับเว็บที่ต้องการพัฒนาเพิ่มเติม
SMF 2.0 * ตัวเว็บจะมีความสวยงาม ฟังชันพื้นฐานจะค่อนข้างสมบูรณ์ แต่การแก้ไขจะทำได้ยาก ผู้แก้ต้องเชี่ยวชาญ css

วันศุกร์ที่ 18 กุมภาพันธ์ พ.ศ. 2554

แก้ไขการอนุญาต ใน 2.0.*

ถ้าเป็น 2.0* ให้ทำตามนี้





ข้อควรสังเกตุและหมั่นทบทวนของ 2.0*  (เกี่ยวกับการอนุญาต)

รูปแนบที่ 1-2 ตัวอย่างของการแก้ไขตามกลุ่มของสมาชิก
อันนี้ก็ไม่ได้แตกต่างอะไรกับ 1.1.*



****
แต่ถ้าต้องการบอร์ดปิด ก็ใช้วิธีเหมือน 1.1.*  
แก้ไขบอร์ด/กลุ่มที่อนุญาต








การอนุญาตโดยบอร์ด  

จากรูป 01  การอนุญานั้นมีค่าเป็นดีฟอลด์  *แล้วค่าดีฟอลค์ คืออะไร มาจากไหน  

จากรูป 02  เป็นการตั้งค่าเข้าถึงแบบดีฟอลด์ ว่าให้ทำอะไรได้บ้าง  ทั้งนี้สามารถเปลี่ยนได้ตามความต้องการ  

จากรูป 03  แสดงให้เห็นว่าตอนนี้มีบอร์ดกี่บอร์ด  ใช้การตั้งค่าแบบไหนบ้าง  
ซึ่งค่าในรูป 03 นี้ก็จะสัมพันธ์กับการตั้งค่า แก้ไขบอร์ด/Permission Profile (ตามรูป 00 ที่แนบในรีพลายข้างบน) 







Anti-Bot: Are You Human/Bot?

Anti-Bot: Are You Human/Bot?
ต้นฉบับ  http://custom.simplemachines.org/mods/index.php?mod=999

ม็อดตัวนี้คนเขาทำมานานแล้ว และไม่มีการอัพเดตเวอร์ชันมานาน สนับสนุนแค่นี้
1.1.4, 1.1.7, 1.1.8, 1.1.9, 1.1.10, 2.0 Beta 3 Public, 2.0 RC1, 2.0 RC1-1, 2.0 RC1.2 
ดังนั้น  1.1.12 กับ 2.0 RC4 จึงลงแบบแพ็คเกจไม่ได้ ต้องเมนวลเท่านั้น 
(ยังไงก็ต้องเมนวลอยู่ดี ถ้าใช้ไฟล์ภาษาไทย)

ถึงจะแก่แต่ก็เก๋า กันบอทสมัครสมาชิกได้ชะงัดนัก 


สำหรับ 1.1.12
เวอร์ชัน 2.0 RC3-4 ไม่จำเป็นต้องลงม็อดตัวนี้ 
เพราะมันฟังชันตั้งคำถามก่อนสมัครไว้ให้อยู่แล้ว ที่เมนูสแปม 


Themes/default/Register.template.php
ค้นหา

โค๊ด:
// Are there age restrictions in place?

วางก่อนที่ค้นหา
โค๊ด:
## Start MOD Are You Human?
if (!empty($modSettings['are_you_human_s']))
echo '
<tr valign="top">
<td width="40%" valign="top">
<b>', $context['are_you_human_question'], ':</b>
<div class="smalltext">', $txt['are_you_human_desc'], '</div>
</td>
<td>
<select name="', $_SESSION['are_you_human']['name'], '" tabindex="',  $context['tabindex']++, '" class="select">',
$context['are_you_human_answers'], '
</select>
</td>
</tr>';
## End MOD Are You Human?


ค้นหา

โค๊ด:
<input type="text" name="coppaPhone" id="coppaPhone_input" value="', !empty($modSettings['coppaPhone']) ? $modSettings['coppaPhone'] : '', '" size="22" maxlength="35" />
</td>
</tr>

วางหลัง
โค๊ด:
<tr class="windowbg2">
<td width="100%" colspan="2" align="center">
<hr />
</td>
</tr><tr class="windowbg2">
<th width="50%" align="right">
<label for="are_you_human_s">', $txt['are_you_human_s'], '</label>:
</th>
<td valign="top">
<input type="checkbox" name="are_you_human_s" id="are_you_human_s"', empty($modSettings['are_you_human_s']) ? '' : ' checked="checked"', ' class="check" />
</td>
</tr><tr class="windowbg2">
<th width="50%" align="right">
<label for="are_you_human_q">', $txt['are_you_human_q'], '</label>:
</th>
<td valign="top">
<select name="are_you_human_q" id="are_you_human_q" >
<option value="0" ', ('0' == $modSettings['are_you_human_q'] ? 'selected="selected"' : '') , '>', $txt['are_you_human_q_0'], '</option>
<option value="1" ', ('1' == $modSettings['are_you_human_q'] ? 'selected="selected"' : '') , '>', $txt['are_you_human_q_1'], '</option>
<option value="2" ', ('2' == $modSettings['are_you_human_q'] ? 'selected="selected"' : '') , '>', $txt['are_you_human_q_2'], '</option>
</select>
</td>
</tr><tr class="windowbg2">
<th width="50%" align="right">
<label for="are_you_human_a">', $txt['are_you_human_a'], '</label>:
</th>
<td valign="top">
<input type="checkbox" name="are_you_human_a" id="are_you_human_a"', empty($modSettings['are_you_human_a']) ? '' : ' checked="checked"', ' class="check" />
</td>
</tr>


Sources/Register.php
ค้นหา
โค๊ด:
// Under age restrictions?

วางก่อน
โค๊ด:
## Start MOD Are You Human? - Generating Code
if (!empty($modSettings['are_you_human_s']))
{
// Generate Random field name
$_SESSION['are_you_human']['name'] = chr(mt_rand(97, 122)) . md5(mt_rand());
$_SESSION['are_you_human']['answer'] = chr(mt_rand(97, 122)) . md5(mt_rand());

// Choice the Question
$context['are_you_human_question'] = $modSettings['are_you_human_q'] >> 1
? $txt['are_you_human_q' . mt_rand(1, 2)]
: ($modSettings['are_you_human_q'] ? $txt['are_you_human_q2'] : $txt['are_you_human_q1']);

// Choice the Answer
$answer_correct = $context['are_you_human_question'] == $txt['are_you_human_q1']
? $txt['are_you_human_answers'][0] : $txt['are_you_human_answers'][1];

// Shuffle the Answers?
if ($modSettings['are_you_human_a'])
shuffle($txt['are_you_human_answers']);

// Create the Options
$context['are_you_human_answers'] = '';
foreach ($txt['are_you_human_answers'] as $value)
$context['are_you_human_answers'] .= '
<option value="' . ($value == $answer_correct ? $_SESSION['are_you_human']['answer'] : chr(mt_rand(97, 122)) . md5(mt_rand())) . '">' . $value . '</option>';
unset($answer_correct);

// This page should be reaload always
header('Cache-Control: no-store');
}
## End MOD Are You Human? - Generating Code

ค้นหา
โค๊ด:
// Are they under age, and under age users are banned?

วางก่อน
โค๊ด:
## Start MOD Are You Human? - Capturing Bots

// Backup & Deleting SuperGlobal
$session = isset($_SESSION['are_you_human']) ? $_SESSION['are_you_human'] : false;
unset($_SESSION['are_you_human']);

// Are You Human?
if (!empty($modSettings['are_you_human_s']))
if (empty($session) || empty($_POST[$session['name']]) || $_POST[$session['name']] != $session['answer'])
fatal_lang_error(empty($session) ? 'are_you_human_expired' : 'are_you_human_fail', false);

// Old way - spammers should be the only one trying this
if (isset($_POST['areyouhuman']))
fatal_lang_error('are_you_human_fail', false);

## End MOD Are You Human? - Capturing Bots


Sources/ManageRegistration.php
ค้นหา
โค๊ด:
'coppaPhone' => !empty($_POST['coppaPhone']) ? $_POST['coppaPhone'] : '',

วางหลัง
โค๊ด:
## MOD Are You Human?
'are_you_human_s' => empty($_POST['are_you_human_s']) ? '0' : '1',
'are_you_human_q' => ereg('[0-2]', $_POST['are_you_human_q']) ? $_POST['are_you_human_q'] : '0',
'are_you_human_a' => empty($_POST['are_you_human_a']) ? '0' : '1',


Themes/default/languages/Modifications.english.php

ค้นหา
โค๊ด:
?>

วางก่อน
โค๊ด:
// Are You Human?
$txt['are_you_human_q1'] = 'Are You Human?';
$txt['are_you_human_q2'] = 'Are You Bot?';
$txt['are_you_human_desc'] = 'Another Anti-Bot Measure';
$txt['are_you_human_answers'][0] = 'Yes';
$txt['are_you_human_answers'][1] = 'No';
$txt['are_you_human_answers'][2] = 'I don\'t know';
$txt['are_you_human_answers'][3] = 'Maybe';
$txt['are_you_human_answers'][4] = 'I think...';
$txt['are_you_human_answers'][5] = 'Waits';
$txt['are_you_human_answers'][6] = 'Hmm'; 
// You can add more Answers for confused the bots

$txt['are_you_human_expired'] = 'This page has expired. Please restart the <a href="' . $scripturl . '?action=register;">registration page</a>.';
$txt['are_you_human_fail'] = 'Please confirm that you are human in order to proceed with registration.<br />
Bots are not allowed to register.';

$txt['are_you_human_s'] = 'Enable MOD Are You Human';
$txt['are_you_human_q'] = 'Select the Question';
$txt['are_you_human_a'] = 'Order Rand the Answers';
$txt['are_you_human_q_0'] = 'Are You Human?';
$txt['are_you_human_q_1'] = 'Are You Bot?';
$txt['are_you_human_q_2'] = 'Random Question';


Themes/default/languages/Modifications.thai-utf8.php
เครดิตภาษาไทย  it-dark.org

ค้นหา
โค๊ด:
?>

วางก่อน
โค๊ด:
/Are You Human?it-dark.org
$txt['are_you_human_q1'] = 'กรุณาตอบคำถามของท่าน?';
$txt['are_you_human_q2'] = 'กรุณาตอบคำถามของท่าน';
$txt['are_you_human_desc'] = '<font color=yellow>คุณจะไม่สแปมบอร์ดใช่หรือไม่. </font>';
$txt['are_you_human_answers'][0] = 'ไม่ใช่';
$txt['are_you_human_answers'][1] = 'ใช่';
$txt['are_you_human_answers'][2] = 'ฉันไม่รู้';
$txt['are_you_human_answers'][3] = 'อาจจะใช่';
$txt['are_you_human_answers'][4] = 'คิดว่าน่าจะใช่...';
$txt['are_you_human_answers'][5] = 'รอคิดดูก่อน';
$txt['are_you_human_answers'][6] = 'อืม..';

// You can add more Answers for confused the bots

$txt['are_you_human_expired'] = 'หมดเวลาของการสมัคร. กรุณาเริ่มต้นใหม่ <a href="' . $scripturl . '?
action=register;">สมัครสมาชิก</a>.';
$txt['are_you_human_fail'] = 'กรุณาตรวจสอบคำตอบของคุณ..<br />คุณแอบแฝงเข้ามา ไม่อนุญาติให้ลงทะเบียน.';
$txt['are_you_human_s'] = 'เปิดใช้งาน';
$txt['are_you_human_q'] = 'เลือกคำถาม';
$txt['are_you_human_a'] = 'สุ่มตอบ';
$txt['are_you_human_q_0'] = 'คำถามที่1';
$txt['are_you_human_q_1'] = 'คำถามที่2';
$txt['are_you_human_q_2'] = 'สุมคำถาม';


หลังจากแก้โค๊ดทั้งหมดเสร็จแล้ว ต้องเพิ่มฐานข้อมูล
ดาวน์โหลดไฟล์แนบ install1.php  จากนั้นอัพขึ้นโฮสต์ วางไว้ที่เดียวกับ SSI.php
คลิกเพื่อดาวน์โหลด* install1.php 

จากนั้นเข้าเบราว์เซอร์ แล้วพิมพ์
http://www/.เว็บคุณ.โดเมน/บอร์ด/install1.php