<?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; ค.ศ.</title> <atom:link href="http://killthewhat.com/tag/%e0%b8%84-%e0%b8%a8/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>การแสดงปี พ.ศ. ใน joomla 1.5</title><link>http://killthewhat.com/joomla-tutorial/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b9%81%e0%b8%aa%e0%b8%94%e0%b8%87%e0%b8%9b%e0%b8%b5-%e0%b8%9e-%e0%b8%a8-%e0%b9%83%e0%b8%99-joomla-1-5/</link> <comments>http://killthewhat.com/joomla-tutorial/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b9%81%e0%b8%aa%e0%b8%94%e0%b8%87%e0%b8%9b%e0%b8%b5-%e0%b8%9e-%e0%b8%a8-%e0%b9%83%e0%b8%99-joomla-1-5/#comments</comments> <pubDate>Fri, 09 Oct 2009 17:34:41 +0000</pubDate> <dc:creator>snappy</dc:creator> <category><![CDATA[Joomla]]></category> <category><![CDATA[date]]></category> <category><![CDATA[ค.ศ.]]></category> <category><![CDATA[ปี]]></category> <category><![CDATA[พ.ศ.]]></category> <category><![CDATA[วันที่]]></category><guid
isPermaLink="false">http://killthewhat.com/?p=4825</guid> <description><![CDATA[โดยปกติการแสดงผลของวันที่ในชุดภาษาไทยของ joomla นั้นจะแสดงผลออกมาแบบนี้ วันอังคารที่ 14 สิงหาคม 2007 เวลา 10:08 น. ซึ่งถ้าสังเกตุส่วนของ ปี ยังคงแสดงเป็นแบบ ค.ศ. ผมได้ไปเจอวิธีทำให้แสดงผลในแบบของ พ.ศ. มาครับ ได้มาจาก joomlant.com ขั้นตอนการแปลงปี ค.ศ. ไปเป็น พ.ศ. 1. หลังจากที่ติดตั้งภาษาไทยให้กับ joomla ไปแล้วนะครับและเลือกแสดงผล frontend แล้ว ให้ทำการ download ไฟล์ที่ทำหน้าที่ในการแปลงปี คศ เป็น พ.ศ.ได้จาก http://www.joomlant.com/index.php/downloads/doc_download/8-jdate-override.html 2. ทำการ unzip ไฟล์เราจะได้ไฟล์ชื่อ th-TH.date.php ถ้าต้องการให้แสดงตัวเลขในวันที่เป็นตัวเลขไทยด้วย ก็ให้หา $convNumber = false; เปลี่ยนไปเป็น $convNumber = true; ดังโค็ดด้านล่าง function toFormat($format = '%Y-%m-%d [...]]]></description> <content:encoded><![CDATA[<p>โดยปกติการแสดงผลของวันที่ในชุดภาษาไทยของ joomla นั้นจะแสดงผลออกมาแบบนี้ <em>วันอังคารที่ 14 สิงหาคม 2007 เวลา 10:08 น.</em> ซึ่งถ้าสังเกตุส่วนของ ปี ยังคงแสดงเป็นแบบ ค.ศ.<span
id="more-4825"></span> ผมได้ไปเจอวิธีทำให้แสดงผลในแบบของ พ.ศ. มาครับ ได้มาจาก joomlant.com</p><h3>ขั้นตอนการแปลงปี ค.ศ. ไปเป็น พ.ศ.</h3><p>1. หลังจากที่ติดตั้งภาษาไทยให้กับ joomla ไปแล้วนะครับและเลือกแสดงผล frontend แล้ว ให้ทำการ download ไฟล์ที่ทำหน้าที่ในการแปลงปี คศ เป็น พ.ศ.ได้จาก http://www.joomlant.com/index.php/downloads/doc_download/8-jdate-override.html</p><p>2. ทำการ unzip ไฟล์เราจะได้ไฟล์ชื่อ <strong>th-TH.date.php</strong> ถ้าต้องการให้แสดงตัวเลขในวันที่เป็นตัวเลขไทยด้วย ก็ให้หา $convNumber = false; เปลี่ยนไปเป็น $convNumber = true; ดังโค็ดด้านล่าง</p><pre class="brush: php; title: ;">
function toFormat($format = '%Y-%m-%d %H:%M:%S')
	{
		$convNumber = true;
		$date = ($this-&gt;_date !== false) ? $this-&gt;th_THdate($format, $this-&gt;_date + $this-&gt;_offset, $convNumber) : null;
		return $date;
	}
</pre><p>3. ทำการ upload ไฟล์ไปไว้ใน directory ชื่อ /language/th-TH/</p><p>ในกรณีที่ใครทำแล้วแสดงผลออกมาไม่ถูกต้อง ดังรูป<br
/> <img
src="http://killthewhat.com/wp-content/uploads/2009/10/joomla.png" alt="joomla" title="joomla" width="330" height="39" class="aligncenter size-full wp-image-4828" /><br
/> ของผมที่เจอก็คือในส่วนของนาทีจะแสดงออกมาเป็นค่า %M ใหเทำการแก้ไขในไฟล์ th-TH.ini ซึ่งจะอยู่ path เดียวกัน ในบรรทัด</p><pre class="brush: php; title: ;">
DATE_FORMAT_LC2=วัน%Aที่ %d %B  %Y เวลา %H:%M น.
</pre><p>ให้แก้เป็น</p><pre class="brush: php; title: ;">
DATE_FORMAT_LC2=วัน%Aที่ %d %B  %Y เวลา %H:%m น.
</pre><p>ส่วนใครเลือก date format แบบอื่นก็ลองแก้ไขดูนะครับ โดยอ้างอิงค่าจาก data time ของ php และนี่คือผลจากการแก้ไขแล้ว<br
/> <img
src="http://killthewhat.com/wp-content/uploads/2009/10/joomla1.png" alt="joomla" title="joomla" width="295" height="28" class="aligncenter size-full wp-image-4829" /></p><p>อ้างอิง : http://www.joomlant.com/index.php/articles/joomla15-end-users-articles/35-display-budhist-era-in-content.html</p> ]]></content:encoded> <wfw:commentRss>http://killthewhat.com/joomla-tutorial/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b9%81%e0%b8%aa%e0%b8%94%e0%b8%87%e0%b8%9b%e0%b8%b5-%e0%b8%9e-%e0%b8%a8-%e0%b9%83%e0%b8%99-joomla-1-5/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 12/29 queries in 0.008 seconds using disk

Served from: killthewhat.com @ 2012-02-09 07:24:44 -->
