<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
><channel><title>รวมวิธีการใช้ Wordpress, Joomla, Drupal, Magento และ SEO &#187; Drupal</title> <atom:link href="http://killthewhat.com/%20/drupal-tutorials/feed/" rel="self" type="application/rss+xml" /><link>http://killthewhat.com</link> <description>Knowledge Base by howhost.com</description> <lastBuildDate>Fri, 24 Dec 2010 15:00:17 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.0.3</generator> <item><title>แก้ไขจำนวน Recent blog posts ใน drupal 6</title><link>http://killthewhat.com/drupal-tutorials/%e0%b9%81%e0%b8%81%e0%b9%89%e0%b9%84%e0%b8%82%e0%b8%88%e0%b8%b3%e0%b8%99%e0%b8%a7%e0%b8%99-recent-blog-posts-%e0%b9%83%e0%b8%99-drupal-6/</link> <comments>http://killthewhat.com/drupal-tutorials/%e0%b9%81%e0%b8%81%e0%b9%89%e0%b9%84%e0%b8%82%e0%b8%88%e0%b8%b3%e0%b8%99%e0%b8%a7%e0%b8%99-recent-blog-posts-%e0%b9%83%e0%b8%99-drupal-6/#comments</comments> <pubDate>Tue, 21 Dec 2010 13:43:39 +0000</pubDate> <dc:creator>snappy</dc:creator> <category><![CDATA[Drupal]]></category> <category><![CDATA[blog]]></category> <category><![CDATA[recent post]]></category> <category><![CDATA[tips]]></category><guid
isPermaLink="false">http://killthewhat.com/?p=6447</guid> <description><![CDATA[Recent blog posts ของ drupal 6 จะเป็น block ที่แสดงเนื้อหาในส่วนของ content type ที่เป็น blog ออกมาซึ่งโดยปกติแล้วถ้าใคร enable module blog ไว้ก็จะมีในส่วนนี้มาให้ใช้งานเลยครับ แต่ปัญหามันอยู่ที่ว่ามันจะแสดงออกมา 10 หัวข้อซึ่งเราไม่สามารถปรับแต่งให้มันแสดงน้อยกว่า หรือมากกว่านี้ได้เลย ถ้าเราจะแก้ไขจำนวนที่มันแสดงออกมาให้เราไปแก้ไขที่ไฟล์ modules/blog/blog.module หาโค็ดประมาณนี้ function blog_block($op = 'list', $delta = 0) { ... $result = db_query_range(db_rewrite_sql(&#34;SELECT n.nid, n.title, n.created FROM {node} n WHERE n.type = 'blog' AND n.status = 1 ORDER BY n.created DESC&#34;), [...]]]></description> <content:encoded><![CDATA[<p>Recent blog posts ของ drupal 6 จะเป็น block ที่แสดงเนื้อหาในส่วนของ content type ที่เป็น blog ออกมาซึ่งโดยปกติแล้วถ้าใคร enable module blog ไว้ก็จะมีในส่วนนี้มาให้ใช้งานเลยครับ แต่ปัญหามันอยู่ที่ว่ามันจะแสดงออกมา 10 หัวข้อซึ่งเราไม่สามารถปรับแต่งให้มันแสดงน้อยกว่า หรือมากกว่านี้ได้เลย<br
/> <span
id="more-6447"></span><br
/> ถ้าเราจะแก้ไขจำนวนที่มันแสดงออกมาให้เราไปแก้ไขที่ไฟล์ modules/blog/blog.module หาโค็ดประมาณนี้</p><pre class="brush: php; title: ;">
function blog_block($op = 'list', $delta = 0) {
...
$result = db_query_range(db_rewrite_sql(&quot;SELECT n.nid, n.title, n.created FROM {node} n WHERE n.type = 'blog' AND n.status = 1 ORDER BY n.created DESC&quot;), 0, 10);
.... }
}
}
}
</pre><p>ให้เราแก้ไข ORDER BY n.created DESC&#8221;), 0, 10); โดยเปลี่ยนเลข 10 เป็นเลขอื่นที่เราต้องการให้มันแสดงโชว์ออกมาครับ</p><p>thank : http://www.ubuntu4life.com/How-to-Modify-the-drupal-Recent-blog-posts-itmes</p> ]]></content:encoded> <wfw:commentRss>http://killthewhat.com/drupal-tutorials/%e0%b9%81%e0%b8%81%e0%b9%89%e0%b9%84%e0%b8%82%e0%b8%88%e0%b8%b3%e0%b8%99%e0%b8%a7%e0%b8%99-recent-blog-posts-%e0%b9%83%e0%b8%99-drupal-6/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>การเขียน module ให้ drupal ตอนที่ 1</title><link>http://killthewhat.com/drupal-tutorials/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b9%80%e0%b8%82%e0%b8%b5%e0%b8%a2%e0%b8%99-module-%e0%b9%83%e0%b8%ab%e0%b9%89-drupal-%e0%b8%95%e0%b8%ad%e0%b8%99%e0%b8%97%e0%b8%b5%e0%b9%88-1/</link> <comments>http://killthewhat.com/drupal-tutorials/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b9%80%e0%b8%82%e0%b8%b5%e0%b8%a2%e0%b8%99-module-%e0%b9%83%e0%b8%ab%e0%b9%89-drupal-%e0%b8%95%e0%b8%ad%e0%b8%99%e0%b8%97%e0%b8%b5%e0%b9%88-1/#comments</comments> <pubDate>Wed, 21 Jul 2010 05:39:10 +0000</pubDate> <dc:creator>aofiee</dc:creator> <category><![CDATA[Drupal]]></category> <category><![CDATA[module]]></category> <category><![CDATA[php]]></category><guid
isPermaLink="false">http://killthewhat.com/?p=6166</guid> <description><![CDATA[ก่อนอื่นก็ขอออกตัวไว้ก่อนเลยว่า ผมก็ไม่ใช่คนเก่งมาจากไหน และไม่ได้เรียนมาทางด้าน โปรแกรมมิ่ง อาจจะใช้ศัพท์แปลกๆไปบ้าง เพราะใช้วิธีการศึกษาเอาเอง และลองผิดลองถูกเอาเรื่อยๆมา ^_^ วันนี้ก็จะมาเริ่มกันตรงที่ ถ้าเราต้องการสร้าง module ขึ้นมาใช้งานเอง ใน drupal  ควรจะเริ่มจากตรงไหน โดยปรกติแล้วการสร้าง module ใน drupal จะมีไฟล์หลักๆอยู่ไม่กี่ชนิด ไฟล์ .info ไฟล์ .module ไฟล์ .tpl.php ไฟล์ .install เพียงแค่เรามี ไฟล์ .info , .module  เราก็สามารถที่จะสร้าง module ง่ายๆขึ้นมาใช้งานได้แล้วครับ เราจะมาดูโครงสร้างภายในไฟล์ .info กันว่าประกอปไปด้วยอะไรบ้าง? ; $Id$ name = &#34;ชื่อ module ที่จะถูกแสดงในหน้าจัดการ module&#34; description = &#34;คำอธิบาย module ว่ามันทำงานยังไง&#34; core = 6.x [...]]]></description> <content:encoded><![CDATA[<p>ก่อนอื่นก็ขอออกตัวไว้ก่อนเลยว่า ผมก็ไม่ใช่คนเก่งมาจากไหน และไม่ได้เรียนมาทางด้าน โปรแกรมมิ่ง อาจจะใช้ศัพท์แปลกๆไปบ้าง เพราะใช้วิธีการศึกษาเอาเอง และลองผิดลองถูกเอาเรื่อยๆมา ^_^</p><p>วันนี้ก็จะมาเริ่มกันตรงที่ ถ้าเราต้องการสร้าง module ขึ้นมาใช้งานเอง ใน drupal  ควรจะเริ่มจากตรงไหน</p><p>โดยปรกติแล้วการสร้าง module ใน drupal จะมีไฟล์หลักๆอยู่ไม่กี่ชนิด</p><ul><li>ไฟล์ .info</li><li>ไฟล์ .module</li><li>ไฟล์ .tpl.php</li><li>ไฟล์ .install</li></ul><p>เพียงแค่เรามี ไฟล์ .info , .module  เราก็สามารถที่จะสร้าง module ง่ายๆขึ้นมาใช้งานได้แล้วครับ</p><p>เราจะมาดูโครงสร้างภายในไฟล์ .info กันว่าประกอปไปด้วยอะไรบ้าง?</p><div
id="_mcePaste"><pre class="brush: php; title: ;">
; $Id$
name = &quot;ชื่อ module ที่จะถูกแสดงในหน้าจัดการ module&quot;
description = &quot;คำอธิบาย module ว่ามันทำงานยังไง&quot;
core = 6.x //ใช้กำหนดว่า module นี้ ใช้ได้กับ drupal version ไหนบ้าง
php = 5.x //ใช้กำหนดว่า module นี้ สามารถ run ได้กับ php version ไหน
package = APP KillThewhat.com //เป็นการสร้าง group ของ module ที่เราเขียนว่าอยู่ในหมวดหมู่ไหน
dependencies[] = &quot;ชื่อ module ที่ require&quot; //บรรทัดนี้จะมีไม่มีก็ได้ครับ เพราะเป็นการบอกว่าก่อนการติดตั้ง module นี้ ต้องมีการ ติดตั้งใช้งาน module ไหนก่อน
</pre></div><div>เอาล่ะเรามาลองสร้าง module สักตัวง่ายๆกันก่อนครับ โดยเราจะตั้งชื่อว่า first_module</div><div>ให้เราไปสร้าง folder &#8220;first_module&#8221; ไว้ที่ sites&gt;all&gt;modules</div><div><a
rel="attachment wp-att-6173" href="http://killthewhat.com/drupal-tutorials/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b9%80%e0%b8%82%e0%b8%b5%e0%b8%a2%e0%b8%99-module-%e0%b9%83%e0%b8%ab%e0%b9%89-drupal-%e0%b8%95%e0%b8%ad%e0%b8%99%e0%b8%97%e0%b8%b5%e0%b9%88-1/attachment/screen-shot-2010-07-21-at-12-23-56-pm/"><img
class="alignnone size-full wp-image-6173" title="Screen shot 2010-07-21 at 12.23.56 PM" src="http://killthewhat.com/wp-content/uploads/2010/07/Screen-shot-2010-07-21-at-12.23.56-PM.png" alt="" width="224" height="117" /></a></div><div>หลังจากนั้นให้เราสร้างไฟล์ .info และ .module โดยให้ทั้งสองไฟล์นั้นมีชื่อเดียวกับชื่อ folder ครับ เราจะด้ไฟล์</div><div>&#8220;first_module.info&#8221; และ &#8220;first_module.module&#8221; มาสองตัว</div><div>เรามาดูกันว่าภายใน file &#8220;first_module.info&#8221; เราจะกำหนดค่าอะไรลงไปกันบ้างสำหรับ module ตัวแรกของเรานี้!</div><div><pre class="brush: php; title: ;">
; $Id$
name = &quot;First Module&quot;
description = &quot;First Module From Killthewhat.com&quot;
core = 6.x
php = 5.x
package = APP Killthewhat.com
</pre></div><div>โดยให้ใน file &#8220;first_module.module&#8221; ยังคงเป็นไฟล์ว่างๆ เอาไว้หลังจากนั้นให้เรา save ทั้งสอง ไฟล์ แล้วเปิด browser ขึ้นมาครับ</div><div>แล้วเข้าไปที่เมนู Home &gt; Administrator &gt; Site building &gt; Modules  เราก็จะพบว่ามีรายชื่อ module ตัวใหม่เพิ่มเข้ามาในระบบของเรา ชื่อว่า First Module ดังรูปข้างล่าง</div><div><a
rel="attachment wp-att-6174" href="http://killthewhat.com/drupal-tutorials/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b9%80%e0%b8%82%e0%b8%b5%e0%b8%a2%e0%b8%99-module-%e0%b9%83%e0%b8%ab%e0%b9%89-drupal-%e0%b8%95%e0%b8%ad%e0%b8%99%e0%b8%97%e0%b8%b5%e0%b9%88-1/attachment/screen-shot-2010-07-21-at-12-34-25-pm/"><img
class="alignnone size-full wp-image-6174" title="Screen shot 2010-07-21 at 12.34.25 PM" src="http://killthewhat.com/wp-content/uploads/2010/07/Screen-shot-2010-07-21-at-12.34.25-PM.png" alt="" width="550" height="92" /></a></div><div>เพียงเท่านนี้เราก็เริ่มที่จะสร้าง module ต่างๆขึ้นใช้เองได้แล้วนะครับ</div><div>ตอนหน้า ผมจะมาสอนการเขียน function การทำงานของ block เพิ่มในโมดูล นี้อีกทีครับ วันนี้ขอหนีไปทำงานต่อก่อนครับ</div> ]]></content:encoded> <wfw:commentRss>http://killthewhat.com/drupal-tutorials/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b9%80%e0%b8%82%e0%b8%b5%e0%b8%a2%e0%b8%99-module-%e0%b9%83%e0%b8%ab%e0%b9%89-drupal-%e0%b8%95%e0%b8%ad%e0%b8%99%e0%b8%97%e0%b8%b5%e0%b9%88-1/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>แสดง comment ออกมาเลยในเนื้อหาของ drupal</title><link>http://killthewhat.com/drupal-tutorials/%e0%b9%81%e0%b8%aa%e0%b8%94%e0%b8%87-comment-%e0%b8%ad%e0%b8%ad%e0%b8%81%e0%b8%a1%e0%b8%b2%e0%b9%80%e0%b8%a5%e0%b8%a2%e0%b9%83%e0%b8%99%e0%b9%80%e0%b8%99%e0%b8%b7%e0%b9%89%e0%b8%ad%e0%b8%ab%e0%b8%b2/</link> <comments>http://killthewhat.com/drupal-tutorials/%e0%b9%81%e0%b8%aa%e0%b8%94%e0%b8%87-comment-%e0%b8%ad%e0%b8%ad%e0%b8%81%e0%b8%a1%e0%b8%b2%e0%b9%80%e0%b8%a5%e0%b8%a2%e0%b9%83%e0%b8%99%e0%b9%80%e0%b8%99%e0%b8%b7%e0%b9%89%e0%b8%ad%e0%b8%ab%e0%b8%b2/#comments</comments> <pubDate>Thu, 10 Jun 2010 12:29:51 +0000</pubDate> <dc:creator>snappy</dc:creator> <category><![CDATA[Drupal]]></category> <category><![CDATA[comment]]></category> <category><![CDATA[content type]]></category><guid
isPermaLink="false">http://killthewhat.com/?p=6059</guid> <description><![CDATA[ถ้าเราทำการติดตั้ง drupal ใหม่ๆโดยปกติแล้วการที่จะ comment ได้นั้นเราจะต้องกดปุ่ม add new comment ของบทความนั้นก่อนๆ มันก็คงเสียเวลาอยู่ไม่ใช่น้อยทีเดียว สู่พอเข้าถึงบทความปุ้บ ก็แสดงความคิดเห็นได้เลยทันทีแบบนี้จะแหล่มกว่าเยอะ ให้เราไปที่ Administer > Content management > Content types จากนั้นเลือก content type ที่เราจะทำการปรับแต่งในส่วนนี้ผมเลือก Blog entry ละกันเพราะผมใช้เขียนบทความประจำๆ กดปุ่ม edit จากนั้นไปที่หัวข้อว่า Comment Settings > Location of comment submission form: เลือก Display below post or comments จากนั้นก็กด Save แต่นี้เละแหล่มล่ะ]]></description> <content:encoded><![CDATA[<p>ถ้าเราทำการติดตั้ง drupal ใหม่ๆโดยปกติแล้วการที่จะ comment ได้นั้นเราจะต้องกดปุ่ม add new comment ของบทความนั้นก่อนๆ<span
id="more-6059"></span> มันก็คงเสียเวลาอยู่ไม่ใช่น้อยทีเดียว สู่พอเข้าถึงบทความปุ้บ ก็แสดงความคิดเห็นได้เลยทันทีแบบนี้จะแหล่มกว่าเยอะ</p><p>ให้เราไปที่ Administer > Content management > Content types จากนั้นเลือก content type ที่เราจะทำการปรับแต่งในส่วนนี้ผมเลือก Blog entry ละกันเพราะผมใช้เขียนบทความประจำๆ กดปุ่ม edit<br
/> <img
src="http://killthewhat.com/wp-content/uploads/2010/06/drupal_1.png" alt="" title="drupal_1" width="550" height="290" class="aligncenter size-full wp-image-6060" /></p><p>จากนั้นไปที่หัวข้อว่า Comment Settings > Location of comment submission form: เลือก Display below post or comments จากนั้นก็กด Save แต่นี้เละแหล่มล่ะ<br
/> <img
src="http://killthewhat.com/wp-content/uploads/2010/06/drupal_2.png" alt="" title="drupal_2" width="550" height="300" class="aligncenter size-full wp-image-6061" /></p> ]]></content:encoded> <wfw:commentRss>http://killthewhat.com/drupal-tutorials/%e0%b9%81%e0%b8%aa%e0%b8%94%e0%b8%87-comment-%e0%b8%ad%e0%b8%ad%e0%b8%81%e0%b8%a1%e0%b8%b2%e0%b9%80%e0%b8%a5%e0%b8%a2%e0%b9%83%e0%b8%99%e0%b9%80%e0%b8%99%e0%b8%b7%e0%b9%89%e0%b8%ad%e0%b8%ab%e0%b8%b2/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>แก้ไข block ง่ายๆด้วย Block edit ใน drupal</title><link>http://killthewhat.com/drupal-tutorials/%e0%b9%81%e0%b8%81%e0%b9%89%e0%b9%84%e0%b8%82-block-%e0%b8%87%e0%b9%88%e0%b8%b2%e0%b8%a2%e0%b9%86%e0%b8%94%e0%b9%89%e0%b8%a7%e0%b8%a2-block-edit-%e0%b9%83%e0%b8%99-drupal/</link> <comments>http://killthewhat.com/drupal-tutorials/%e0%b9%81%e0%b8%81%e0%b9%89%e0%b9%84%e0%b8%82-block-%e0%b8%87%e0%b9%88%e0%b8%b2%e0%b8%a2%e0%b9%86%e0%b8%94%e0%b9%89%e0%b8%a7%e0%b8%a2-block-edit-%e0%b9%83%e0%b8%99-drupal/#comments</comments> <pubDate>Tue, 08 Jun 2010 13:21:12 +0000</pubDate> <dc:creator>snappy</dc:creator> <category><![CDATA[Drupal]]></category> <category><![CDATA[block]]></category> <category><![CDATA[edit]]></category> <category><![CDATA[module]]></category><guid
isPermaLink="false">http://killthewhat.com/?p=6046</guid> <description><![CDATA[Block edit เป็น module ที่ไว้แก้ไข block ได้ง่ายขึ้นโดยเมื่อเรานำเมาส์ไปวางบน block นั้นๆก็จะมีเมนูเล็กๆโผล่ขึ้นมาให้เราสามารถกดแก้ไขได้เลยครับ สะดวกมากสำหรับเว็บไซต์ที่มีการใช้งาน block จำนวนมาก การใช้งานก็ง่ายมากๆเพียงแค่โหลด Block edit มาทำการติดตั้งหลังจากนั้นก็ enable ตัว module ซะ เพีงเท่านี้เราก็จะสามารถใช้งานได้แล้วครับ เป็น module อีกตัวที่ผมแนะนำให้ใช้ครับ ฟันธง!!!]]></description> <content:encoded><![CDATA[<p><img
src="http://killthewhat.com/wp-content/uploads/2010/06/block_edit.thumbnail.jpg" alt="" title="block_edit.thumbnail" width="217" height="217" class="aligncenter size-full wp-image-6047" /><br
/> <a
href="http://drupal.org/project/block_edit">Block edit</a> เป็น module ที่ไว้แก้ไข block ได้ง่ายขึ้นโดยเมื่อเรานำเมาส์ไปวางบน block นั้นๆก็จะมีเมนูเล็กๆโผล่ขึ้นมาให้เราสามารถกดแก้ไขได้เลยครับ<span
id="more-6046"></span> สะดวกมากสำหรับเว็บไซต์ที่มีการใช้งาน block จำนวนมาก</p><p>การใช้งานก็ง่ายมากๆเพียงแค่โหลด <a
href="http://drupal.org/project/block_edit">Block edit</a> มาทำการติดตั้งหลังจากนั้นก็ enable ตัว module ซะ<br
/> <img
src="http://killthewhat.com/wp-content/uploads/2010/06/Selection_0025.png" alt="" title="Selection_002" width="550" height="35" class="aligncenter size-full wp-image-6048" /></p><p>เพีงเท่านี้เราก็จะสามารถใช้งานได้แล้วครับ เป็น module อีกตัวที่ผมแนะนำให้ใช้ครับ ฟันธง!!!</p> ]]></content:encoded> <wfw:commentRss>http://killthewhat.com/drupal-tutorials/%e0%b9%81%e0%b8%81%e0%b9%89%e0%b9%84%e0%b8%82-block-%e0%b8%87%e0%b9%88%e0%b8%b2%e0%b8%a2%e0%b9%86%e0%b8%94%e0%b9%89%e0%b8%a7%e0%b8%a2-block-edit-%e0%b9%83%e0%b8%99-drupal/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>ทำหน้า contact ง่ายๆโดย Contact Forms ใน drupal</title><link>http://killthewhat.com/drupal-tutorials/%e0%b8%97%e0%b8%b3%e0%b8%ab%e0%b8%99%e0%b9%89%e0%b8%b2-contact-%e0%b8%87%e0%b9%88%e0%b8%b2%e0%b8%a2%e0%b9%86%e0%b9%82%e0%b8%94%e0%b8%a2-contact-forms-%e0%b9%83%e0%b8%99-drupal/</link> <comments>http://killthewhat.com/drupal-tutorials/%e0%b8%97%e0%b8%b3%e0%b8%ab%e0%b8%99%e0%b9%89%e0%b8%b2-contact-%e0%b8%87%e0%b9%88%e0%b8%b2%e0%b8%a2%e0%b9%86%e0%b9%82%e0%b8%94%e0%b8%a2-contact-forms-%e0%b9%83%e0%b8%99-drupal/#comments</comments> <pubDate>Mon, 07 Jun 2010 13:57:44 +0000</pubDate> <dc:creator>snappy</dc:creator> <category><![CDATA[Drupal]]></category> <category><![CDATA[contact]]></category> <category><![CDATA[field]]></category> <category><![CDATA[form]]></category> <category><![CDATA[module]]></category><guid
isPermaLink="false">http://killthewhat.com/?p=6039</guid> <description><![CDATA[Contact forms เป็นโมดูลที่ไว้สร้างหน้า contact หรือฟอร์มการติดต่อให้กับเว็บเราแบบง่ายๆรวดเร็ว โดยวิธีง่ายๆให้เราโหลด module ตัวนี้มาทำการติดตั้งก่อนครับจากนั้นเปิดการใช้งานมันด้วย ต่อมาให้เราไปที่ admin/build/contact/add เพื่อทำการสร้าง category สำหรับการส่งเมลก่อน Category ชื่อหัวข้อเมลที่ต้องการ Additional Information คำอธิบายสำหรับ category นี้ Recipients เมลที่ต้องการให้ส่ง สามารถทำการส่งหลายๆเมลได้โดยการระบุเป็นเมลละบรรทัดไปครับ สามารถสร้าง category เพิ่มเท่าไรก็ได้ รูปแบบก็จะเป็นดังนี้ ส่วนถ้าใครต้องการ field เพิ่มเติมแนะนำ module contact form fields ครับเป็นตัวเสริมของ Contact forms และถ้าใครต้องการลูกเล่นมากกว่านี้แนะนำ Webform ไว้ผมจะมาพูดถึงมันวันหลัง]]></description> <content:encoded><![CDATA[<p><img
src="http://killthewhat.com/wp-content/uploads/2010/06/Selection_0012.png" alt="" title="Selection_001" width="549" height="538" class="aligncenter size-full wp-image-6040" /><br
/> <a
href="http://drupal.org/project/contact_forms">Contact forms</a> เป็นโมดูลที่ไว้สร้างหน้า contact หรือฟอร์มการติดต่อให้กับเว็บเราแบบง่ายๆรวดเร็ว <span
id="more-6039"></span> โดยวิธีง่ายๆให้เราโหลด module ตัวนี้มาทำการติดตั้งก่อนครับจากนั้นเปิดการใช้งานมันด้วย</p><p>ต่อมาให้เราไปที่ admin/build/contact/add เพื่อทำการสร้าง category สำหรับการส่งเมลก่อน<br
/> <img
src="http://killthewhat.com/wp-content/uploads/2010/06/Selection_0024.png" alt="" title="Selection_002" width="550" height="413" class="aligncenter size-full wp-image-6041" /></p><ol><li>Category ชื่อหัวข้อเมลที่ต้องการ</li><li>Additional Information คำอธิบายสำหรับ category นี้</li><li>Recipients เมลที่ต้องการให้ส่ง สามารถทำการส่งหลายๆเมลได้โดยการระบุเป็นเมลละบรรทัดไปครับ</li></ol><p>สามารถสร้าง category เพิ่มเท่าไรก็ได้<br
/> <a
href="http://killthewhat.com/wp-content/uploads/2010/06/Selection_0033.png" rel="lightbox[6039]"><img
src="http://killthewhat.com/wp-content/uploads/2010/06/Selection_0033.png" alt="" title="Selection_003" width="550" height="193" class="aligncenter size-full wp-image-6042" /></a></p><p>รูปแบบก็จะเป็นดังนี้<br
/> <img
src="http://killthewhat.com/wp-content/uploads/2010/06/Selection_0042.png" alt="" title="Selection_004" width="422" height="540" class="aligncenter size-full wp-image-6043" /></p><p>ส่วนถ้าใครต้องการ field เพิ่มเติมแนะนำ <a
href="http://drupal.org/project/contact_forms">module contact form fields</a> ครับเป็นตัวเสริมของ <a
href="http://drupal.org/project/contact_forms">Contact forms</a></p><p>และถ้าใครต้องการลูกเล่นมากกว่านี้แนะนำ <a
href="http://drupal.org/project/webform">Webform</a> ไว้ผมจะมาพูดถึงมันวันหลัง</p> ]]></content:encoded> <wfw:commentRss>http://killthewhat.com/drupal-tutorials/%e0%b8%97%e0%b8%b3%e0%b8%ab%e0%b8%99%e0%b9%89%e0%b8%b2-contact-%e0%b8%87%e0%b9%88%e0%b8%b2%e0%b8%a2%e0%b9%86%e0%b9%82%e0%b8%94%e0%b8%a2-contact-forms-%e0%b9%83%e0%b8%99-drupal/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>ทำ date picker ใน drupal</title><link>http://killthewhat.com/drupal-tutorials/%e0%b8%97%e0%b8%b3-date-picket-%e0%b9%83%e0%b8%99-drupal/</link> <comments>http://killthewhat.com/drupal-tutorials/%e0%b8%97%e0%b8%b3-date-picket-%e0%b9%83%e0%b8%99-drupal/#comments</comments> <pubDate>Sun, 06 Jun 2010 19:37:32 +0000</pubDate> <dc:creator>snappy</dc:creator> <category><![CDATA[Drupal]]></category> <category><![CDATA[cck]]></category> <category><![CDATA[date]]></category> <category><![CDATA[date picker]]></category> <category><![CDATA[module]]></category><guid
isPermaLink="false">http://killthewhat.com/?p=6025</guid> <description><![CDATA[Date picket คืออะไรมันก็คือฟอร์มข้อมูลที่เราต้องการเก็บเป็นวันที่ แต่เราไม่ต้องมานั่งกรอกวันที่เองพอเรากดที่ฟอร์มนั่นก็จะมีปฎิทินเล็กๆแสดงออกมาให้เราเลือกได้แล้ว เท่ไปเลยใช่ปะครับดูตัวอย่างได้จาก http://jqueryui.com/demos/datepicker/ เรามาดูวิธีทำดีกันดีกว่าครับว่าทำยังไง module ที่ต้องใช้นะครับ CCK Date หลังจากติดตั้งแล้วก็ enable module ตามนี้นะครับ CCK Content Date/Time Date Date API Date Popup Date Timezone ต่อมาให้เราไปที่ admin/settings/date-time เพื่อทำการตั้งค่า Time zone ก่อน หลังจากตั้งค่าเสร็จแล้วก็ไปสร้าง CCK ให้กับ content type ที่ต้องการครับ โดยไปที่ admin/content/types/list แล้วเลือก manage fields ทำการเพิ่ม field ดังรูป ที่ label และ field name ตั้งชื่อตามต้องการและ Type of data ให้เลือก [...]]]></description> <content:encoded><![CDATA[<p><img
src="http://killthewhat.com/wp-content/uploads/2010/06/Selection_0022.png" alt="" title="Selection_002" width="231" height="215" class="aligncenter size-full wp-image-6026" /><br
/> Date picket คืออะไรมันก็คือฟอร์มข้อมูลที่เราต้องการเก็บเป็นวันที่ แต่เราไม่ต้องมานั่งกรอกวันที่เองพอเรากดที่ฟอร์มนั่นก็จะมีปฎิทินเล็กๆแสดงออกมาให้เราเลือกได้แล้ว<span
id="more-6025"></span> เท่ไปเลยใช่ปะครับดูตัวอย่างได้จาก http://jqueryui.com/demos/datepicker/</p><p>เรามาดูวิธีทำดีกันดีกว่าครับว่าทำยังไง module ที่ต้องใช้นะครับ</p><ul><li><a
href="http://drupal.org/project/cck">CCK</a></li><li><a
href="http://drupal.org/project/date">Date</a></li></ul><p>หลังจากติดตั้งแล้วก็ enable module ตามนี้นะครับ</p><ul><li>CCK</p><ul><li>Content</li></ul></li><li>Date/Time<ul><li>Date</li><li>Date API</li><li>Date Popup</li><li>Date Timezone</li></ul></li></ul><p>ต่อมาให้เราไปที่ admin/settings/date-time เพื่อทำการตั้งค่า Time zone ก่อน<br
/> <img
src="http://killthewhat.com/wp-content/uploads/2010/06/Selection_0031.png" alt="" title="Selection_003" width="478" height="470" class="aligncenter size-full wp-image-6029" /></p><p>หลังจากตั้งค่าเสร็จแล้วก็ไปสร้าง CCK ให้กับ content type ที่ต้องการครับ โดยไปที่ admin/content/types/list แล้วเลือก manage fields ทำการเพิ่ม field ดังรูป<br
/> <a
href="http://killthewhat.com/wp-content/uploads/2010/06/Selection_0023.png" rel="lightbox[6025]"><img
src="http://killthewhat.com/wp-content/uploads/2010/06/Selection_0023.png" alt="" title="Selection_002" width="550" height="62" class="aligncenter size-full wp-image-6030" /></a></p><p>ที่ label และ field name ตั้งชื่อตามต้องการและ Type of data ให้เลือก date ครับส่วน Form element to edit the data ให้เลือก Text Field with Date Pop-up calendar ดังรูปบน</p><p>ในส่วนของการตั้งค่านั้น Default value: คือการกำหนดค่าเริ่มต้นของ field<br
/> <img
src="http://killthewhat.com/wp-content/uploads/2010/06/Selection_0032.png" alt="" title="Selection_003" width="491" height="237" class="aligncenter size-full wp-image-6031" /></p><p>ส่วน Global settings<br
/> <img
src="http://killthewhat.com/wp-content/uploads/2010/06/Selection_0041.png" alt="" title="Selection_004" width="550" height="492" class="aligncenter size-full wp-image-6032" /></p><ul><li>Required กำหนดให้ field นี้ต้องใส่ข้อมูล</li><li>Number of values: จำนวน field ที่ต้องการ</li><li>To Date: เป็นการเปิดใช้งานวันที่สิ้นสุด ซึ่งเมื่อเราเปิดมาจะมี field เพิ่มอีก 1 อันเพื่อระบุวันที่สิ้นสุด<br
/> <img
src="http://killthewhat.com/wp-content/uploads/2010/06/Selection_005.png" alt="" title="Selection_005" width="234" height="191" class="aligncenter size-full wp-image-6033" /></li><li>Granularity : กำหนดการเก็บข้อมูลว่าจะใส่อะไรบ้าง เช่น วัน เดือน ปี เวลา</li></ul><p>ส่วนค่าอื่นๆก็ลองใช้งานดูครับที่สำคัญๆก็มีแค่นี้เท่านี้ละครับเราก็จะได้ field ที่เก็บวันที่ในรูปแบบ date picker สวยงามๆแล้ว</p> ]]></content:encoded> <wfw:commentRss>http://killthewhat.com/drupal-tutorials/%e0%b8%97%e0%b8%b3-date-picket-%e0%b9%83%e0%b8%99-drupal/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>reset theme ของเราผ่าน database ใน drupal</title><link>http://killthewhat.com/drupal-tutorials/reset-theme-%e0%b8%82%e0%b8%ad%e0%b8%87%e0%b9%80%e0%b8%a3%e0%b8%b2%e0%b8%9c%e0%b9%88%e0%b8%b2%e0%b8%99-database-%e0%b9%83%e0%b8%99-drupal/</link> <comments>http://killthewhat.com/drupal-tutorials/reset-theme-%e0%b8%82%e0%b8%ad%e0%b8%87%e0%b9%80%e0%b8%a3%e0%b8%b2%e0%b8%9c%e0%b9%88%e0%b8%b2%e0%b8%99-database-%e0%b9%83%e0%b8%99-drupal/#comments</comments> <pubDate>Thu, 03 Jun 2010 13:29:19 +0000</pubDate> <dc:creator>snappy</dc:creator> <category><![CDATA[Drupal]]></category> <category><![CDATA[database]]></category> <category><![CDATA[garland]]></category> <category><![CDATA[reset]]></category> <category><![CDATA[theme]]></category><guid
isPermaLink="false">http://killthewhat.com/?p=6020</guid> <description><![CDATA[พอดีผมต้องปรับแต่ง theme ของ drupal อยู่หลายๆครั้ง และบ้างครั้งทำไปทำมาเจ้ากรรมเข้าเว็บโดยใช้ theme ที่ผมทำอยู่มันดันเข้าไม่ได้ซะงั้น หรือแสดงผลออกมาไม่ครบ ทำให้ผมไม่สามารถเข้าหน้าสิทธิ์ admin ไปจัดการเปลี่ยนเป็น theme default ของระบบได้ ผมจึงต้องหาวิธีแก้ใน database เอาซะเลย วิธีก็ไม่ยากครับให้ไปที่ phpmyadmin ของเราจากนั้นไปยังฐานข้อมูลของ drupal เว็บไซค์ของเราและใช้คำสั่งดังนี้ใส่ใน SQL UPDATE variable SET value='s:7:&#34;garland&#34;' WHERE name = 'theme_default'; TRUNCATE cache; เพียงเท่านี้เราก็จะสามารถเข้าสู่หน้าเว็บของเราด้วย theme garland ละครับ thank : http://drupal.org/node/200774]]></description> <content:encoded><![CDATA[<p>พอดีผมต้องปรับแต่ง theme ของ drupal อยู่หลายๆครั้ง และบ้างครั้งทำไปทำมาเจ้ากรรมเข้าเว็บโดยใช้ theme<span
id="more-6020"></span> ที่ผมทำอยู่มันดันเข้าไม่ได้ซะงั้น หรือแสดงผลออกมาไม่ครบ ทำให้ผมไม่สามารถเข้าหน้าสิทธิ์ admin ไปจัดการเปลี่ยนเป็น theme default ของระบบได้ ผมจึงต้องหาวิธีแก้ใน database เอาซะเลย</p><p>วิธีก็ไม่ยากครับให้ไปที่ phpmyadmin ของเราจากนั้นไปยังฐานข้อมูลของ drupal เว็บไซค์ของเราและใช้คำสั่งดังนี้ใส่ใน SQL</p><pre class="brush: php; title: ;">
UPDATE variable SET value='s:7:&quot;garland&quot;' WHERE name = 'theme_default';
TRUNCATE cache;
</pre><p><a
href="http://killthewhat.com/wp-content/uploads/2010/06/Selection_004.png" rel="lightbox[6020]"><img
src="http://killthewhat.com/wp-content/uploads/2010/06/Selection_004.png" alt="" title="Selection_004" width="550" height="157" class="aligncenter size-full wp-image-6021" /></a></p><p>เพียงเท่านี้เราก็จะสามารถเข้าสู่หน้าเว็บของเราด้วย theme garland ละครับ</p><p>thank : http://drupal.org/node/200774</p> ]]></content:encoded> <wfw:commentRss>http://killthewhat.com/drupal-tutorials/reset-theme-%e0%b8%82%e0%b8%ad%e0%b8%87%e0%b9%80%e0%b8%a3%e0%b8%b2%e0%b8%9c%e0%b9%88%e0%b8%b2%e0%b8%99-database-%e0%b9%83%e0%b8%99-drupal/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>เพิ่ม span tag ใน primary links ของ drupal</title><link>http://killthewhat.com/drupal-tutorials/%e0%b9%80%e0%b8%9e%e0%b8%b4%e0%b9%88%e0%b8%a1-span-tag-%e0%b9%83%e0%b8%99-primary-links-%e0%b8%82%e0%b8%ad%e0%b8%87-drupal/</link> <comments>http://killthewhat.com/drupal-tutorials/%e0%b9%80%e0%b8%9e%e0%b8%b4%e0%b9%88%e0%b8%a1-span-tag-%e0%b9%83%e0%b8%99-primary-links-%e0%b8%82%e0%b8%ad%e0%b8%87-drupal/#comments</comments> <pubDate>Sun, 30 May 2010 18:08:43 +0000</pubDate> <dc:creator>snappy</dc:creator> <category><![CDATA[Drupal]]></category> <category><![CDATA[primary link]]></category> <category><![CDATA[span]]></category> <category><![CDATA[tag]]></category><guid
isPermaLink="false">http://killthewhat.com/?p=6001</guid> <description><![CDATA[วิธีนี้เป็นการ override template เอานะครับโดยรูปแบบผลที่ได้จะออกมาเป็นแบบนี้ &#60;a href=&#34;#&#34;&#62;&#60;span&#62;LINKTITLE&#60;/span&#62;&#60;/a&#62; ไว้สำหรับคนที่ต้องการตกแต่งเมนู primary link ของ drupal เพิ่มเติมครับ หรือใครจะเปลี่ยนจาก span ไปเป็นตัวอื่นก็ได้ตามสะดวกโดยการให้เพิ่มโค็ดดังกล่าวลงใน template.php ใน theme ที่เราใช้งานครับ function phptemplate_links($links, $attributes = array('class' =&#62; 'links')) { $output = ''; if (count($links) &#62; 0) { $output = '&#60;ul'. drupal_attributes($attributes) .'&#62;'; $num_links = count($links); $i = 1; foreach ($links as $key =&#62; $link) { $class = [...]]]></description> <content:encoded><![CDATA[<p>วิธีนี้เป็นการ override template เอานะครับโดยรูปแบบผลที่ได้จะออกมาเป็นแบบนี้<span
id="more-6001"></span></p><pre class="brush: php; title: ;">
&lt;a href=&quot;#&quot;&gt;&lt;span&gt;LINKTITLE&lt;/span&gt;&lt;/a&gt;
</pre><p>ไว้สำหรับคนที่ต้องการตกแต่งเมนู primary link ของ drupal เพิ่มเติมครับ หรือใครจะเปลี่ยนจาก span ไปเป็นตัวอื่นก็ได้ตามสะดวกโดยการให้เพิ่มโค็ดดังกล่าวลงใน template.php ใน theme ที่เราใช้งานครับ</p><pre class="brush: php; title: ;">
function phptemplate_links($links, $attributes = array('class' =&gt; 'links')) {
  $output = '';

  if (count($links) &gt; 0) {
    $output = '&lt;ul'. drupal_attributes($attributes) .'&gt;';

    $num_links = count($links);
    $i = 1;

    foreach ($links as $key =&gt; $link) {
      $class = $key;

      // Add first, last and active classes to the list of links to help out themers.
      if ($i == 1) {
        $class .= ' first';
      }
      if ($i == $num_links) {
        $class .= ' last';
      }
      if (isset($link['href']) &amp;&amp; $link['href'] == $_GET['q']) {
        $class .= ' active';
      }
      $output .= '&lt;li class=&quot;'. $class .'&quot;&gt;';

      if (isset($link['href'])) {
        // Pass in $link as $options, they share the same keys.
        $link['html'] = TRUE;
        $output .= l('&lt;span&gt;'. $link['title'] .'&lt;/span&gt;', $link['href'], $link);
      }
      else if (!empty($link['title'])) {
        // Some links are actually not links, but we wrap these in &lt;span&gt; for adding title and class attributes
        if (empty($link['html'])) {
          $link['title'] = check_plain($link['title']);
        }
        $span_attributes = '';
        if (isset($link['attributes'])) {
          $span_attributes = drupal_attributes($link['attributes']);
        }
        $output .= '&lt;span'. $span_attributes .'&gt;'. $link['title'] .'&lt;/span&gt;';
      }

      $i++;
      $output .= &quot;&lt;/li&gt;\n&quot;;
    }

    $output .= '&lt;/ul&gt;';
  }

  return $output;
}
</pre>]]></content:encoded> <wfw:commentRss>http://killthewhat.com/drupal-tutorials/%e0%b9%80%e0%b8%9e%e0%b8%b4%e0%b9%88%e0%b8%a1-span-tag-%e0%b9%83%e0%b8%99-primary-links-%e0%b8%82%e0%b8%ad%e0%b8%87-drupal/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>เพิ่ม id ให้กับ body ใน drupal</title><link>http://killthewhat.com/drupal-tutorials/%e0%b9%80%e0%b8%9e%e0%b8%b4%e0%b9%88%e0%b8%a1-id-%e0%b9%83%e0%b8%ab%e0%b9%89%e0%b8%81%e0%b8%b1%e0%b8%9a-body-%e0%b9%83%e0%b8%99-drupal/</link> <comments>http://killthewhat.com/drupal-tutorials/%e0%b9%80%e0%b8%9e%e0%b8%b4%e0%b9%88%e0%b8%a1-id-%e0%b9%83%e0%b8%ab%e0%b9%89%e0%b8%81%e0%b8%b1%e0%b8%9a-body-%e0%b9%83%e0%b8%99-drupal/#comments</comments> <pubDate>Wed, 26 May 2010 16:36:21 +0000</pubDate> <dc:creator>snappy</dc:creator> <category><![CDATA[Drupal]]></category> <category><![CDATA[body]]></category> <category><![CDATA[id]]></category> <category><![CDATA[theme]]></category><guid
isPermaLink="false">http://killthewhat.com/?p=5998</guid> <description><![CDATA[ในการปรับแต่ง theme drupal นั้นบางครั้งเราจำเป็นต้องการเพิ่ม id หรือ class เพื่อสะดวกในการเล่น css ให้ง่ายขึ้น ซึ่งตอนนั้นผมได้เสนอวิธีการเพิ่ม class ให้กับ tag body ไปแล้ว มาคราวนี้ผมจะเสนอการเพิ่ม id ให้กับ body บ้างโดยการอ้างจาก path ให้เราไปแก้ไขไฟล์ page.tpl.php ใน theme ที่เราใช้งานอยู่โดยเพิ่มโค็ดด้านล่างก่อน tag head &#60;?php if(module_exists('pathauto')) { $result = db_query(&#34;SELECT dst FROM {url_alias} WHERE src='%s'&#34;, $_GET['q']); if ($data = db_fetch_object($result)) { $body_id = str_replace(&#34;/&#34;, &#34;-&#34;, $data-&#62;dst); } } else { [...]]]></description> <content:encoded><![CDATA[<p>ในการปรับแต่ง theme drupal นั้นบางครั้งเราจำเป็นต้องการเพิ่ม id หรือ class เพื่อสะดวกในการเล่น css ให้ง่ายขึ้น<span
id="more-5998"></span> ซึ่งตอนนั้นผมได้เสนอ<a
href="http://killthewhat.com/drupal-tutorials/%E0%B9%80%E0%B8%9E%E0%B8%B4%E0%B9%88%E0%B8%A1-class-%E0%B9%83%E0%B8%99-body-%E0%B9%83%E0%B8%AB%E0%B9%89%E0%B8%81%E0%B8%B1%E0%B8%9A-drupal/">วิธีการเพิ่ม class ให้กับ tag body ไปแล้ว</a> มาคราวนี้ผมจะเสนอการเพิ่ม id ให้กับ body บ้างโดยการอ้างจาก path</p><p>ให้เราไปแก้ไขไฟล์ page.tpl.php  ใน theme ที่เราใช้งานอยู่โดยเพิ่มโค็ดด้านล่างก่อน tag head</p><pre class="brush: php; title: ;">
&lt;?php
  if(module_exists('pathauto')) {
    $result = db_query(&quot;SELECT dst FROM {url_alias} WHERE src='%s'&quot;, $_GET['q']);
    if ($data = db_fetch_object($result)) {
      $body_id = str_replace(&quot;/&quot;, &quot;-&quot;, $data-&gt;dst);
    }
  }
  else {
      $body_id = str_replace(array('/', '_'), array('-', '-'), $_GET['q']);
  }
