ติดต่อลงโฆษณา [email protected]

แสดงกระทู้

ส่วนนี้จะช่วยให้คุณสามารถดูกระทู้ทั้งหมดสมาชิกนี้ โปรดทราบว่าคุณสามารถเห็นเฉพาะกระทู้ในพื้นที่ที่คุณเข้าถึงในขณะนี้


ข้อความ - chaotoob.com

หน้า: [1] 2 3
1
สุนัขไม่เคยต้องมีรถหรูหรา หรือบ้านหลังใหญ่ หรือเสื้อผ้าทันสมัย แค่กิ่งไม้สักท่อนก็ดีพอแล้ว สุนัขไม่แคร์ว่าเรารวยหรือจน..หลักแหลมหรือทึ่ม ฉลาดหรือโง่ เทใจให้มันมันจะเทใจคืน..มีกี่คนที่จะพูดได้ถึงแบบนั้น กี่คนที่ทำให้เรารู้สึกสำคัญ...โดดเด่นและพิเศษมีกี่คนที่ทำให้เราพิเศษสุดไม่เหมือนใคร......เจ้าตูบ

เจ้าตูบ ดอทคอม ชุมชนคนรักสุนัข เพื่อนที่ดีที่สุด

3
สุนัขไม่เคยต้องมีรถหรูหรา หรือบ้านหลังใหญ่ หรือเสื้อผ้าทันสมัย แค่กิ่งไม้สักท่อนก็ดีพอแล้ว สุนัขไม่แคร์ว่าเรารวยหรือจน..หลักแหลมหรือทึ่ม ฉลาดหรือโง่ เทใจให้มันมันจะเทใจคืน..มีกี่คนที่จะพูดได้ถึงแบบนั้น กี่คนที่ทำให้เรารู้สึกสำคัญ...โดดเด่นและพิเศษมีกี่คนที่ทำให้เราพิเศษสุดไม่เหมือนใคร......เจ้าตูบ

เจ้าตูบ ดอทคอม ชุมชนคนรักสุนัข เพื่อนที่ดีที่สุด

เจ้าตูบ ดอทคอม 

4
ทำได้ครับเพราะ smf คือเว็บบอร์ดสำเร็จรูปครับ โดยที่เราไม่ต้องเขียนโปรแกรมเว็บบอร์ดเอง ทั้งนี้ยังมี phpBB และอื่น ๆ อีกที่เป็นเว็บบอร์ดฟรี สำเร็จรูป

AppServ คือโปรแกรมสำเร็จรูปที่รวบรวม Apache,MySQL,PHP และ phpMyAdmin โดยที่ลงโดยไม่ต้อง config อะไรให้ยุ่งยาก เป็นจุดเด่นของ AppServ

Apache เป็นโปรแกรมเว็บ server ที่ให้บริการ www ทุกครั้งที่เราเรียกเว็บ โปรแกรมนี้จะถูกทำงาน เพื่อบริการเรา

PHP เป็นภาษาในการเขียนโปรแกรมภาษาหนึ่งบนโลก ที่นิยมใช้กัน และฟรี

MySQL เป็นโปรแกรมบริการจัดการระบบฐานข้อมูล เป็นระบบจัดการฐานข้อมูลที่ใช้ภาษา SQL ในการสั่งการ และ MySQL ยังฟรีอีกด้วย

phpMyAdmin เป็นโปรแกรมที่ใช้ PHP เขียน เพื่อนช่วยเป็นสื่อกลางในการติดต่อ MySQL กับคนใช้ฐานข้อมูลให้ง่ายขึ้น เพราะว่าปกติ การที่เราจะใช้ MySQL นั้น เราจะต้องใช้แบบ command line (จอดำ ๆ)


5
จริงๆแล้วถ้าหาดีๆก็จะมีหลายเว็บนะครับที่แนะนำ หรือในของ ThaiSMFนี้ ก็มีครับเพราะหลายๆคนเขาแนะนำบอกวิธีติดตั้งไว้เยอะเลย แล้วคำอธิบายนี้ผมหามาให้ครับเพราะอาจมีหลายๆคนที่ต้องการคำอธิบาย(หากไม่เข้าใจอะไร ผมว่า Google ก็ช่วยได้เยอะนะครับ)

เริ่มกันเลยดีกว่าไหมครับ

