- ชื่อ: Display Name On Registration
- ผู้เขียน: UnclEo
- นำเสนอโดย: DexMoreGroup
- ประเภท: Registration and Login
- รองรับ: SMF 1.1.xx, 2.0.xx
- ปรับปรุงล่าสุด: 26 กุมภาพันธ์ 2554
รายละเอียด การลงทะเบียนในระบบของ SMF จะมีช่องให้ใส่ UserName ซึ่งเป็นชื่อที่ใช้สำหรับการเข้าสู่ระบบ โดยมีข้อจำกัดว่าจะต้องเป็นภาษาอังกฤษและตัวเลขเท่านั้น หากผู้ใช้ต้องการให้เป็นภาษาไทยหรือตัวอักษรพิเศษอื่นๆ จะต้องเข้าไปแก้ไขในข้อมูลส่วนตัว ซึ่งผู้ใช้ส่วนใหญ่ไม่คุ้นเคยกับคุณสมบัติเหล่านี้ก็กลายเป็นเรื่องยุ่งยาก เราเลยลดความยุ่งยากให้ผู้ใช้ด้วยการปรับแต่งนี้เลยครับ
ตัวอย่าง
แก้ไขไฟล์:file $themesdir/Register.template.php
ค้นหา -->>
<tr>
<td width="40%">
<b>', $txt[98], ':</b>
<div class="smalltext">', $txt[520], '</div>
</td>
<td>
<input type="text" name="user" size="20" tabindex="', $context['tabindex']++, '" maxlength="25" />
</td>
</tr>
เพิ่มไว้หลัง -->>
<tr>
<td width="40%">
<b>' ,$txt['display_name'], ':</b>
<div class="smalltext">', $txt['display_name_desc'], '</div>
</td>
<td>
<input type="text" name="realName" size="20" tabindex="' , $context['tabindex']++, '" maxlength="60" />
</td>
</tr>
ค้นหา -->>
// Make sure they've agreed to the terms and conditions.
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
เพิ่มไว้ก่อน -->>
//For the no pic language file
loadlanguage('Profile');
file $languagesdir/Profile.thai-utf8.php
เพิ่ม -->>
$txt['display_name'] = 'ชื่อที่ให้ผู้อื่นเรียก';
$txt['display_name_desc'] = 'คุณสามารถใช้ภาษาไทยหรือตัวอักษรพิเศษได้ในชื่อที่ให้ผู้อื่นเรียก';
ลิงค์หัวข้อ:
http://dexmore.com/topic/4976