SMF Thailand.

SMF Development => SMF Coding Discussion => ข้อความที่เริ่มโดย: DtTvB the CoderZ ที่ 5/02/06, 20:57:06

หัวข้อ: [Tip] แสดงหัวข้อล่าสุด, ปุ่ม Login/Logout, บุคคลที่กำลัง&
เริ่มหัวข้อโดย: DtTvB the CoderZ ที่ 5/02/06, 20:57:06
ตอนที่ 1
เริ่มแรก ด้านบนสุดของหน้าเว็บของคุณใส่ข้อความนี้ครับ
<?php require_once('./พาทไปที่เว็บบอร์ด/SSI.php'); ?>
อย่างเช่นหน้าเว็บคุณอยู่ที่ example.com และบอร์ดอยู่ที่ example.com/board ก็ใส่ลงไปดังนี้ครับ
<?php require_once('./board/SSI.php'); ?>
แต่ถ้าหน้าเว็บคุณอยู่ที่ example.com/site และบอร์ดอยู่ที่ example.com/board ก็ใส่ลงไปดังนี้ครับ
<?php require_once('./../board/SSI.php'); ?>
Note: การใช้ .. หมายถึง ไปที่โฟลเดอร์ที่อยู่ข้างบนครับ

1. แสดงข้อความต้อนรับ
ตัวอย่าง:
     สวัสดี, DtTvB, คุณมี 0 ข้อความ , 0 ข้อความใหม่.
โค้ด:
    <?php ssi_welcome(); $bb_userdata = ssi_welcome('!'); ?>

2. โพสต์ล่าสุด
ตัวอย่าง:
[Test Area]aaaaaaaaaaaaa โดย DtTvB               
วันนี้ เวลา 02:35:36 pm
[Test Area]aaaaaaaaaaaaaaaaa โดย DtTvB
วันนี้ เวลา 02:35:31 pm
[Test Area]aaaaaaaaaaaaaaaa โดย DtTvB
วันนี้ เวลา 02:35:25 pm
โค้ด:
    <?php ssi_recentPosts(); ?>

2. หัวข้อล่าสุด
ตัวอย่าง:
[Test Area]aaaaaaaaaaaaa โดย DtTvB               
วันนี้ เวลา 02:35:36 pm
[Test Area]aaaaaaaaaaaaaaaaa โดย DtTvB
วันนี้ เวลา 02:35:31 pm
[Test Area]aaaaaaaaaaaaaaaa โดย DtTvB
วันนี้ เวลา 02:35:25 pm
โค้ด:
    <?php ssi_recentTopics(); ?>

4. แสดงรายชื่อบอร์ด
ตัวอย่าง:
บอร์ดหัวข้อกระทู้
Test Area33
โค้ด:
    <?php ssi_topBoards(); ?>

5. แสดงคนที่กำลังออนไลน์
ตัวอย่าง:
    0 บุคคลทั่วไป 1 สมาชิก
    DtTvB
โค้ด:
    <?php ssi_whosOnline(); ?>

6. แสดงปุ่มล๊อกอินล๊อกเอาท์
ตัวอย่าง:
    ออกจากระบบ
โค้ด:
    <?php ssi_login(); ssi_logout(); ?>

7. แสดงรูปประจำตัวของผู้ใช้ปัจจุบัน
โค้ด:
    <?php if ($bb_userdata['is_logged']) { echo $bb_userdata['avatar']['image']; } ?>

8. แสดงชื่อของผู้ใช้ปัจจุบัน
โค้ด:
    <?php echo ($bb_userdata['is_logged']) ? $bb_userdata['name'] : $txt[28]; ?>