วิธีติดตั้ง SMF บอร์ด

1. ดาวน์โหลด SMF จาก Site download Smf
2. ดาวน์โหลดภาษาไทย แบ่ง ออกเป็น 2 ชนิด ดูดีๆ  Thai tis620 และ Thai utf8 download ภาษาไทย
* ถ้า MySQL สนับสนุนการใช้งาน UTF8 แต่ถ้าอยากใช้ TIS620 ก้อได้ ครับ
3. ทำการ แตกซิป โฟลเดอร์แล้วโยนเข้า FTP ที่เราฝากโฮสไว้  ในโฟลเดอร์ของเวป
4. ทำการ เปลี่ยนชื่อโฟลเดอร์ เช่น forum หรือ webboard อะไรก็ว่าไป  มันจะเป็นพาร์ทเวลาเข้าบอร์ด
* เวลาเรียก  http://www.ชื่อเว็บ.com/forum 



5. ทำการ FTP เพื่อ UPLOAD SMF ไปไว้บน Hosting
* Hosting ที่เป็น unix จะต้องทำการ chmod ไฟล์ในโฟลเดอร์ ของ SMF ที่เราอัพไปด้วยเป็นการกำหนด permission ในการลง
* Hosting Windows ถ้า Host ไหน ติดตั้งไม่ได้ ก้อ ต้องทำ เช่นกัน
โดยจะกำหนดดังนี้

cmod 777 โฟลเดอร์   แล้วก็กดให้ apply all subfolder เพื่อให้มีผลต่อโฟลเดอร์ย่อยภายในด้วยน่ะ
- attachments/
- avatars/
- Packages/
- Smileys/
- Sources/
- Themes/
และก็ไฟล์
- agreement.txt
- Settings.php
- Settings_bak.php

ปล. ห้าม chmod 777 โฟลเดอร์หลักของ บอร์ด SMF เพราะมันจะเออเรอร์เป็น Internal Error เข้าไมได้

6. การสร้าง ฐานข้อมูล เพื่อให้ SMF ใช้ ฐานข้อมูลได้
เข้าไปสร้างฐานข้อมูล โดยส่วนมากจะเป็น mysql ที่ทางโฮสมีไว้  โดยการสร้างจะทำได้หลายอย่าง บางเจ้าจะมี control panel มาให้ 
หรือบางเจ้าก็จะให้เข้าทำใน phpmyadmin ก็สามารถใช้งานได้เหมือนกัน  หรือบางที่ก็สร้างมาให้เลย 1 ฐานข้อมูลแล้วแต่ไป
หลักการเหมือนกันก็คือ  สร้างฐานข้อมูลเปล่าๆ มา 1 ลูก   หากมีแล้วก็ใช้ที่มีก็ได้
โดยใช้ตาม user และ password ตามที่ทางโฮสแจ้งมา

7. install ตัวบอร์ด SMF โดยป้อน url ตามโดเมนที่มี แล้วต่อด้วยชื่อ Folder ของ SMF นั้น
เช่น www.ชื่อเว็บ.com/forum
ก็จะได้หน้าการตามภาพ



ก็ใส่ค่าของระบบที่เรามี

Forum name: = ชื่อ เวปบอร์ดที่เราจะตั้ง
Forum name: = url ผู้ที่จะใช้งานเวปบอร์ดเข้ามา   ( ไม่ต้องเปลี่ยน )
Gzip Output: = ระบบบีบไฟล์ ( ไม่ต้องเปลี่ยน ) ติ๊กไว้
Database Sessions: = session ของระบบฐานข้อมูล ติ๊กไว้
MySQL server name: = ชื่อเครืองเซิร์ฟเวอร์  ส่วนมากทางโฮสก็จะใช้ค่าเดิมคือ loacalhost หรือใส่ไอพี 127.0.0.1
MySQL username: = user name ของฐานข้อมูลที่เราได้สร้างไว้ก่อนหน้านี้  ถ้าไม่รู้ลองใส่ username ของ FTP ดู
MySQL password: = password ของฐานข้อมูลที่เราสร้างไว้
MySQL database name: = ชื่อฐานข้อมูลที่เราสร้างไว้แล้ว
MySQL table prefix: = กำหนดตัวอักษรนำหน้าชื่อตารางในฐานข้อมูล  เปลี่ยนหรือไม่เปลี่ยนก็ได้