?&gt;
</pre><p>จากนั้นที่ tag body ให้แก้ไขเป็นดังนี้</p><pre class="brush: php; title: ;">
&lt;body id=&quot;&lt;?php print $body_id; ?&gt;&quot;&gt;
</pre><p>แค่นี้ละครับเราก็จะได้ id แต่ละหน้าโดยอ้างอิงจะ path ครับ</p><p>thank : <a
href="http://snappytux.com/drupal/%E0%B9%80%E0%B8%9E%E0%B8%B4%E0%B9%88%E0%B8%A1-id-%E0%B9%83%E0%B8%AB%E0%B9%89%E0%B8%81%E0%B8%B1%E0%B8%9A-body-%E0%B9%83%E0%B8%99-drupal">snappy blog</a></p> ]]></content:encoded> <wfw:commentRss>http://killthewhat.com/drupal-tutorials/%e0%b9%80%e0%b8%9e%e0%b8%b4%e0%b9%88%e0%b8%a1-id-%e0%b9%83%e0%b8%ab%e0%b9%89%e0%b8%81%e0%b8%b1%e0%b8%9a-body-%e0%b9%83%e0%b8%99-drupal/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Quicktabs สร้าง tab ใน drupal</title><link>http://killthewhat.com/drupal-tutorials/quicktabs-%e0%b8%aa%e0%b8%a3%e0%b9%89%e0%b8%b2%e0%b8%87-tab-%e0%b9%83%e0%b8%99-drupal/</link> <comments>http://killthewhat.com/drupal-tutorials/quicktabs-%e0%b8%aa%e0%b8%a3%e0%b9%89%e0%b8%b2%e0%b8%87-tab-%e0%b9%83%e0%b8%99-drupal/#comments</comments> <pubDate>Tue, 18 May 2010 12:29:18 +0000</pubDate> <dc:creator>snappy</dc:creator> <category><![CDATA[Drupal]]></category> <category><![CDATA[ajax]]></category> <category><![CDATA[block]]></category> <category><![CDATA[module]]></category> <category><![CDATA[quicktabs]]></category> <category><![CDATA[tab]]></category><guid
isPermaLink="false">http://killthewhat.com/?p=5959</guid> <description><![CDATA[Quicktabs เป็นโมดูลที่จะช่วยในการสร้าง tab โดยสามารถนำ block, node หรือ view มาแสดงผลในรูปแบบ tab ได้ ใครนึกภาพไม่ออกดูจากรูปด้านบนได้ครับ ให้โหลดโมดูล Quicktabs และ ajax มาทำการติดตั้ง สำหรับ Ajax ให้ enable เฉพาะ Ajax กับ Ajax plugin &#8211; quicktabs และ Quicktabs ก็ให้ enable ตามปกติ ตั้งค่า Quicktabs ให้ไปที่ admin/settings/quicktabs จะเป็นการเลือก default style ของ tab ที่เราจะสร้างขึ้น ต่อมาคือการเรียกใช้งาน Quicktabs ให้ไปที่ admin/build/quicktabs แล้วกดที่ New QT block เพื่อทำการสร้าง Tab ใหม่ กำหนดค่าต่างๆ [...]]]></description> <content:encoded><![CDATA[<p><img
src="http://killthewhat.com/wp-content/uploads/2010/05/Selection_0016.png" alt="" title="Selection_001" width="550" height="119" class="aligncenter size-full wp-image-5960" /></p><p><a
href="http://drupal.org/project/quicktabs" rel="nofollow">Quicktabs</a> เป็นโมดูลที่จะช่วยในการสร้าง tab โดยสามารถนำ block, node หรือ view มาแสดงผลในรูปแบบ tab ได้<span
id="more-5959"></span> ใครนึกภาพไม่ออกดูจากรูปด้านบนได้ครับ</p><p>ให้โหลดโมดูล <a
href="http://drupal.org/project/quicktabs" rel="nofollow">Quicktabs</a> และ <a
href="http://drupal.org/project/ajax" rel="nofollow">ajax</a> มาทำการติดตั้ง</p><p>สำหรับ Ajax ให้ enable เฉพาะ Ajax กับ Ajax plugin &#8211; quicktabs<br
/> และ Quicktabs ก็ให้ enable ตามปกติ</p><p>ตั้งค่า Quicktabs ให้ไปที่ admin/settings/quicktabs จะเป็นการเลือก default style ของ tab ที่เราจะสร้างขึ้น<br
/> <img
src="http://killthewhat.com/wp-content/uploads/2010/05/Selection_0033.png" alt="" title="Selection_003" width="550" height="532" class="aligncenter size-full wp-image-5964" /></p><p>ต่อมาคือการเรียกใช้งาน Quicktabs ให้ไปที่ admin/build/quicktabs แล้วกดที่ New QT block เพื่อทำการสร้าง Tab ใหม่<br
/> <img
src="http://killthewhat.com/wp-content/uploads/2010/05/Selection_0024.png" alt="" title="Selection_002" width="550" height="186" class="aligncenter size-full wp-image-5963" /></p><p>กำหนดค่าต่างๆ<br
/> <img
src="http://killthewhat.com/wp-content/uploads/2010/05/Selection_0042.png" alt="" title="Selection_004" width="550" height="375" class="aligncenter size-full wp-image-5967" /></p><ol><li>ตั้งหัวข้อ block</li><li>เลือกรูปแบบของ tab</li><li>กำหนดการใช้งานของ ajax ให้ tab ที่จะสร้างหรือไม่</li></ol><p>เลือกเนื้อหาเช่น block, view หรือ node มาใส่ลงใน tab ของเราครับโดยสามารถเพิ่มลดได้ตามต้องการ<br
/> <img
src="http://killthewhat.com/wp-content/uploads/2010/05/Selection_0053.png" alt="" title="Selection_005" width="550" height="325" class="aligncenter size-full wp-image-5968" /></p><p>พอกลับมาดูที่ List ก็จะพบกับ tab ที่เราสร้างไว้<br
/> <img
src="http://killthewhat.com/wp-content/uploads/2010/05/Selection_0062.png" alt="" title="Selection_006" width="550" height="277" class="aligncenter size-full wp-image-5969" /></p><p>ต่อมาคือการนำไปใช้งาน Quicktab นั้นจะสร้าง tab ให้อยู่ในรูปแบบของ block ฉะนั้นเราก็ไปที่ admin/build/block กำหนด tab ที่เราสร้างขึ้นมานำไปวางไว้ตาม region ที่เราต้องการ<br
/> <img
src="http://killthewhat.com/wp-content/uploads/2010/05/Selection_0072.png" alt="" title="Selection_007" width="525" height="286" class="aligncenter size-full wp-image-5971" /></p><p>เพียงเท่านี้เราก็จะได้เนื้อหาที่แสดงในรูปแบบ tab มาใช้งานละครับทำให้ประหยัดเนื้อที่ของเว็บได้มากเลยทีเดียว เหมาะสำหรับเว็บที่ต้องการแสดงเนื้อหามากๆ</p> ]]></content:encoded> <wfw:commentRss>http://killthewhat.com/drupal-tutorials/quicktabs-%e0%b8%aa%e0%b8%a3%e0%b9%89%e0%b8%b2%e0%b8%87-tab-%e0%b9%83%e0%b8%99-drupal/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (user agent is rejected)
Database Caching 46/123 queries in 0.033 seconds using disk

Served from: killthewhat.com @ 2012-02-09 07:14:38 -->
