Discuz Thai

 ลืมรหัสผ่าน
 สมัครสมาชิก

ข้อตกลงการใช้งานกระดานข่าวดิสคัสไทย DiscuzThai Agreement (English Version) ประกาศดิสคัสไทย - ทำเนียบดิสคัสภาษาไทย

Discuz! X3.5 Thai R20231001 Rev.8 (NEW) [วิดีโอช่วยสอน] อัปเกรด Discuz! X3.4 เป็น X3.5 Discord ของ Discuz! Thai Community อย่างเป็นทางการ

Discuz! X3.4 Thai R20220811 (REV.75) สิ้นสุดการสนับสนุน Discuz! X3.4 ภาษาไทยตั้งแต่วันนี้เป็นต้นไป (ขอแนะนำให้อัปเกรดเป็น X3.5 แทน)

ค้นหา
แท็กยอดนิยม: ดิสคัสภาษาไทย Discuz Thai
ดู: 1704|ตอบกลับ: 1

ดึงกระทู้แต่ละหมวดได้อย่างไรครับ

[คัดลอกลิงก์]
sutouch โพสต์ 2009-12-24 15:28:53 |โหมดอ่าน
แก้ไขล่าสุดโดย sutouch เมื่อ 2009-12-24 15:54

แก้ไขล่าสุดโดย sutouch เมื่อ 2009-12-24 15:31

แก้ไขล่าสุดโดย sutouch เมื่อ 2009-12-24 15:31

ยกตัวอย่างเช่น ผมจะดึงหมด Discuz! 7.2 Talk  หรือหมวด Discuz7.2 Skins  จะต้องเขียน Code ยังไงครับ วานท่านผู้เก่งช่วยตอบให้กระจ่างที โง่มานานละ JS ทำก็ไม่ได้

ขอขอบพระคุณผู้ที่มาตอบมากครับ
MinT โพสต์ 2009-12-24 16:30:28
ตอบกลับ 1# sutouch

ไฟล์  index.php  ยกเอามาเฉพาะบางส่วน
ผมเคยลองย้ายเฉพาะโค๊ดตัวนี้ไปใช้กับตัวอื่นก็ใช้ได้นะครับ
เขาเขียนแบบนี้นะครับ

    //豪翌彶摩陔泂
$hack_cut_str = 30; //梓枙趼杅
$hack_cut_strauthor = 9;
$new_huacaopost_threadlist = array();
$nthread = array();
$query = $db->query("SELECT t.*, f.name FROM {$tablepre}threads t, {$tablepre}forums f WHERE t.fid<>'$fid' AND f.fid=t.fid AND f.fid   in (118) AND t.displayorder not in (-1,-2) ORDER BY t.dateline DESC LIMIT 0, 2");
while($nthread = $db->fetch_array($query)) {
        $nthread['forumname'] = ereg_replace('<[^>]*>','',$nthread['name']);
        $nthread['view_subject'] = cutstr($nthread['subject'],$hack_cut_str);
        $nthread['view_author'] = cutstr($nthread['author'],$hack_cut_strauthor);
        $nthread['date']= gmdate("$dateformat $timeformat", $nthread['dateline'] + $timeoffset * 3600);
        $nthread['lastreplytime']= gmdate("$dateformat $timeformat", $nthread[lastpost] + ($timeoffset * 3600));
        if($nthread['highlight']) {
                $string = sprintf('%02d', $nthread['highlight']);
                $stylestr = sprintf('%03b', $string[0]);
                $nthread['highlight'] = 'style="';
                $nthread['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
                $nthread['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
                $nthread['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
                $nthread['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
                $nthread['highlight'] .= '"';
        } else {
                $nthread['highlight'] = '';
        }
        $new_huacaopost_threadlist[] = $nthread;
}
//俇救//
คำสั่งเรียกหมวดกระทู้
  1. in (118)
คัดลอกไปที่คลิปบอร์ด
ส่วนไฟล์  htm  ใน  tamlates/default/
คำสั่งให้แสดงในเว็บเพจ หรือ home  ที่เราเขียนไว้

  1. <!--{loop $new_huacaopost_threadlist $d1qqtr}-->
  2. <DD><A href="viewthread.php?tid=$d1qqtr[tid]" title='หัวล่าสุด {LF}กระดานข่าว : $d1qqtr[forumname]{LF}หัวข้อเรื่อง: $d1qqtr[subject] {LF}ผู้โพส: $d1qqtr[author]{LF}โพสเมื่อ: $d1qqtr[date]{LF}ดูแล้ว: $d1qqtr[views] คน {LF}ตอบแล้ว: $d1qqtr[replies] คน{LF} ตอบล่าสุด: $d1qqtr[lastreplytime]' target="_blank" $d1qqtr['highlight']>$d1qqtr[view_subject]</A></DD>
  3. <!--{/loop}--></DL>
คัดลอกไปที่คลิปบอร์ด
-----------------------
ผมแนะนำให้ไปศึกษา  เกี่ยวกับการเขียน โฮม ของ  home ต่าง ๆๆ ที่เขามีแจกน่าจะเป็นประโยชน์มากกว่า
ขออภัย! คุณไม่ได้รับสิทธิ์ในการดำเนินการในส่วนนี้ กรุณาเลือกอย่างใดอย่างหนึ่ง ลงชื่อเข้าใช้ | สมัครสมาชิก

รายละเอียดเครดิต

รายชื่อผู้กระทำผิด|Archiver|ดิสคัส ไทย Follow us: Become a fan on facebook. Follow us on Twitter.

GMT+7, 2024-5-16 20:05

Powered by Discuz! X3.4, Rev.66

Copyright © 2001-2021 Tencent Cloud. Licensed

ตอบกระทู้ ขึ้นไปด้านบน ไปที่หน้ารายการกระทู้