8. คลิก proceed

จะมาหน้าส่วนของการสร้างผู้ดูแลระบบ
user = ใส่ username ผู้ที่จะดูแลระบบ
password = รหัสผ่านผู้ดูแลระบบ
re-password = รหัสผ่านผู้ดูแลระบบ ใส่ย้ำอีกที
e-mail = อีเมลล์ของผู้ดูแลระบบ  หากมีเออเรอร์ให้ระบบจะส่ง error ไปให้ทางเมล์นี้
password อีกตัว = เป็นการถามรหัสผ่านของ ฐานข้อมูล  อีกที

9. คลิก proceed

จะมีข้อความยินดี  ลงสำเร็จและกดที่ ฟอรัมติดตั้งใหม่    ก็จะพบหน้าตาเวปบอร์ดครับ
และจะมีข้อความว่า  ไฟล์ install.php ยังไม่ได้ลบ  ให้เราเข้า ftp ไปลบ  หรือ rename ไฟล์นั้นเสีย

10 แค่นี้ก็ได้บอร์ด SMF ไว้ใช้แล้ว

6
เปลี่ยนจาก <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

เป็น <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> ครับ


7
index.php on line 333 ไฟล์ index.php  บรรทัดที่ 333 มันมีปัญหา ครับ ลองดูว่ามันผิดตรงไหน

หรือถ้ามีไฟล์ Backup อยู่ ก็อัพขึ้นไปใหม่ดูนะครับ (เป็นเพราะไปลง Mod อะไรหรือเปล่า)

ไม่พบผลการค้นหาในภาษาที่คุณเลือกไว้สำหรับ Parse error: syntax error, unexpected '/' in /home/redboxco/public_html/index.php on line 333


8
มีคนตอบไว้เยอะเลยครับ ลองหาดูครับ

9
เข้าไปแก้ไขที่ ผู้ดูแล>>>ศูนย์จัดการลงทะเบียน>>>แก้ไขข้อตกลงในการสมัครสมาชิก ครับ

10
รับทำเว็บบอร์ด SMF ราคากันเอง สนใจ Msn มาคุยรายระเอียดได้ที่ [email protected]

เว็บหลักครับ http://www.chaotoob.com
เว็บบอร์ด SMF http://www.chaotoob.com/forum/index.php


11
หากต้องการติดตั้ง smf จะต้องมี server หรือ host ฟรี หรือไปเช่าพื้นที่ host ก่อน
ส่วนใหญ่ host แทบจะทุก host จะรัน PHP และมี MySQL
จากนั้นก็อัพโหลดไฟล์ไปที่ host นั้น แล้วก็รันไฟล์ install.php หรือ setup.php แล้วแต่

หรืออยากติดตั้งที่เครื่องเพื่อทดสอบ ก็ให้ไปโหลด Appserv มาติดตั้ง แล้วก็เอา smf ไปใส่ใน folder appserv/www จากนั้นก็รันไฟล์ install เลย

เข้าไปโหลดตามกระทู้นี้มาใช้ได้เลยครับ ผมจัดให้หมดแล้ว
ดาวน์โหลด SMF 1.1.10 และ SMF 2.0 RC1.2 เวอร์ชั่นล่าสุด(ภาษาไทย)