อ่าอยากรู้ดูตัวอย่างที่นี่ละกันครับ แถมมีโค้ดเพิ่มเติมด้วยครับ (http://smf.rcweb.net/ssi_examples.php)
หัวข้อ: Best Product Tips
เริ่มหัวข้อโดย: FrankJScott ที่ 12/01/24, 11:47:40
Please try Google (https://www.google.com/) before asking about New Product Info (https://ksacon.com/showthread.php?p=16987&posted=1#post16987) b2aa31e
หัวข้อ: Re: [Tip] แสดงหัวข้อล่าสุด, ปุ่ม Login/Logout, บุคคลที่กำลัง&
เริ่มหัวข้อโดย: Udaipurescort006 ที่ 17/01/24, 14:45:18
  Gondia Escort Service (https://russianmodels1.in/gondia-escort-service)
  Hinganghat Escort Service (https://russianmodels1.in/hinganghat-escort-service)
  Ichalkaranji Escort Service (https://russianmodels1.in/ichalkaranji-escort-service)
  Jalgaon Escort Service (https://russianmodels1.in/jalgaon-escort-service)
  Jalna Escort Service (https://russianmodels1.in/jalna-escort-service)
  Kamptee Escort Service (https://russianmodels1.in/kamptee-escort-service)
  Kolhapur Escort Service (https://russianmodels1.in/kolhapur-escort-service)
  Latur Escort Service (https://russianmodels1.in/latur-escort-service)
  Malegaon Escort Service (https://russianmodels1.in/malegaon-escort-service)
  Miraj Escort Service (https://russianmodels1.in/miraj-escort-service)
  Mumbai Escort Service (https://russianmodels1.in/mumbai-escort-service)
  Nagpur Escort Service (https://russianmodels1.in/nagpur-escort-service)
  Nanded Escort Service (https://russianmodels1.in/nanded-escort-service)
  Nandurbar Escort Service (https://russianmodels1.in/nandurbar-escort-service)
  Nashik Escort Service (https://russianmodels1.in/nashik-escort-service)
  Osmanabad Escort Service (https://russianmodels1.in/osmanabad-escort-service)
  Palghar Escort Service (https://russianmodels1.in/palghar-escort-service)
  Panvel Escort Service (https://russianmodels1.in/panvel-escort-service)
  Parbhani Escort Service (https://russianmodels1.in/parbhani-escort-service)
  Pune Escort Service (https://russianmodels1.in/pune-escort-service)
  Sangli Escort Service (https://russianmodels1.in/sangli-escort-service)
  Satara Escort Service (https://russianmodels1.in/satara-escort-service)
  Solapur Escort Service (https://russianmodels1.in/solapur-escort-service)
  Thane Escort Service (https://russianmodels1.in/thane-escort-service)
  Udgir Escort Service (https://russianmodels1.in/udgir-escort-service)
  Virar Escort Service (https://russianmodels1.in/virar-escort-service)
  Wardha Escort Service (https://russianmodels1.in/wardha-escort-service)
  Yavatmal Escort Service (https://russianmodels1.in/yavatmal-escort-service)
  Alirajpur Escort Service (https://russianmodels1.in/alirajpur-escort-service)
  Anuppur Escort Service (https://russianmodels1.in/anuppur-escort-service)
  Ashoknagar Escort Service (https://russianmodels1.in/ashoknagar-escort-service)
  Balaghat Escort Service (https://russianmodels1.in/balaghat-escort-service)
  Barwani Escort Service (https://russianmodels1.in/barwani-escort-service)
  Betul Escort Service (https://russianmodels1.in/betul-escort-service)
  Bhind Escort Service (https://russianmodels1.in/bhind-escort-service)
  Bhopal Escort Service (https://russianmodels1.in/bhopal-escort-service)
  Burhanpur Escort Service (https://russianmodels1.in/burhanpur-escort-service)
  Chhattarpur Escort Service (https://russianmodels1.in/chhattarpur-escort-service)
  Chhindwara Escort Service (https://russianmodels1.in/chhindwara-escort-service)
  Datia Escort Service (https://russianmodels1.in/datia-escort-service)
  Dewas Escort Service (https://russianmodels1.in/dewas-escort-service)
  Dhar Escort Service (https://russianmodels1.in/dhar-escort-service)
  Dindori Escort Service (https://russianmodels1.in/dindori-escort-service)
  East Nimar Escort Service (https://russianmodels1.in/east-nimar-escort-service)
  Guna Escort Service (https://russianmodels1.in/guna-escort-service)
  Gwalior Escort Service (https://russianmodels1.in/gwalior-escort-service)
  Harda Escort Service (https://russianmodels1.in/harda-escort-service)
  Hoshangabad Escort Service (https://russianmodels1.in/hoshangabad-escort-service)
  Indore Escort Service (https://russianmodels1.in/indore-escort-service)
  Jabalpur Escort Service (https://russianmodels1.in/jabalpur-escort-service)
  Jhabua Escort Service (https://russianmodels1.in/jhabua-escort-service)
  Katni Escort Service (https://russianmodels1.in/katni-escort-service)
  Mandla Escort Service (https://russianmodels1.in/mandla-escort-service)
  Mandsaur Escort Service (https://russianmodels1.in/mandsaur-escort-service)
  Morena Escort Service (https://russianmodels1.in/morena-escort-service)
  Narsinghpur Escort Service (https://russianmodels1.in/narsinghpur-escort-service)
  Neemuch Escort Service (https://russianmodels1.in/neemuch-escort-service)
  Panna Escort Service (https://russianmodels1.in/panna-escort-service)
  Raisen Escort Service (https://russianmodels1.in/raisen-escort-service)
  Rajgarh Escort Service (https://russianmodels1.in/rajgarh-escort-service)
  Ratlam Escort Service (https://russianmodels1.in/ratlam-escort-service)
  Rewa Escort Service (https://russianmodels1.in/rewa-escort-service)
  Sagar Escort Service (https://russianmodels1.in/sagar-escort-service)
  Satna Escort Service (https://russianmodels1.in/satna-escort-service)
  Sehore Escort Service (https://russianmodels1.in/sehore-escort-service)
  Seoni Escort Service (https://russianmodels1.in/seoni-escort-service)
  Shahdol Escort Service (https://russianmodels1.in/shahdol-escort-service)
  Shajapur Escort Service (https://russianmodels1.in/shajapur-escort-service)
  Sheopur Escort Service (https://russianmodels1.in/sheopur-escort-service)
  Shivpuri Escort Service (https://russianmodels1.in/shivpuri-escort-service)
  Sidhi Escort Service (https://russianmodels1.in/sidhi-escort-service)
  Singrauli Escort Service (https://russianmodels1.in/singrauli-escort-service)
  Tikamgarh Escort Service (https://russianmodels1.in/tikamgarh-escort-service)
  Ujjain Escort Service (https://russianmodels1.in/ujjain-escort-service)
  Umaria Escort Service (https://russianmodels1.in/umaria-escort-service)
  Vidisha Escort Service (https://russianmodels1.in/vidisha-escort-service)
  West Nimar Escort Service (https://russianmodels1.in/west-nimar-escort-service)
  Abohar Escort Service (https://russianmodels1.in/abohar-escort-service)
  Amritsar Escort Service (https://russianmodels1.in/amritsar-escort-service)
  Barnala Escort Service (https://russianmodels1.in/barnala-escort-service)
  Batala Escort Service (https://russianmodels1.in/batala-escort-service)
  Bathinda Escort Service (https://russianmodels1.in/bathinda-escort-service)
  Fazilka Escort Service (https://russianmodels1.in/fazilka-escort-service)
  Firozpur Escort Service (https://russianmodels1.in/firozpur-escort-service)
  Gurdaspur Escort Service (https://russianmodels1.in/gurdaspur-escort-service)
  Hoshiarpur Escort Service (https://russianmodels1.in/hoshiarpur-escort-service)
  Jalandhar Escort Service (https://russianmodels1.in/jalandhar-escort-service)
  Kapurthala Escort Service (https://russianmodels1.in/kapurthala-escort-service)
  Khanna Escort Service (https://russianmodels1.in/khanna-escort-service)
  Ludhiana Escort Service (https://russianmodels1.in/ludhiana-escort-service)
  Malerkotla Escort Service (https://russianmodels1.in/malerkotla-escort-service)
  Moga Escort Service (https://russianmodels1.in/moga-escort-service)
  Mohali Escort Service (https://russianmodels1.in/mohali-escort-service)
  Muktasar Escort Service (https://russianmodels1.in/muktasar-escort-service)
  Pathankot Escort Service (https://russianmodels1.in/pathankot-escort-service)
  Patiala Escort Service (https://russianmodels1.in/patiala-escort-service)
  Phagwara Escort Service (https://russianmodels1.in/phagwara-escort-service)
  Rajpura Escort Service (https://russianmodels1.in/rajpura-escort-service)
  Sangrur Escort Service (https://russianmodels1.in/sangrur-escort-service)
  Sunam Escort Service (https://russianmodels1.in/sunam-escort-service)
  Agra Escort Service (https://russianmodels1.in/agra-escort-service)
  Mainpuri Escort Service (https://russianmodels1.in/mainpuri-escort-service)
  Mathura Escort Service (https://russianmodels1.in/mathura-escort-service)
  Aligharh Escort Service (https://russianmodels1.in/aligharh-escort-service)
  Etah Escort Service (https://russianmodels1.in/etah-escort-service)
  Allahabad Escort Service (https://russianmodels1.in/allahabad-escort-service)
  Fatehpur Escort Service (https://russianmodels1.in/fatehpur-escort-service)
  Kaushambi Escort Service (https://russianmodels1.in/kaushambi-escort-service)
  Pratapgarh Up Escort Service (https://russianmodels1.in/pratapgarh-up-escort-service)
  Ambedkar Nagar Escort Service (https://russianmodels1.in/ambedkar-nagar-escort-service)
  Amethi Escort Service (https://russianmodels1.in/amethi-escort-service)
  Amroha Escort Service (https://russianmodels1.in/amroha-escort-service)
  Auraiya Escort Service (https://russianmodels1.in/auraiya-escort-service)
  Bagpat Escort Service (https://russianmodels1.in/bagpat-escort-service)
  Bahraich Escort Service (https://russianmodels1.in/bahraich-escort-service)
  Balarampur Escort Service (https://russianmodels1.in/balarampur-escort-service)
  Ballia Escort Service (https://russianmodels1.in/ballia-escort-service)
  Banda Escort Service (https://russianmodels1.in/banda-escort-service)
  Barabanki Escort Service (https://russianmodels1.in/barabanki-escort-service)
  Bareilly Escort Service (https://russianmodels1.in/bareilly-escort-service)
  Basti Escort Service (https://russianmodels1.in/basti-escort-service)
  Bhadohi Escort Service (https://russianmodels1.in/bhadohi-escort-service)
  Bijnor Escort Service (https://russianmodels1.in/bijnor-escort-service)
  Budaun Escort Service (https://russianmodels1.in/budaun-escort-service)
  Bulandshahar Escort Service (https://russianmodels1.in/bulandshahar-escort-service)
  Chandauli Escort Service (https://russianmodels1.in/chandauli-escort-service)
  Chitrakoot Escort Service (https://russianmodels1.in/chitrakoot-escort-service)
  Deoria Escort Service (https://russianmodels1.in/deoria-escort-service)
  Devipatan Escort Service (https://russianmodels1.in/devipatan-escort-service)
  Etawah Escort Service (https://russianmodels1.in/etawah-escort-service)
  Faizabad Escort Service (https://russianmodels1.in/faizabad-escort-service)
  Farrukhabad Escort Service (https://russianmodels1.in/farrukhabad-escort-service)
  Firozabad Escort Service (https://russianmodels1.in/firozabad-escort-service)
  Gautam Buddha Nagar Escort Service (https://russianmodels1.in/gautam-buddha-nagar-escort-service)
  Ghaziabad Escort Service (https://russianmodels1.in/ghaziabad-escort-service)
  Ghazipur Escort Service (https://russianmodels1.in/ghazipur-escort-service)
  Gonda Escort Service (https://russianmodels1.in/gonda-escort-service)
  Varanasi Escort Service (https://russianmodels1.in/varanasi-escort-service)
  Unnao Escort Service (https://russianmodels1.in/unnao-escort-service)
  Sultanpur Escort Service (https://russianmodels1.in/sultanpur-escort-service)
  Sonbhadra Escort Service (https://russianmodels1.in/sonbhadra-escort-service)
  Sitapur Escort Service (https://russianmodels1.in/sitapur-escort-service)
  Siddharthnagar Escort Service (https://russianmodels1.in/siddharthnagar-escort-service)
  Shravasti Escort Service (https://russianmodels1.in/shravasti-escort-service)
  Shamli Escort Service (https://russianmodels1.in/shamli-escort-service)
  Shahjahanpur Escort Service (https://russianmodels1.in/shahjahanpur-escort-service)
  Sant Kabir Nagar Escort Service (https://russianmodels1.in/sant-kabir-nagar-escort-service)
  Sambhal Escort Service (https://russianmodels1.in/sambhal-escort-service)
  Saharanpur Escort Service (https://russianmodels1.in/saharanpur-escort-service)
  Rampur Escort Service (https://russianmodels1.in/rampur-escort-service)
  Raebareli Escort Service (https://russianmodels1.in/raebareli-escort-service)
  Pilibhit Escort Service (https://russianmodels1.in/pilibhit-escort-service)
  Muzaffarnagar Escort Service (https://russianmodels1.in/muzaffarnagar-escort-service)
  Muradabad Escort Service (https://russianmodels1.in/muradabad-escort-service)
  Mirzapur Escort Service (https://russianmodels1.in/mirzapur-escort-service)
  Meerut Escort Service (https://russianmodels1.in/meerut-escort-service)
  Mau Escort Service (https://russianmodels1.in/mau-escort-service)
  Mahoba Escort Service (https://russianmodels1.in/mahoba-escort-service)
  Maharajganj Escort Service (https://russianmodels1.in/maharajganj-escort-service)
  Lucknow Escort Service (https://russianmodels1.in/lucknow-escort-service)
  Lalitpur Escort Service (https://russianmodels1.in/lalitpur-escort-service)
  Lakhimpur Escort Service (https://russianmodels1.in/lakhimpur-escort-service)
  Kushinagar Escort Service (https://russianmodels1.in/kushinagar-escort-service)
  Kasganj Escort Service (https://russianmodels1.in/kasganj-escort-service)
  Kanpur Escort Service (https://russianmodels1.in/kanpur-escort-service)
  Kannauj Escort Service (https://russianmodels1.in/kannauj-escort-service)
  Jhansi Escort Service (https://russianmodels1.in/jhansi-escort-service)
  Jaunpur Escort Service (https://russianmodels1.in/jaunpur-escort-service)
  Jalaun Escort Service (https://russianmodels1.in/jalaun-escort-service)
  Hathras Escort Service (https://russianmodels1.in/hathras-escort-service)
  Hardoi Escort Service (https://russianmodels1.in/hardoi-escort-service)
  Hapur Escort Service (https://russianmodels1.in/hapur-escort-service)
  Gorakhpur Escort Service (https://russianmodels1.in/gorakhpur-escort-service)
  Dadra And Nagar Haveli Escort Service (https://russianmodels1.in/dadra-and-nagar-haveli-escort-service)

   Haryana Escort Service (https://russianmodels1.in/haryana-escort-service)
   Bihar Escort Service (https://russianmodels1.in/bihar-escort-service)
   Chhattishgarh Escort Service (https://russianmodels1.in/chhattishgarh-escort-service)
   Jammu And Kashmir Escort Service (https://russianmodels1.in/jammu-and-kashmir-escort-service)
   Maharashtra Escort Service (https://russianmodels1.in/maharashtra-escort-service)
   Madhya Pradesh Escort Service (https://russianmodels1.in/madhya-pradesh-escort-service)
   Punjab Escort Service (https://russianmodels1.in/punjab-escort-service)
   Uttar Pradesh Escort Service (https://russianmodels1.in/uttar-pradesh-escort-service)
   Union Territories Escort Service (https://russianmodels1.in/union-territories-escort-service)
   Gujarat Escort Service (https://russianmodels1.in/gujrat-escort-service)
   Hill Stations Escort Service (https://russianmodels1.in/hill-stations-escort-service)
   Andhra Pradesh Escort Service (https://russianmodels1.in/andhra-pradesh-escort-service)
   Arunachal Pradesh Escort Service (https://russianmodels1.in/arunachal-pradesh-escort-service)
   Assam Escort Service (https://russianmodels1.in/assam-escort-service)
   Goa Escort Service (https://russianmodels1.in/goa-escort-service)
   Himachal Pradesh Escort Service (https://russianmodels1.in/himachal-pradesh-escort-service)
   Jharkhand Escort Service (https://russianmodels1.in/jharkhand-escort-service)
   Karnataka Escort Service (https://russianmodels1.in/karnataka-escort-service)
   Kerala Escort Service (https://russianmodels1.in/kerala-escort-service)
   Manipur Escort Service (https://russianmodels1.in/manipur-escort-service)
   Meghalaya Escort Service (https://russianmodels1.in/meghalaya-escort-service)
   Mizoram Escort Service (https://russianmodels1.in/mizoram-escort-service)
   Nagaland  Escort Service (https://russianmodels1.in/nagaland-escort-service)
   Odisha Escort Service (https://russianmodels1.in/odisha-escort-service)
   Sikkim Escort Service (https://russianmodels1.in/sikkim-escort-service)
   Tamilnadu Escort Service (https://russianmodels1.in/tamilnadu-escort-service)
   Telangana Escort Service (https://russianmodels1.in/telangana-escort-service)
   Tripura Escort Service (https://russianmodels1.in/tripura-escort-service)
   Uttarakhand Escort Service (https://russianmodels1.in/uttarakhand-escort-service)
   West Bengal Escort Service (https://russianmodels1.in/west-bengal-escort-service)