Mod ใส่ช่องแนบไฟล์ที่ ตอบด่วน/ตั้งกระทู้ด่วน
Mod ใส่ช่องแนบไฟล์ที่ ตอบด่วน/ตั้งกระทู้ด่วนรุ่นที่รองรับ: Discuz! 6.0
ไฟล์ที่ต้องแก้ไข: viewthread.php, forumdisplay.php, viewthread.htm, forumdisplay.htm, css.htm
ไฟล์แนบชื่อ : Post Fastattach
ตัวอย่าง: http://www.symbianfever.com/forums
SS : ด้านล่างครับ
=========================================================================================================
1. แก้ไขไฟล์ /forumdisplay.php
หา!empty($forum['allowpost']);ใส่โค๊ดนี้ต่อไปข้างล่าง$allowpostattach = !empty($forum['allowpostattach']) || (!$forum['postattachperm'] && $allowpostattach) || ($forum['postattachperm'] && forumperm($forum['postattachperm']));
$attachextensions = $forum['attachextensions'] ? $forum['attachextensions'] : $attachextensions;
$enctype = $allowpostattach ? 'enctype="multipart/form-data"' : '';
$maxattachsize_kb = $maxattachsize / 1000;
$maxprice = isset($extcredits[$creditstrans]) ? $maxprice : 0;2. แก้ไขไฟล์ /viewthread.php
หา$forum['allowpost'];ใส่โค๊ดนี้ต่อไปข้างล่าง$allowpostattach = !empty($forum['allowpostattach']) || (!$forum['postattachperm'] && $allowpostattach) || ($forum['postattachperm'] && forumperm($forum['postattachperm']));
$attachextensions = $forum['attachextensions'] ? $forum['attachextensions'] : $attachextensions;
$enctype = $allowpostattach ? 'enctype="multipart/form-data"' : '';
$maxattachsize_kb = $maxattachsize / 1000;
$maxprice = isset($extcredits[$creditstrans]) ? $maxprice : 0;3.แก้ไขไฟล์ templates/default/css.htm
เพิ่มโค๊ดนี้ไว้ที่บรรทัดสุดท้าย/*----Fast Attach---*/
.fastattach {width:87%; padding: 4px 10px 4px 30px;}
.fastattach td {padding: 3px; border-bottom: 1px solid {COMMONBOXBORDER};}4. แก้ไขไฟล์ templates/default/forumdisplay.htm
หาaction="post.php?action=newthread&fid=$fid&extra=$extra&topicsubmit=yes"ใส่โค๊ดนี้ต่อติดกันไปเลย (หมายเหตุ : ต่อติดกันจากเลย ตัวอย่าง yes"$enctype)$enctypeหา<p class="btns">เพิ่มโค๊ดนี้เพิ่มไปด้านบน<!--{if $allowpostattach}-->
{template post_fastattach}
<!--{/if}-->5. แก้ไขไฟล์ templates/default/viewthread.htm
หาaction="post.php?action=reply&fid=$fid&tid=$tid&extra=$extra&replysubmit=yes"วางโค๊ดนี้ต่อติดกันที่ท้ายเลย$enctypeหา<p class="btns">เพิ่มโค๊ดนี้เพิ่มไปด้านบน<!--{if $allowpostattach}-->
{template post_fastattach}
<!--{/if}-->6. อัพโหลดไฟล์ในโฟล์เดอร์ไฟล์แนบ Post Fastattach.rar ไปไว้ที่ templates/default
7.Update Caches เสร็จแล้วครับ มะกี๋ + ไปแร้วมะให้แล้วนะ ดันลบซะนี่ ~~
เยี่ยมครับ ~~ 555+ มึนนิดหน่อยครับ ดึกๆ เก่งจังฮู้ถ้ัามีเวลาฝากแนบไฟล์จากเซิฟเวอร์ด้วยครับ
เช่นเรามีเซิฟเวอร์อยู่เราอัพไปก่อน แล้วก็นำลิ้งค์ไปแปะไว้เพื่อแนบไฟล์อีกต่อ เซิฟเวอร์ต่อเซิฟเวอร์เร็วกว่าอัพจากเครื่องเรา ซึ่งในวีบีมีซึ่งเรียกว่า upload from url ทำแล้วขอบคุณหลายๆค้า แต่ทำไม Smiles มันตกมาอยู่ข้างล่าวนี้หล่ะคะ?
ตอบกลับโพสของ 5# Buatong
ลองเปลี่ยน สกินใช้ค่ามตราฐานดูครับ ถ้าหายแสดงว่าเป็นที่สกินที่คุณใช้งาน :) ทำไงดี ดันเผลอลบ ไอ้สกินไปตรงForums > Skin > Skin
อ่ะค่ะ แต่ส่วนอื่นไม่ได้ลบเลยค่ะ
ตอบกลับโพสของ 7# Buatong
เวรแท้ๆ ดันไปลบซะนี่เข้าไปที่เดิมนั้นแหละครับแล้วดาวน์โหลดไฟลล์นี้ไป คัดลอก ข้อมูลจากไฟลล์ในนั้นไปวางที่
Import Style - Pasted content below
แล้วกดส่งนะครับ ไม่สำเร็จค่ะ ลองตรวจสอบภาพที่น้องทำให้หน่อยนะคะว่ามันถูกต้องหรือเปล่า
ตอบกลับโพสของ 9# Buatong
ผมโหลดมาดูแล้วนะครับ ไม่มีอะไรผิดปรกติถูกต้องดีครับก็แสดงว่าเป็นที่สกินครับ
ลองจัดการกับสกินที่ใช้งานดูนะครับว่าไฟลล์ไหนที่ไปซ้ำกับสกิน default บ้าง
ถ้ามีให้ทำกับ สกินที่คุณใช้งานด้วย
ถ้าไม่มีก็ไม่ต้องทำมันจะมาใช้งาน default เองครับ
อย่าเพิ่ง งง นะครับลองทำดูก่อนนะ :)