13
ลองคลิกขวาดูที่รูปนะครับ (คลิกขาวที่รูปแล้วเลือกProperties ดูว่ามันอยู่ตำแหน่งไหน แล้วก็เอารูปไปไว้ตามตำแหน่งที่มันฟ้อง เช่น http://?????????.com/Themes/default/images/bbc/youtube.gif)

ออ...แล้วได้ใช้ธีม default หรือเปล่า ถ้าใช้ธีมไหนก็เอาไปไว้ในธีมนั้นๆนะครับ ใน Folder bbc

14
ก็เข้าได้ตามปกตินะครับ ทั้งเว็บหลัก และ เว็บบอร์ด ไม่มีปัญหาอะไรนี่ครับ ;D

15
ดาวน์โหลดรูปที่แนบให้ไปไว้แล้วหรือยังครับ
Icon "youtube.gif" ไปไว้ใน"./Themes/default/images/bbc ก็เป็นอันเสร็จสิ้น

16
ดาวน์โหลด SMF 1.1.10 และ SMF 2.0 RC1.2 เวอร์ชั่นล่าสุด(ภาษาไทย)พร้อม ดาวน์โหลดTheme
และ Mod Site ต่างๆมากมาย


ตัวติดตั้ง SMF 1.1.10smf_1-1-10_install.zip

ตัวติดตั้ง SMF 2.0-rc1-2smf_2-0-rc1-2_install.zip

ดาวน์โหลดภาษาไทย เวอร์ชั่น 1.1.10

smf_1-1-10_thai-utf8.zip

smf_1-1-10_thai.zip

ดาวน์โหลดภาษาไทย เวอร์ชั่น 2.0-rc1.2_

smf_2-0-rc1-2_thai-utf8.zip

smf_2-0-rc1-2_thai.zip

ดาวน์โหลด Theme
ดาวน์โหลด Theme

ดาวน์โหลด Mod Site
ดาวน์โหลด Mod Site

ท่านสามารถโหลดและติดตั้งได้ตามลิ้งค์ด้านบนนี้ครับ ;D

17
คำตอบคือ โดน Block ครับผม

18
ปัญหาคล้ายๆกันครับ ตามกระทู้นี้ไปเลยครับ
และหลายๆคนตอบไว้เยอะ
ลองอ่านและทำความเข้าใจนะครับ

กระทู้เลขที่9907

19
ก็เหมือนติดตั้ง  Mod ครับผม

เข้าไปโหลดตั้งแต่ 1.1(ตามลิ้งที่ให้อยู่ด้านบน)
SMF 1.1.9 to SMF 1.1.10
SMF 1.1.8 to SMF 1.1.9
SMF 1.1.7 to SMF 1.1.8
SMF 1.1.6 to SMF 1.1.7
SMF 1.1.5 to SMF 1.1.6
เมื่อได้มาครบก็อัพตามที่โหลดมาเลย

แบบนี้

FTP Server  localhost (เปลี่ยนเป็น ip server เช่น xxx.xxx.xxx.xx ของ host นะ

ชือผู้ใช้งานตามปกติ

หรัสผ่าน เหมือนเดิม

พาทของ SMF
ถ้าเป็น /forum (เปลี่ยนเป็น /domains/ชื่อเว็บ.com/public_html/forum แบบนี้)

แล้วก็อัพไปจนถึง SMF 1.1.9 to SMF 1.1.10 เลย

หากยัง งงไม่รู้ว่าจะเข้าไปอัพยังงัย ก็ไปตามนี้

โดยเข้าไปที่เมนู ผู้ดูแล ==> ศูนย์ดำเนินการระบบ ==> ปรับปรุงฟอรั่ม นะครับ


20
เปลี่ยนได้ครับ เข้าไปแก้ไขใน style.css ครับ

ไม่ว่าจะเปลี่ยนสี font เปลี่ยนสี background ปรับเปลี่ยนขนาดตัวหนังสือและอื่นๆ

ตัวอย่างการแก้ไขบางส่วนใน  style.css

/* By default (td, body..) use verdana in black. */
body, td, th , tr
{
   color: #FF0066;
   font-size: small;
                font-family: MS Sans Serif, Tahoma, sans-serif, Bangkok;


เพิ่มเติมและหากต้องการแบ่งสีของสมาชิกก็สามารถทำได้โดยไปโหลด Mod ได้ติดตั้งได้เช่นกัน

Mod Name:Member Color Link

ลองศึกษาดูนะครับ ยังมีอะไรให้เล่นอีกเยอะ (ไม่ว่าจะปรับแต่งอะไรควร Backup ไว้ด้วยทุกครั้ง)

เข้าไปดูตัวอย่างได้ที่ เจ้าตูบดอทคอมครับผม ;D

21
มันอาจจะเกิดจากฐานข้อมูล หรือตารางต่างๆในฐานข้อมูลผิดพลาดครับ (ควรจะ Backup ไว้ด้วยนะครับ)

ลองเข้าไปที่ ผู้ดูแล>>>บำรุงรักษา>>>Routine>>> แล้วจัดการตัวนี้ Find and repair any errors ครับ

อ้างถึง SMF Powered by SMF 2.0 RC1.2 นะครับ

ในส่วนของ SMF Powered by SMF 1.1.10

ก็เข้าไปที่ ผู้ดูแล>>>บำรุงรักษา>>>ค้นหาและแก้ไขข้อผิดพลาดทั้งหมด

ได้ไม่ได้ยังไงก็บอกด้วยก็แล้วกันครับ :)




22
เข้าไปที่ ผู้ดูแล>>>กระทู้และหัวข้อ

แล้วไปตั้งค่าที่ จำนวนอักษรมากที่สุดที่ยินยอมให้ตั้งกระทู้ 0 คือไม่จำกัด ครับ

ลองดูนะครับได้ไม่ได้ยังไงก็บอกด้วยละกันครับ :D

23
SMF Coding Discussion / มาทำ Enhanced Profile Header กัน
« เมื่อ: 10/08/09, 05:51:05 »
มาทำ Enhanced Profile Header แบบ Manual กัน
อ้างถึง
http://custom.simplemachines.org/mods/index.php?mod=1611

เริ่ม File Edits

เปิด ./Themes/default/index.template.php

หา Code นี้
โค้ด: [เลือก]
global $context, $settings, $options, $scripturl, $txt, $modSettings;

Copy Code นี้ไปวางทับที่ให้หา
โค้ด: [เลือก]
global $context, $settings, $options, $scripturl, $txt, $modSettings, $user_info;
หา Code นี้
โค้ด: [เลือก]
if (!empty($context['user']['avatar']))
echo '
<td class="windowbg" valign="middle">', $context['user']['avatar']['image'], '</td>';

echo '
<td colspan="2" width="100%" valign="top" class="windowbg2"><span class="middletext">';

// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '
<a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a> <br />
<a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />';

}
// Otherwise they're a guest - send them a lovely greeting...
else
echo $txt['welcome_guest'];

// Now, onto our second set of info, are they logged in again?
if ($context['user']['is_logged'])
{
// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '
<b>', $txt[616], '</b><br />';

// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '
', $context['unapproved_members'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $txt['approve_member'] : $context['unapproved_members'] . ' ' . $txt['approve_members'], '</a> ', $txt['approve_members_waiting'], '<br />';

// Show the total time logged in?
if (!empty($context['user']['total_time_logged_in']))
{
echo '
', $txt['totalTimeLogged1'];

// If days is just zero, don't bother to show it.
if ($context['user']['total_time_logged_in']['days'] > 0)
echo $context['user']['total_time_logged_in']['days'] . $txt['totalTimeLogged2'];

// Same with hours - only show it if it's above zero.
if ($context['user']['total_time_logged_in']['hours'] > 0)
echo $context['user']['total_time_logged_in']['hours'] . $txt['totalTimeLogged3'];

// But, let's always show minutes - Time wasted here: 0 minutes ;).
echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'], '<br />';
}
echo ' </span>';
}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...

Copy Code นี้ไปวางทับที่ให้หา
โค้ด: [เลือก]
if (!empty($context['user']['avatar']))
echo '
<td class="windowbg" valign="middle"><a href="', $scripturl, '?action=profile">', $context['user']['avatar']['image'], '</a></td>';

echo '
<td colspan="2" width="30%" valign="top" class="windowbg2"><span class="middletext">';

// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{       
echo '
<a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a> <br />
<a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />
<a href="'.$scripturl.'?action=profile;sa=showPosts">'.$txt['own_posts'].'</a><br />';
if ($context['allow_pm'])
        echo'
'.$txt[144].' : <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt[471] : $txt[153], '</a>', $txt['newmessages4'], ' ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'];
    echo'<br />';
if (!empty($user_info['last_login']))
echo '      '.$txt['last_login'].': '.timeformat($user_info['last_login']), '<br />';
}
// Otherwise they're a guest - send them a lovely greeting...
else
echo $txt['welcome_guest'];

// Now, onto our second set of info, are they logged in again?
if ($context['user']['is_logged'])
{
// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '
<b>', $txt[616], '</b><br />';

// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '
', $context['unapproved_members'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $txt['approve_member'] : $context['unapproved_members'] . ' ' . $txt['approve_members'], '</a> ', $txt['approve_members_waiting'], '<br />';

echo'<hr>
<div align="center"><a href="'.$scripturl.'?action=profile">'.$txt['your_profile'].'</a> | <a href="'.$scripturl . '?action=markasread;sa=all;sesc=' . $context['session_id'],'">'.$txt[452].'</a> | <a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a></div>

</span>
<td colspan="2" width="100%" valign="top" class="windowbg2"><span class="middletext">
<b>'.$txt['my_stats'].':</b><br />
&raquo; '.$txt['you_have'].' <b>'.$user_info['posts'].'</b> '.$txt[21].'<br />
&raquo; ';
        // Show the total time logged in?
if (!empty($context['user']['total_time_logged_in']))
{
echo '
', $txt['totalTimeLogged1'];

// If days is just zero, don't bother to show it.
if ($context['user']['total_time_logged_in']['days'] > 0)
echo $context['user']['total_time_logged_in']['days'] . $txt['totalTimeLogged2'];

// Same with hours - only show it if it's above zero.
if ($context['user']['total_time_logged_in']['hours'] > 0)
echo $context['user']['total_time_logged_in']['hours'] . $txt['totalTimeLogged3'];

// But, let's always show minutes - Time wasted here: 0 minutes ;).
echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'], '<br />';
}
echo'
<hr>
<b>', $txt[645], ':</b><br />
&raquo; ', $context['common_stats']['total_posts'], ' ', $txt[95], ' ', $txt['smf88'], ' ', $context['common_stats']['total_topics'], ' ', $txt[64], ' ', $txt[525], ' ', $context['common_stats']['total_members'], ' ', $txt[19], '.<br />
&raquo; ', ($settings['show_latest_member'] ? '' . $txt[201] . ' <b>' . $context['common_stats']['latest_member']['link'] . '</b>' . $txt[581] : '');
echo '</span></td>';
}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...

เปิด ./Themes/default/languages/Modifications.english.php

หา Code นี้
โค้ด: [เลือก]
?>
Copy Code นี้ไปวางก่อนหน้าที่ให้หา
โค้ด: [เลือก]
$txt['my_stats'] = 'My Stats';
$txt['you_have'] = 'You have';
$txt['own_posts'] = 'Show Own Posts';
$txt['last_login'] = 'Last Login';
$txt['your_profile'] = 'Your Profile';

เปิด ./Themes/default/languages/Modifications.thai-utf8.php หรือ Modifications.thai.php
หา Code นี้
โค้ด: [เลือก]
?>
Copy Code นี้ไปวางก่อนหน้าที่ให้หา
โค้ด: [เลือก]
$txt['my_stats'] = 'My Stats';
$txt['you_have'] = 'You have';
$txt['own_posts'] = 'Show Own Posts';
$txt['last_login'] = 'Last Login';
$txt['your_profile'] = 'Your Profile';

เป็นอันเสร็จสิ้นก็จะได้แบบนี้

24
SMF Coding Discussion / มาทำปุ่ม YouTube BBCode กัน
« เมื่อ: 10/08/09, 03:47:41 »
มาทำปุ่ม YouTube BBCode  ติดตั้งแบบ manual
อ้างถึง
http://custom.simplemachines.org/mods/index.php?mod=936

เริ่มกันเลย

File Edits

เปิด ./Sources/Subs.php

หา Code นี้
โค้ด: [เลือก]
array(
'tag' => 'white',
'before' => '<span style="color: white;">',
'after' => '</span>',
),

Copy Code นี้ไปวางไว้หลังที่ให้หา

โค้ด: [เลือก]
array(
'tag' => 'youtube',
'type' => 'unparsed_content',
'validate' => create_function('&$tag, &$data, $disabled', '
// Access globals
global $txt, $context;
// Determine which variable is the link
$link = !is_array($data) ? $data : $data[0] ;
// Remove linebreaks & trim
$link = trim(strtr($link, array(\'<br />\' => \'\')));
// Parse the ID of video or playlist safely
if  (preg_match(\'~^(?:http://((?:www|au|br|ca|es|fr|de|hk|ie|in|il|it|jp|kr|mx|nl|nz|pl|ru|tw|uk)\.)?youtube\.com/(?:[^"]*?)(?:(?:video_)?id=|(?:v|p)(?:/|=)))?([0-9a-f]{16}|[0-9a-z-_]{11})~i\'.($context[\'utf8\'] ? \'u\' : \'\'), $link, $matches))
{
// Localised youtube site?  If not use www.
$site = !empty($matches[1]) ? strtolower($matches[1]) : \'www.\' ;
// Video or Playlist ID?
$type = strlen($matches[2]) == 11 ? 1 : 0 ;
// Set sizes Or Normalise sizes (If sizes are <100 or > 780)
if(!is_array($data) || ($data[1] > 780 || $data[1] < 100 || $data[2] > 780 || $data[2] < 100))
$data = array(0, 425, ($type ? 350 : 355));
// Set ID in the array
$data[0] = $matches[2];
// Tidy up
unset($matches, $link);

// Set the Content (With conditions on disabled types of BBCode)
if (isset($disabled[\'url\']) && isset($disabled[\'youtube\']))
// Youtube & Url bbc disabled? (eg Printer friendly pages)
$tag[\'content\'] = "http://". $site ."youtube.com/". ($type ? "watch?v" : "view_play_list?p") ."=". $data[0];
elseif(isset($disabled[\'youtube\']))
// Only Youtube is disabled, So make an active link
$tag[\'content\'] = "<a href=\"http://". $site ."youtube.com/". ($type ? "watch?v" : "view_play_list?p") ."=". $data[0]."\" target=\"_blank\">http://". $site ."youtube.com/". ($type ? "watch?v" : "view_play_list?p") ."=". $data[0]."</a>";
else
{
// Empty content
$tag[\'content\'] = \'\';

// Build the <object> (Non-Mac IE Only)
if($context[\'browser\'][\'is_ie\'] && !$context[\'browser\'][\'is_mac_ie\'])
$tag[\'content\'] = \'<object width="\'.$data[1].\'px" height="\'.$data[2].\'px">\'
.\'<param name="movie" value="http://www.youtube.com/\'.($type ? "v" : "p").\'/\'.$data[0].\'&amp;rel=1&amp;fs=1" />\'
.\'<param name="wmode" value="transparent" /><param name="allowFullScreen" value="true" />\'
.\'<param name="allowScriptAccess" value="never" />\';
// Build the <embed>
$tag[\'content\'] .= \'<embed src="http://www.youtube.com/\'.($type ? "v" : "p").\'/\'.$data[0].\'&amp;rel=1&amp;fs=1" \'
.\'type="application/x-shockwave-flash" allowFullScreen="true" allowScriptAccess="never" \'
.\'wmode="transparent" width="\'.$data[1].\'px" height="\'.$data[2].\'px">\';
// Build the <noembed>
$tag[\'content\'] .= "<noembed><a href=\"http://". $site ."youtube.com/". ($type ? "watch?v" : "view_play_list?p" ) ."=". $data[0]."\" target=\"_blank\">http://". $site ."youtube.com/". ($type ? "watch?v" : "view_play_list?p") ."=". $data[0]."</a></noembed>";
// Closing <embed>
$tag[\'content\'] .= \'</embed>\';
// Close the <object> (Non-Mac IE Only)
if($context[\'browser\'][\'is_ie\'] && !$context[\'browser\'][\'is_mac_ie\'])
$tag[\'content\'] .= \'</object>\';
}
}
else
// Invalid link
$tag[\'content\'] = $txt[\'youtube_invalid\'];
'),
'disabled_content' => '$1',
            ),

หา Code นี้

โค้ด: [เลือก]
$disabled['email'] = true;
$disabled['flash'] = true;


Copy Code นี้ไปวางไว้หลังที่ให้หา

โค้ด: [เลือก]
// Disable youtube if on 'printer friendly page'
$disabled['youtube'] = true;

เปิด ./Themes/default/Post.template.php

หา Code นี้

โค้ด: [เลือก]
'flash' => array('code' => 'flash',
Copy Code นี้ไปวางก่อนหน้าที่ให้หา

โค้ด: [เลือก]
'youtube' => array('code' => 'youtube', 'before' => '[youtube]', 'after' => '[/youtube]', 'description' => $txt['youtube']),

เปิด ./Themes/default/languages/Modifications.english.php

หา Code นี้

โค้ด: [เลือก]
?>
Copy Code นี้ไปวางก่อนหน้าที่ให้หา

โค้ด: [เลือก]
$txt['youtube'] = 'YouTube';
$txt['youtube_invalid'] = '#Invalid YouTube Link#';

สุดท้ายCopy Icon "youtube.gif" ไปไว้ใน"./Themes/default/images/bbc ก็เป็นอันเสร็จสิ้น

ก็จะได้แบบนี้

25
เข้าไปดูมาแล้ว ก็ใช้ได้แล้วนี่ครับท่าน ;)

26
แบบนี้

FTP Server  localhost (เปลี่ยนเป็น ip server เช่น xxx.xxx.xxx.xx ของ host นะ

ชือผู้ใช้งานตามปกติ

หรัสผ่าน เหมือนเดิม

พาทของ SMF แก้จาก /board (เปลี่ยนเป็น /domains/ชื่อเว็บ.com/public_html/board อะครับ

หรือถ้าเป็น /forum (เปลี่ยนเป็น /domains/ชื่อเว็บ.com/public_html/forum แบบนี้

ลองดูนะ อะคิคิ

27
เข้าไปที่แก้ไขการอนุญาตครับ

ผู้ดูแล>>>แก้ไขการอนุญาต>>>ขั้นสูง>>> แล้วก็เลือกว่าจะให้ทำอะไรบ้าง

28
เริ่มต้นท่านก็สร้าง showtopic.php มาก่อนเลยครับแล้วนำ Code ข้างล่างนี้ไปวาง (บอกก่อน xxxx คือชื่อเว็บของท่านนะครับ อย่าลิมเปลี่ยนด้วยละ)

แล้วส่วนที่ต้องเพิ่มก็คือ <?php ssi_recentPosts(ใส่ตามที่ต้องการว่าจะโชว์กี่กระทู้ 5 หรือ 10 ก็ว่ากันไป); ?>


โค้ด: [เลือก]
<?php require("/home/xxxx/domains/xxxx.com/public_html/forum/SSI.php"); ?>
 <?php require("SSI.php"); ?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Showtopic</title>
<base target="_blank">
<style type="text/css">
<!--
body{
margin-top:0px;
margin-bottom:2px;
background-color: #FFFFFF;
}
body,td{font-size:12px;color:#669900;font-family: MS Sans Serif, Tahoma, sans-serif, Bangkok;}
td.title{font-size:12px;color:#CCCCCC}
a{text-decoration:none}
a:link,a:visited{color:#FF3399;font-weight:normal}
a:hover{color:#99cc00}
a:active{color:#CCCCCC}
a.topmenu:link,a.topmenu:visited{color:#666666}
a.topmenu:hover{color:#FF6600}
a.topmenu:active{color:#555555}
//.style1 {color: #FF9900}

-->
</style>
</head>

<body>
<div align="left">
<font size="2" color="#FF6600">
<?php ssi_welcome(); ?>  <?php ssi_latestMember(); ?>
<br>
<?php ssi_recentPosts(); ?>
<br>
<?php ssi_logOnline(); ?>
</font>
</div>
</body>
</html>

เมื่อสร้าง showtopic.php และเพิ่มจะนวนที่จะโชว์กระทู้เสร็จแล้ว ตัวอย่าง<?php ssi_recentPosts(10); ?>
ก็ส่งขึ้น Host ได้เลย ออส่งไปไว้ใน Folders เดียวกับ Forum ได้เลยครับ หลังจากนั้นนำ Code ข้างล่างนี้ไปวางไว้ในหน้า Index ตามตำแหน่งที่ต้องการแล้วส่งขึ้น Host ตามปกติ

โค้ด: [เลือก]
<iframe name="I1"left border="0" frameborder="0" src="http://www.xxxx.com/forum/showtopic.php" target="_blank" height="289"   width="99%" style="color: #000000; border: 1px solid #FFFFFF; background-color: #FFFFFF"></iframe>เท่านี้ก็ใช้ได้แล้ว (มีปัญหา หรือได้ไม่ได้ช่วยบอกด้วยก็แล้วกันครับ)

29
เปิด index.template.php
แล้วหา
โค้ด: [เลือก]
// Show the "Powered by" and "Valid" logos, as well as the copyright.  Remember, the copyright must be somewhere!

หลังจากนั้นนำ Code ป้ายโฆษณาที่ต้องการไปวางไว้หลังที่ให้หา หากต้องการวางไว้ก่อนหน้าหรือหลังก็ลองๆดูเอานะครับ (อย่าลืม Backup ไว้ก่อนทุกครั้งที่ทำนะครับ)

30
อ๊ะ ก็เข้าได้นะครับ ไม่เห็นเป็นอะไรเลยครับท่าน ???

หน้า: [1] 2 3