<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-57392424587537905</id><updated>2024-11-01T14:14:29.009+07:00</updated><category term="alfresco"/><category term="OpenOffice.org"/><category term="LibreOffice"/><category term="ubuntu"/><category term="OpenOffice.org Calc"/><category term="drupal"/><category term="mysql"/><category term="utf8"/><category term="css"/><category term="extensions"/><category term="javascript"/><category term="numbertext"/><category term="thai"/><category term="Osdev"/><category term="bonita"/><category term="bug"/><category term="cms"/><category term="convert thai number"/><category term="custom workflow"/><category term="drupal form"/><category term="error"/><category term="export"/><category term="extension"/><category term="git"/><category term="html"/><category term="java openoffice.org"/><category term="ldap"/><category term="locale"/><category term="macro"/><category term="regular expression"/><category term="ubuntu 10.04"/><category term="ภาษาไทย"/><category term="7"/><category term="945GM"/><category term="DispatchHelper"/><category term="Golang"/><category term="Menubar"/><category term="Merge"/><category term="MergePoint"/><category term="Merging"/><category term="Notepad2"/><category term="OpenOffice"/><category term="Send Mail"/><category term="SendMail"/><category term="Subject"/><category term="SunCertPathBuilderException"/><category term="Toolbar"/><category term="UNO"/><category term="UNO function"/><category term="activiti"/><category term="add-in"/><category term="advanced workflow"/><category term="ajax"/><category term="alfresco share"/><category term="alfresco site"/><category term="alfresco sites"/><category term="alfresco thai"/><category term="authen"/><category term="bahteng"/><category term="bahttext"/><category term="bazaar"/><category term="broadcom"/><category term="browser cache"/><category term="buddhist bug"/><category term="build LibreOffice"/><category term="bzr"/><category term="cache"/><category term="certificate"/><category term="change password"/><category term="comment"/><category term="compaq cq40"/><category term="configurations"/><category term="convert"/><category term="convert digit"/><category term="convert file"/><category term="cookie"/><category term="cron"/><category term="css selector"/><category term="database"/><category term="datedif"/><category term="datediff"/><category term="debug"/><category term="default"/><category term="dhas"/><category term="dns"/><category term="dns cache"/><category term="docker"/><category term="dollartext"/><category term="dotted"/><category term="drupal hook"/><category term="drupal module"/><category term="embed"/><category term="embedded"/><category term="exchange"/><category term="expunge"/><category term="fgetcsv"/><category term="firewall"/><category term="first"/><category term="first child"/><category term="first-child"/><category term="form image"/><category term="function"/><category term="g"/><category term="gitorious"/><category term="google"/><category term="google adwords"/><category term="hook form"/><category term="hover"/><category term="ie"/><category term="ie11"/><category term="imap"/><category term="install openerp"/><category term="invite"/><category term="ireport"/><category term="jasper"/><category term="java"/><category term="javascrpt"/><category term="jawt"/><category term="jodconverter"/><category term="js"/><category term="label"/><category term="labellion"/><category term="lan"/><category term="language"/><category term="libo"/><category term="line"/><category term="login"/><category term="login module"/><category term="membership"/><category term="module"/><category term="module login"/><category term="moneytext"/><category term="not sync"/><category term="not update"/><category term="ooo"/><category term="openoffice.org build"/><category term="openssl"/><category term="osx"/><category term="pdf"/><category term="php"/><category term="port"/><category term="preview"/><category term="putty"/><category term="putty ssh tunnel"/><category term="putty tunnel"/><category term="quartz"/><category term="read only"/><category term="read-only"/><category term="reads"/><category term="redirect"/><category term="registry"/><category term="replace"/><category term="restore"/><category term="route"/><category term="rule"/><category term="s_client"/><category term="schedule"/><category term="search"/><category term="site"/><category term="sites"/><category term="smtps"/><category term="spring"/><category term="ssh"/><category term="ssh tunnel"/><category term="ssl"/><category term="sun java"/><category term="svn"/><category term="templates"/><category term="thumbnail"/><category term="thunderbird"/><category term="tomcat"/><category term="transformer"/><category term="tunnel"/><category term="ubuntu 9.10"/><category term="underline"/><category term="user"/><category term="user agent"/><category term="v2"/><category term="view"/><category term="views count"/><category term="virtualhost redirect"/><category term="vista"/><category term="warning"/><category term="wifi"/><category term="windows"/><category term="windows cache"/><category term="wireless driver"/><category term="workflow"/><category term="workflow engine"/><category term="writer"/><category term="ตัวอักษรซ้อน"/><category term="ลิเบอร์"/><category term="สัมนา"/><category term="เกาะช้าง"/><category term="เมนู"/><category term="แปลงเลข"/><category term="แปลงเลขไทย"/><title type='text'>leknarm&#39;s blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.leknarm.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://www.leknarm.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>leknarm</name><uri>http://www.blogger.com/profile/16051950622231030493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>73</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-57392424587537905.post-3195175168090234953</id><published>2016-09-02T11:07:00.005+07:00</published><updated>2016-09-02T11:08:53.707+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="docker"/><category scheme="http://www.blogger.com/atom/ns#" term="firewall"/><category scheme="http://www.blogger.com/atom/ns#" term="port"/><category scheme="http://www.blogger.com/atom/ns#" term="rule"/><title type='text'>How to allow port on windows 10</title><content type='html'>ห่างหายจากการเขียน blog ไปนานมาก วันนี้เริ่มด้วยการเปิด port ที่ติด firewall บน windows 10 ละกัน&lt;br /&gt;
&lt;br /&gt;
เกริ่นนิดนึง เผอิญได้ใช้ windows 10 pro เป็น server เพื่อรัน oracle บน docker เราก็เลยเลือก docker for windows มาเล่นทันที&amp;nbsp;&lt;a href=&quot;https://docs.docker.com/docker-for-windows/&quot;&gt;https://docs.docker.com/docker-for-windows/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
เมื่อติดตั้งเรียบร้อยก็จัดการ pull images มาจาก&lt;a href=&quot;https://www.blogger.com/%C2%A0https://github.com/wnameless/docker-oracle-xe-11g&quot;&gt;&amp;nbsp;https://github.com/wnameless/docker-oracle-xe-11g&lt;/a&gt;&amp;nbsp;(ไม่ขอพูดขั้นตอนนะครับ) เมื่อ pull เสร็จก็ run ตามระเบียบโดยใส่ option -p 15211:1521 เพื่อ bind port ออกมา&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6xcJFCK1eUcCXbqqIdZhV-JZlQBqDUYRc3sJvOE2rzDOC-hZthbfYSfinjUTIfElS0m2_Qr78yc81BPsoCUpuzmvJ_lmVGgw3-UJujXEXF7izjDr2_cbRl3Rx5FW7S70-sgH-9iwizYs/s1600/0.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;451&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6xcJFCK1eUcCXbqqIdZhV-JZlQBqDUYRc3sJvOE2rzDOC-hZthbfYSfinjUTIfElS0m2_Qr78yc81BPsoCUpuzmvJ_lmVGgw3-UJujXEXF7izjDr2_cbRl3Rx5FW7S70-sgH-9iwizYs/s640/0.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
ปรากฏว่าใช้เครื่อง client (คนละเครื่องกับ windows) connect ไปไม่ได้เลยคิดว่าต้องเป็น firewall แน่ๆ เลยหาวิธี set ได้เรื่องดังนี้&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;เปิด Windows Firewall with Advanced Security ขึ้นมา (หาไม่เจอพิมพ์เอาโลด) จากนั้นไปที่ Inbound Rules &amp;gt; New Rule...&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLZmqF5O9nJEBh7wtO1X_UVejd0pqXS6aj13-dU6cicx0d_frVr3aH6rqHVuVGrnLorWctv9oKPa7mS4BPHWI3M5ct5Bjj9g3-k7Ztx9pqRbpbyZzlIefEI6fJbmY_X-HFpdaY2C29MKM/s1600/1.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLZmqF5O9nJEBh7wtO1X_UVejd0pqXS6aj13-dU6cicx0d_frVr3aH6rqHVuVGrnLorWctv9oKPa7mS4BPHWI3M5ct5Bjj9g3-k7Ztx9pqRbpbyZzlIefEI6fJbmY_X-HFpdaY2C29MKM/s640/1.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;เลือก Rule Type เป็น Port จากนั้นกด Next&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIwnQgbI0Af9PTTYL5xLBdkyBiw5J61onxyC5Oct2lAME5pSDJo7j5qC-JuFdP6FN5_H5F29OZM4noFosZvN4MZT2INsCTp6uZOGLr0p5lltdM-rwF_myP3jpycpvHwMKnemgANgvLr2E/s1600/2.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;520&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIwnQgbI0Af9PTTYL5xLBdkyBiw5J61onxyC5Oct2lAME5pSDJo7j5qC-JuFdP6FN5_H5F29OZM4noFosZvN4MZT2INsCTp6uZOGLr0p5lltdM-rwF_myP3jpycpvHwMKnemgANgvLr2E/s640/2.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;เลือก TCP ใส่ Port ที่ต้องการซะ ของผมเป็น 15211&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBQ08Op8zDIIuMM7B85DWjlM7DDR7arv3yXlbfZDSJ47d0JBtNrFcVx6giiEc5z_4N-xzxXS3jzSrUq9-HqL19TOXEkh53ZWKSj7G77Xy-Gh9UzCJAWfanIdoh4Mk7_auIqbLFkmCvh3Y/s1600/3.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;520&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBQ08Op8zDIIuMM7B85DWjlM7DDR7arv3yXlbfZDSJ47d0JBtNrFcVx6giiEc5z_4N-xzxXS3jzSrUq9-HqL19TOXEkh53ZWKSj7G77Xy-Gh9UzCJAWfanIdoh4Mk7_auIqbLFkmCvh3Y/s640/3.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;เลือก Allow the connection&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbvfZJ59AABKxSFlwJJKA1-v7TjaLmIT9tkqRUVvGITru_eEwfr-h_F9PScvOGaHkeg_SnRTEQaUF5iR1S91_PTluxgDVtbidZv14-nMshJqp9HYBwfxlUorzdQczYg7HDCMZl69-0YCA/s1600/4.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;520&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbvfZJ59AABKxSFlwJJKA1-v7TjaLmIT9tkqRUVvGITru_eEwfr-h_F9PScvOGaHkeg_SnRTEQaUF5iR1S91_PTluxgDVtbidZv14-nMshJqp9HYBwfxlUorzdQczYg7HDCMZl69-0YCA/s640/4.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;เลือก Network Profile ที่เราใช้งาน ถ้านึกไม่ออกก็เลือกให้หมด&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR6re0qI6oTk6N98o5YZrI88ReJy6iFLTmjAbi3oAIT0Aeng0gZiS7DGZd6FBiYUlhHLR6La6LJ2Lr8s-Bo1wkWG1Z9j2xOovOlSrFfoGc9k-BQjCE6PTW9oRwoWEkvQPmLdSltJ749O4/s1600/5.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;520&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR6re0qI6oTk6N98o5YZrI88ReJy6iFLTmjAbi3oAIT0Aeng0gZiS7DGZd6FBiYUlhHLR6La6LJ2Lr8s-Bo1wkWG1Z9j2xOovOlSrFfoGc9k-BQjCE6PTW9oRwoWEkvQPmLdSltJ749O4/s640/5.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;ตั้งชื่อ เป็นอันจบพิธี&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLMlktUoW6e4MZXBaCZmROa8NC-DKMno3k53Vu5W3f1vJjusDm09YafLVXxWKwd42sH_L3dBCWOBNFuCvKDogFmWCpEV5BoMv0vzJJRIy4wEZxKq-4jnReo3FxwHZRAeA9OfnWhZmOVis/s1600/6.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;520&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLMlktUoW6e4MZXBaCZmROa8NC-DKMno3k53Vu5W3f1vJjusDm09YafLVXxWKwd42sH_L3dBCWOBNFuCvKDogFmWCpEV5BoMv0vzJJRIy4wEZxKq-4jnReo3FxwHZRAeA9OfnWhZmOVis/s640/6.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
จากนั้นลอง connect ดูจะเห็นว่า connect ได้แล้ว&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.leknarm.com/feeds/3195175168090234953/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://www.leknarm.com/2016/09/how-to-allow-port-on-windows-10.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default/3195175168090234953'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default/3195175168090234953'/><link rel='alternate' type='text/html' href='http://www.leknarm.com/2016/09/how-to-allow-port-on-windows-10.html' title='How to allow port on windows 10'/><author><name>leknarm</name><uri>http://www.blogger.com/profile/16051950622231030493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6xcJFCK1eUcCXbqqIdZhV-JZlQBqDUYRc3sJvOE2rzDOC-hZthbfYSfinjUTIfElS0m2_Qr78yc81BPsoCUpuzmvJ_lmVGgw3-UJujXEXF7izjDr2_cbRl3Rx5FW7S70-sgH-9iwizYs/s72-c/0.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-57392424587537905.post-6251795362052042490</id><published>2016-06-13T10:29:00.001+07:00</published><updated>2016-06-13T10:29:39.555+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="lan"/><category scheme="http://www.blogger.com/atom/ns#" term="osx"/><category scheme="http://www.blogger.com/atom/ns#" term="route"/><category scheme="http://www.blogger.com/atom/ns#" term="wifi"/><title type='text'>How to route specific IP to specific gateway</title><content type='html'>บังเอิญเจอ Case ที่ต้องต่อ LAN ซึ่ง LAN เป็นวงภายในออก Internet ไม่ได้ แต่เราต้องรัน Script บางอย่างที่ต้องไป Fetch data จาก Internet มา&lt;br /&gt;
&lt;br /&gt;
ดังนั้นก็เลย Share Wifi ให้ออก Internet ได้ ปัญหาคือ OS มันดัน Prefer Gateway ของ LAN เฉยเบย ทำให้ Request ออกไปทาง Gateway LAN แล้วก็ตายกลางอากาศ&lt;br /&gt;
&lt;br /&gt;
ดังนั้นก็เลยต้องบังคับให้ Default gateway มันเป็น Gateway ของ Wifi ซะและให้บาง Destination IP เป็น Gateway ของ LAN ซึ่ง Step มีดังนี้&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;เปลี่ยน LAN เป็น Manual Configure IP ซะ จากนั้นเอา Gateway (Router) ออก&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5nWLSl8BpfuhNpEZTeUhnKy-uu1vBDBw13iPky8tMvnyQHZdhGYKlRmVfaxX82EfCDdjThtDy5QLN0AV0RnTGiQm4RMzho_fB4_iAdn3rDAzlXx_zk4YCMddLpsZbPTV9QWkjI_fIFww/s1600/Screen+Shot+2559-06-13+at+10.22.23.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;164&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5nWLSl8BpfuhNpEZTeUhnKy-uu1vBDBw13iPky8tMvnyQHZdhGYKlRmVfaxX82EfCDdjThtDy5QLN0AV0RnTGiQm4RMzho_fB4_iAdn3rDAzlXx_zk4YCMddLpsZbPTV9QWkjI_fIFww/s320/Screen+Shot+2559-06-13+at+10.22.23.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;ไปที่ Terminal จากนั้นรันคำสั่ง&amp;nbsp;sudo route add -host &amp;lt;&amp;lt;destination&amp;gt;&amp;gt; &amp;lt;&amp;lt;gateway&amp;gt;&amp;gt;&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7maXSCyr9-hUdbYy6VpgZ0kQsTmBYn9sHEeS7TDgbuCepBJBMadleYYu6cpspkPfj9b1SP9vR5p1ioBf6oxwmuXnCEvqBlt7btcwfIQHMvvrZJm4e706kHy9XP1J2EiyJa5bW10EI4RQ/s1600/Screen+Shot+2559-06-13+at+10.24.45.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;44&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7maXSCyr9-hUdbYy6VpgZ0kQsTmBYn9sHEeS7TDgbuCepBJBMadleYYu6cpspkPfj9b1SP9vR5p1ioBf6oxwmuXnCEvqBlt7btcwfIQHMvvrZJm4e706kHy9XP1J2EiyJa5bW10EI4RQ/s320/Screen+Shot+2559-06-13+at+10.24.45.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
Step แรกำหนดให้ Default gateway เป็น ของ Wifi โดยลบ Gateway (Router) บน LAN ออก จากนั้น Step 2 กำหนดให้ IP 192.168.1.123 ออกไปที่ Gateway 192.168.1.1 เป็นอันเสร็จ&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
ปล. สมมติว่า Gateway ของ LAN คือ 192.168.1.1 นะ&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.leknarm.com/feeds/6251795362052042490/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://www.leknarm.com/2016/06/how-to-route-specific-ip-to-specific.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default/6251795362052042490'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default/6251795362052042490'/><link rel='alternate' type='text/html' href='http://www.leknarm.com/2016/06/how-to-route-specific-ip-to-specific.html' title='How to route specific IP to specific gateway'/><author><name>leknarm</name><uri>http://www.blogger.com/profile/16051950622231030493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5nWLSl8BpfuhNpEZTeUhnKy-uu1vBDBw13iPky8tMvnyQHZdhGYKlRmVfaxX82EfCDdjThtDy5QLN0AV0RnTGiQm4RMzho_fB4_iAdn3rDAzlXx_zk4YCMddLpsZbPTV9QWkjI_fIFww/s72-c/Screen+Shot+2559-06-13+at+10.22.23.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-57392424587537905.post-2937095946970167768</id><published>2015-02-25T15:47:00.002+07:00</published><updated>2015-02-25T15:49:20.084+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="alfresco"/><category scheme="http://www.blogger.com/atom/ns#" term="LibreOffice"/><category scheme="http://www.blogger.com/atom/ns#" term="preview"/><category scheme="http://www.blogger.com/atom/ns#" term="thumbnail"/><category scheme="http://www.blogger.com/atom/ns#" term="transformer"/><title type='text'>Fix LibreOffice Transformer on Alfresco 5.0.c community</title><content type='html'>By default fresh install of Alfresco 5.0.c does not pack require libraries for LibreOffice in the installer. You should install it manually by this instruction &lt;a href=&quot;http://docs.alfresco.com/5.0/concepts/install-lolibfiles.html&quot;&gt;http://docs.alfresco.com/5.0/concepts/install-lolibfiles.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
After install all libraries, When you test run LibreOffice with command 
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;/opt/alfresco-5.0.c/libreoffice/program/soffice.bin --nofirststartwizard --nologo --headless --accept=socket,host=localhost,port=8100
&lt;/pre&gt;
&lt;br /&gt;
It will show some library is missing (libdbus-glib-1-2). Install it.&lt;br /&gt;
&lt;br /&gt;
Then after you install all libraries and restart your alfresco if you still found transformer exception &quot;connection failed: socket,host=localhost,port=8100,tcpNoDelay=1; com.sun.star.lang.IllegalArgumentException&quot;. So change your start up script of LibreOffice at&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;/opt/alfresco-5.0.c/libreoffice/scripts/libreoffice_ctl.sh&lt;/pre&gt;
&lt;br /&gt;
From
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;SOFFICE=&quot;$SOFFICEWRAPPER --nofirststartwizard --nologo --headless --accept=socket,host=127.0.0.1,port=$SOFFICE_PORT\;urp\;StarOffice.ServiceManager&quot;
&lt;/pre&gt;
&lt;br /&gt;
To
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;SOFFICE=&quot;$SOFFICEWRAPPER --nofirststartwizard --nologo --headless &quot;--accept=socket,host=127.0.0.1,port=$SOFFICE_PORT\;urp\;StarOffice.ServiceManager&quot;&quot;
&lt;/pre&gt;
&lt;br /&gt;
(Adding double quote before --accept and end of line). Then restart alfresco again. The transformer exception will fix.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;reference -- &lt;a href=&quot;https://forums.alfresco.com/forum/installation-upgrades-configuration-integration/configuration/document-preview-problem-was&quot;&gt;https://forums.alfresco.com/forum/installation-upgrades-configuration-integration/configuration/document-preview-problem-was&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.leknarm.com/feeds/2937095946970167768/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://www.leknarm.com/2015/02/fix-libreoffice-transformer-on-alfresco.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default/2937095946970167768'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default/2937095946970167768'/><link rel='alternate' type='text/html' href='http://www.leknarm.com/2015/02/fix-libreoffice-transformer-on-alfresco.html' title='Fix LibreOffice Transformer on Alfresco 5.0.c community'/><author><name>leknarm</name><uri>http://www.blogger.com/profile/16051950622231030493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-57392424587537905.post-14408995635229474</id><published>2014-09-06T20:55:00.000+07:00</published><updated>2014-09-06T20:55:48.783+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="alfresco"/><category scheme="http://www.blogger.com/atom/ns#" term="certificate"/><category scheme="http://www.blogger.com/atom/ns#" term="error"/><category scheme="http://www.blogger.com/atom/ns#" term="google"/><category scheme="http://www.blogger.com/atom/ns#" term="openssl"/><category scheme="http://www.blogger.com/atom/ns#" term="s_client"/><category scheme="http://www.blogger.com/atom/ns#" term="smtps"/><category scheme="http://www.blogger.com/atom/ns#" term="ssl"/><category scheme="http://www.blogger.com/atom/ns#" term="SunCertPathBuilderException"/><category scheme="http://www.blogger.com/atom/ns#" term="tomcat"/><title type='text'>Fix SunCertPathBuilderException: Unable To Find Valid Certification Path To Requested Target in Alfresco</title><content type='html'>&lt;span style=&quot;background-color: white; color: #444444; line-height: 16px;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;การที่จะให้ Tomcat คุยกับ Server ต่างๆ ผ่าน SSL Protocol นั้นเราต้องทำการ Install Certificate ให้กับตัว Tomcat เสียก่อน (Java) ไม่เว้นแม้แต่กรณีที่เป็น Untrust Certificate ก็จำเป็นต้อง add Certificate ก่อนเพื่อที่จะให้ Tomcat สามารถเชื่อมต่อไปยัง Server ที่ต้องการผ่าน Protocol SSL ได้อย่างสมบูรณ์&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #444444; line-height: 16px;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #444444; line-height: 16px;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;โดยหากไม่ทำการ Add Certificate ก่อนจะทำให้เวลา Tomcat คุยไปยัง Server ผ่าน SSL แล้วจะเกิด Exception ขึ้น (SSLHandshakeException) หรือคุยกันไม่รู้เรื่องนั่นเอง&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #444444; line-height: 16px;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; line-height: 16px;&quot;&gt;ยกตัวอย่างเช่นบน Alfresco เมื่อเรา config smtps ไปยัง google mail แล้วเราไม่ได้ใส่ Certificate ก็จะเกิด Error S&lt;/span&gt;&lt;span style=&quot;line-height: 16px;&quot;&gt;unCertPathBuilderException ขึ้นซึ่งสามารถแก้ไขได้โดย&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://8943936c-a-5c5f538b-s-sites.googlegroups.com/a/osdev.co.th/osdev/kb/server-network/alfresco/how-to/fix_thai_firefox/add-certificate-to-java-fix-sslhandshakeexception/gmail.png?attachauth=ANoY7co0nVDNW1Yy8XnvKZbp24_xzjDF223lNmdY1fX2iclaxht51RFVUjjvdLLWJ4NHOHM6EPH4qyjt7uhwoP2M0rzh_iDWmZDx12NdK010hCPfwYQMcI7S6K0-3d3bQo-p3glwU47bfcDVMnKZHxqwrL0wSOxLjC1W8bWd6CKR7z-JFc0k1b7fELS9coOMEPQsDn3Eu42o53A6oxUntdMg6Vftsd_rttpexfNcnn-7qK2k98frUq2q7fPKxxQ_gl9U2NYLQBmAubSiuB1R7hPKvYsWX0FnSNs3k9o8amfkQQ_O9Zfim3ZwJhL9SG0Wewb_5rCf54U9dnUMPN7T2ELOgS-yw8FOvA%3D%3D&amp;amp;attredirects=0&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;191&quot; src=&quot;https://8943936c-a-5c5f538b-s-sites.googlegroups.com/a/osdev.co.th/osdev/kb/server-network/alfresco/how-to/fix_thai_firefox/add-certificate-to-java-fix-sslhandshakeexception/gmail.png?attachauth=ANoY7co0nVDNW1Yy8XnvKZbp24_xzjDF223lNmdY1fX2iclaxht51RFVUjjvdLLWJ4NHOHM6EPH4qyjt7uhwoP2M0rzh_iDWmZDx12NdK010hCPfwYQMcI7S6K0-3d3bQo-p3glwU47bfcDVMnKZHxqwrL0wSOxLjC1W8bWd6CKR7z-JFc0k1b7fELS9coOMEPQsDn3Eu42o53A6oxUntdMg6Vftsd_rttpexfNcnn-7qK2k98frUq2q7fPKxxQ_gl9U2NYLQBmAubSiuB1R7hPKvYsWX0FnSNs3k9o8amfkQQ_O9Zfim3ZwJhL9SG0Wewb_5rCf54U9dnUMPN7T2ELOgS-yw8FOvA%3D%3D&amp;amp;attredirects=0&quot; width=&quot;320&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;ol style=&quot;background-color: white; color: #444444; line-height: 16px;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Request ไปยัง SMTP Server ของ Google ด้วยคำสั่ง&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;&lt;b&gt;openssl s_client -connect smtp.gmail.com:465&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Save Certificate เป็นนามสกุล .cert หรือ .pem เช่น&amp;nbsp;&lt;b&gt;gmail.cert&lt;/b&gt;&amp;nbsp;โดยให้ใช้ Content ตั้งแต่ ---BEGIN CERTIFICATE--- จนถึง ---END CERTIFICATE---&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;สั่ง Import Certificate ลงไปใน keystore ที่ใช้รัน Tomcat ของตัว Alfresco โดยใช้คำสั่ง&lt;br /&gt;&lt;span style=&quot;color: blue; font-weight: bold;&quot;&gt;sudo keytool -import -alias smtp.gmail.com -keystore /path/to/keystore -file /path/to/gmail.cert&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;br /&gt;เช่น&lt;/span&gt;&lt;b style=&quot;color: blue;&quot;&gt;sudo /opt/alfresco-4.2.c/java/bin/keytool -import -alias smtp.gmail.com -keystore /opt/alfresco-4.2.c/java/jre/lib/security/cacerts -file /home/admins/gmail.cert&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;ตรวจสอบว่า Certificate ที่เรา add เข้าไปนั้นอยู่ใน keystore แล้วหรือยังด้วยคำสั่ง&lt;br /&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;b&gt;keytool -list -v -keystore /path/to/keystore&lt;/b&gt;&lt;/span&gt;&amp;nbsp;เช่น&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;&lt;b&gt;/opt/alfresco-4.2.c/java/bin/keytool -list -v -keystore /opt/alfresco-4.2.c/java/jre/lib/security/cacerts&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;โดยเมื่อ Import สำเร็จแล้ว สั่ง Restart Tomcat ก็จะไม่ Error SunCertPathBuilderException อีกต่อไป&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.leknarm.com/feeds/14408995635229474/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://www.leknarm.com/2014/09/fix-suncertpathbuilderexception-unable.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default/14408995635229474'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default/14408995635229474'/><link rel='alternate' type='text/html' href='http://www.leknarm.com/2014/09/fix-suncertpathbuilderexception-unable.html' title='Fix SunCertPathBuilderException: Unable To Find Valid Certification Path To Requested Target in Alfresco'/><author><name>leknarm</name><uri>http://www.blogger.com/profile/16051950622231030493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-57392424587537905.post-4254027131923640261</id><published>2014-03-06T13:50:00.001+07:00</published><updated>2014-03-06T13:50:42.039+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="alfresco"/><category scheme="http://www.blogger.com/atom/ns#" term="alfresco thai"/><category scheme="http://www.blogger.com/atom/ns#" term="ie11"/><category scheme="http://www.blogger.com/atom/ns#" term="login"/><category scheme="http://www.blogger.com/atom/ns#" term="user agent"/><title type='text'>How to login to Alfresco 4 with IE 11</title><content type='html'>&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;เริ่มที่ IE11 ไม่สามารถ Login เข้า Alfresco ผ่าน Alfresco Share ได้ &lt;a href=&quot;https://forums.alfresco.com/forum/end-user-discussions/alfresco-share/alfresco-share-login-doesnt-work-internet-explorer-11&quot;&gt;https://forums.alfresco.com/forum/end-user-discussions/alfresco-share/alfresco-share-login-doesnt-work-internet-explorer-11&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;โดยมีผู้ให้คำตอบว่า IE11 นั้นมันเปลี่ยน User Agent จึงทำให้มัน Login ไม่ได้ รายละเอียดอ่านได้จาก link ด้านบน ซึ่งส่วนนั้นเราคงไม่สนใจมันมากกว่า &quot;แล้วจะทำอย่างไรล่ะ&quot; ดังนั้นวันนี้เราจะทำให้ IE11 Login Alfresco ได้กัน&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;ก่อนอื่นให้เปิด IE11 ก่อนแล้วเข้าไปที่ Alfresco จากนั้นกดปุ่ม F12 เพื่อเปิด Developer Tools ขึ้นมา จากนั้น Scroll แถบเครื่องมือลงไปด้านล่างเพื่อเปิด Emulator ขึ้นมา&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif; margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiEEoBL8k8em0Ciiud3yTdgZfnopn3fbTwt6xfFyDWZECavZ_3Uu5C0OlWfBka114fUWGPQ4dph6s9PXkhPFZyDTnboXJcequ7h3OnD6C7RX1HBJ62gzyXkj1BHC3G9frQUyeKWHbEoYw/s1600/emu.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiEEoBL8k8em0Ciiud3yTdgZfnopn3fbTwt6xfFyDWZECavZ_3Uu5C0OlWfBka114fUWGPQ4dph6s9PXkhPFZyDTnboXJcequ7h3OnD6C7RX1HBJ62gzyXkj1BHC3G9frQUyeKWHbEoYw/s1600/emu.png&quot; height=&quot;188&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;ที่ Document mode ให้เปลี่ยนจาก Edge (Default) ไปเป็น 10&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIMqduPyvemazbcJuwlpeA3jrRSIwXcNT48T4QPRGbSpSlZdMAQuvMu5-opgLkkdRq8BIFaaAoE5kLnnEbmTkjCt8L6QNwh0sutRLct9H_AguKOKeanm29UW_Azv1nSJY00YSEeTzm-Xs/s1600/10.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIMqduPyvemazbcJuwlpeA3jrRSIwXcNT48T4QPRGbSpSlZdMAQuvMu5-opgLkkdRq8BIFaaAoE5kLnnEbmTkjCt8L6QNwh0sutRLct9H_AguKOKeanm29UW_Azv1nSJY00YSEeTzm-Xs/s1600/10.png&quot; height=&quot;283&quot; width=&quot;400&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;จากนั้นให้ Login ตามปกติ จะสามารถ Login ได้แล้ว&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.leknarm.com/feeds/4254027131923640261/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://www.leknarm.com/2014/03/how-to-login-to-alfresco-4-with-ie-11.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default/4254027131923640261'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default/4254027131923640261'/><link rel='alternate' type='text/html' href='http://www.leknarm.com/2014/03/how-to-login-to-alfresco-4-with-ie-11.html' title='How to login to Alfresco 4 with IE 11'/><author><name>leknarm</name><uri>http://www.blogger.com/profile/16051950622231030493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiEEoBL8k8em0Ciiud3yTdgZfnopn3fbTwt6xfFyDWZECavZ_3Uu5C0OlWfBka114fUWGPQ4dph6s9PXkhPFZyDTnboXJcequ7h3OnD6C7RX1HBJ62gzyXkj1BHC3G9frQUyeKWHbEoYw/s72-c/emu.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-57392424587537905.post-5590314530790819997</id><published>2014-01-09T10:26:00.000+07:00</published><updated>2014-01-09T10:26:17.945+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="putty"/><category scheme="http://www.blogger.com/atom/ns#" term="putty ssh tunnel"/><category scheme="http://www.blogger.com/atom/ns#" term="putty tunnel"/><category scheme="http://www.blogger.com/atom/ns#" term="ssh"/><category scheme="http://www.blogger.com/atom/ns#" term="ssh tunnel"/><category scheme="http://www.blogger.com/atom/ns#" term="tunnel"/><title type='text'>How to make SSH Tunnel with PuTTY</title><content type='html'>&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;การทำ SSH Tunnel นั้นเปรียบเสมือนการวางท่อ จากเครื่องเราไปยัง ปลายทาง ซึ่งเราสามารถกำหนดได้ว่า ต้นทางและปลายทางนั้นจะให้โผล่ไปยัง port อะไร&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
ยกตัวอย่างเช่น ผมทำ Forward Port 22 และ 80 จากบ้านของผม (สมมติว่าใช้ Dyndns) ไปยัง Web Server อยู่มาวันหนึ่ง ผมอยากเข้าไปยัง Router ของบ้านผมที่ใช้ port 80 เหมือนกัน ซึ่งหากเข้าไปยัง domain ดังกล่าว มันจะ forward ไปยังเครื่อง Web ของผมทันที&lt;br /&gt;
&lt;br /&gt;
โจทย์คือ ผมจะเข้าไปยัง Port 80 ของ Router ได้อย่างไร&lt;br /&gt;
คำตอบคือ ใช้ Tunnel วางท่อจาก Port 80 ของ Router มายัง Port ?? ของเครื่องเรา&lt;br /&gt;
&lt;br /&gt;
โดยเครื่องมือที่ผมจะใช้ทำ SSH Tunnel คือ PuTTY ครับโดยหากเปิด PuTTY มา ใส่ข้อมูลในส่วนของ Session ให้ครบตามปกติ จากนั้นไปที่ Connection &amp;gt; SSH &amp;gt; Tunnels&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQFPZtJiP_M03Exi7cYu2bHTAzNzJSWvJr-ukSBvg_EdWsLeT3SKd4DNvFFC8-3MVU2WzoPvCmPGAC7e3F0WY-c9ZdWlVt6QNbzIqZ3NF8VIbcAJ7iolT_vLpnromDfsdvyLIft-Y6b-s/s1600/tunnel.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQFPZtJiP_M03Exi7cYu2bHTAzNzJSWvJr-ukSBvg_EdWsLeT3SKd4DNvFFC8-3MVU2WzoPvCmPGAC7e3F0WY-c9ZdWlVt6QNbzIqZ3NF8VIbcAJ7iolT_vLpnromDfsdvyLIft-Y6b-s/s1600/tunnel.png&quot; height=&quot;385&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
จากนั้นใส่ข้อมูลใน Source port และ Destination ดังนี้&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Source port : ใส่ Port ที่เราจะเรียกใช้งานในเครื่องเรา (อย่าใช้ Port ที่ใช้งานอยู่แล้ว) เช่น 1234&lt;/li&gt;
&lt;li&gt;Destination : ใส่จุดหมายปลายทางที่เราจะเข้าไปเช่น IP Router 192.168.1.1:80&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
เมื่อใส่ข้อมูลแล้วให้กดปุ่ม Add แล้ว Open Connection ตามปกติ&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
ผลลัพธ์ที่ได้คือ เมื่อเราเรียกใช้งาน http://localhost:1234 มันจะวิ่งไปยัง 192.168.1.1 port 80 ทันที&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiw9GlDr59uLPyX8vVK44u9VggJ9GGp-aEoGxrBG_07nms_rr6vIU3FqjYSB-QpfIqptBAZWifrPZswTh2ZkUZ05tYWrA_bdUE6r5tgD4l5KV01uLwmkheX8eYShJrLmp5e8CVhzFmvl08/s1600/local.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiw9GlDr59uLPyX8vVK44u9VggJ9GGp-aEoGxrBG_07nms_rr6vIU3FqjYSB-QpfIqptBAZWifrPZswTh2ZkUZ05tYWrA_bdUE6r5tgD4l5KV01uLwmkheX8eYShJrLmp5e8CVhzFmvl08/s1600/local.png&quot; height=&quot;253&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.leknarm.com/feeds/5590314530790819997/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://www.leknarm.com/2014/01/how-to-make-ssh-tunnel-with-putty.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default/5590314530790819997'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default/5590314530790819997'/><link rel='alternate' type='text/html' href='http://www.leknarm.com/2014/01/how-to-make-ssh-tunnel-with-putty.html' title='How to make SSH Tunnel with PuTTY'/><author><name>leknarm</name><uri>http://www.blogger.com/profile/16051950622231030493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQFPZtJiP_M03Exi7cYu2bHTAzNzJSWvJr-ukSBvg_EdWsLeT3SKd4DNvFFC8-3MVU2WzoPvCmPGAC7e3F0WY-c9ZdWlVt6QNbzIqZ3NF8VIbcAJ7iolT_vLpnromDfsdvyLIft-Y6b-s/s72-c/tunnel.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-57392424587537905.post-8839269747509415964</id><published>2014-01-06T09:54:00.000+07:00</published><updated>2014-01-06T09:54:17.474+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="browser cache"/><category scheme="http://www.blogger.com/atom/ns#" term="cache"/><category scheme="http://www.blogger.com/atom/ns#" term="dns"/><category scheme="http://www.blogger.com/atom/ns#" term="dns cache"/><category scheme="http://www.blogger.com/atom/ns#" term="windows cache"/><title type='text'>Clear DNS Cache in Windows 8</title><content type='html'>&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;ใน Windows นั้นการ Clear DNS Cache มีจุดที่ต้องระวังอยู่หลายที่ดังนี้&lt;/span&gt;&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Browser DNS Cache&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Network DNS Cache&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Windows DNS Client Service Cache&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;โดยแต่ละวิธีเราสามารถ Clear DNS ได้ดังนี้&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Browser&lt;/span&gt;&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;(Chrome) เข้าไปที่ URL&amp;nbsp;&lt;a href=&quot;chrome://net-internals/#dns&quot;&gt;chrome://net-internals/#dns&lt;/a&gt;&amp;nbsp;จากนั้นสั่ง Clear host cache&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;(Firefox) กดปุ่ม Ctrl&amp;nbsp;+ Shift&amp;nbsp;+ Delete จากนั้นเลือก Clear Browsing &amp;amp; Download History โดยกำหนด Time range เป็นเวลาที่ต้องการหรือ Everything ในกรณีที่ไม่ทราบว่าต้องใช้ Time range เท่าไร&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;(IE) _/\_ อันนี้ผมไม่ทราบครับ&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Network&lt;/span&gt;&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;เปิด Cmd Prompt จากนั้นสั่ง ipconfig / flushdns&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Windows DNS Client Servcie&lt;/span&gt;&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;เข้าไปที่ Task Manager &amp;gt; Services ไปที่ Dnscache แล้วสั่ง Restart&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/ol&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.leknarm.com/feeds/8839269747509415964/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://www.leknarm.com/2014/01/clear-dns-cache-in-windows-8.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default/8839269747509415964'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default/8839269747509415964'/><link rel='alternate' type='text/html' href='http://www.leknarm.com/2014/01/clear-dns-cache-in-windows-8.html' title='Clear DNS Cache in Windows 8'/><author><name>leknarm</name><uri>http://www.blogger.com/profile/16051950622231030493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-57392424587537905.post-8266354230868247919</id><published>2013-12-09T15:51:00.000+07:00</published><updated>2013-12-09T15:56:10.923+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Golang"/><category scheme="http://www.blogger.com/atom/ns#" term="Osdev"/><category scheme="http://www.blogger.com/atom/ns#" term="Send Mail"/><category scheme="http://www.blogger.com/atom/ns#" term="SendMail"/><category scheme="http://www.blogger.com/atom/ns#" term="Subject"/><title type='text'>How to send mail with Golang</title><content type='html'>&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;ท้าวความนิดส์นึงครับว่า งานปีใหม่ของ Osdev จะมีการจัดฉลากของขวัญกัน แต่ปัญหาหลักๆ ของการจับฉลากนั้นคือ ไม่รู้จะซื้ออะไร นั่นเอง&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;ดังนั้นเราจึงแก้ปัญหาโดยการ จับฉลากก่อนซะเลย แต่การจับฉลากก่อนนั้น จะเป็นไปโดยที่ไม่มีใครรู้ว่าใครจับได้ใคร&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;ดังนั้นเราต้องมา Coding กันซึ่งก็ต้องคิดก่อนว่าจะ Code ภาษาอะไรดี ซึ่งสรุปได้ว่าใช้ Golang เพราะอยากลองเขียนอยู่พอดี&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;โจทย์คือ&lt;/span&gt;&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;ห้าม Random ได้ตัวเอง&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;กรณีที่ผู้เล่นเป็นเลขคี่ ห้ามเหลือเศษ (กรณีที่ทุกคนมีคู่จนเหลือคนเดียว)&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Solution ที่คิดออกมาคือเอาทุกคนเข้าไปอยู่ใน Array จากนั้น Shuffle Array ซะแล้วก็ไล่ส่งเมลแบบปกติเลย ได้ Code ออกมาแบบนี้&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre class=&quot;brush: python&quot;&gt;package main

import &quot;math/rand&quot;
import &quot;time&quot;
import &quot;net/smtp&quot;
import &quot;net/mail&quot;
import &quot;strings&quot;

func encodeRFC2047(String string) string{
 // use mail&#39;s rfc2047 to encode any string
 addr := mail.Address{String, &quot;&quot;}
 return strings.Trim(addr.String(), &quot; &amp;lt;&amp;gt;&quot;)
}

func main() {
 var members = shuffle([]string {
  &quot;example@osdev.co.th&quot;, 
  &quot;example@osdev.co.th&quot;, 
  &quot;example@osdev.co.th&quot;, 
  &quot;example@osdev.co.th&quot;, 
  &quot;example@osdev.co.th&quot;, 
  &quot;example@osdev.co.th&quot;, 
  &quot;example@osdev.co.th&quot;, 
  &quot;example@osdev.co.th&quot;, 
  &quot;example@osdev.co.th&quot;, 
  &quot;example@osdev.co.th&quot;, 
  &quot;example@osdev.co.th&quot;, 
  &quot;example@osdev.co.th&quot;, 
 })
 auth := smtp.PlainAuth(&quot;&quot;, &quot;example@osdev.co.th&quot;, &quot;password&quot;, &quot;smtp.gmail.com&quot;)
 subject := &quot;Subject: Osdev Gift Random for New Year Cerebration\r\n\r\n&quot;

 for i, _ := range members {
  if i != len(members) - 1 {
   message := &quot;นี่คือเมลแจ้งการจับคุ่ขาของคุณ\r\nคู่ขาของคุณคือ &quot; + members[i] + &quot;\r\n\r\nกรุณาซื้อของขวัญราคาไม่ต่ำกว่า xxxx บาทมาให้คู่ขาของคุณด้วยนะจ๊ะ\r\nและอย่าลืมเก็บเรื่องนี้เป็นความลับล่ะ อย่าให้คู่ขาของคุณรู้เป็นอันขาด!!!&quot;
   smtp.SendMail(&quot;smtp.gmail.com:587&quot;, auth, &quot;example@osdev.co.th&quot;, []string{members[i+1]}, []byte(subject + message))
  }
 }
 message := &quot;นี่คือเมลแจ้งการจับคุ๋ขาของคุณ\r\nคู่ขาของคุณคือ &quot; + members[len(members) - 1] + &quot;\r\n\r\nกรุณาซื้อของขวัญราคาไม่ต่ำกว่า xxxx บาทมาให้คู่ขาของคุณด้วยนะจ๊ะ\r\nและอย่าลืมเก็บเรื่องนี้เป็นความลับล่ะ อย่าให้คู่ขาของคุณรู้เป็นอันขาด!!!&quot;
 smtp.SendMail(&quot;smtp.gmail.com:587&quot;, auth, &quot;example@osdev.co.th&quot;, []string{members[0]}, []byte(subject + message))
}

func shuffle(members []string) []string {
 rand.Seed(time.Now().UTC().Unix())
 var newMembers = make([]string, len(members))
 var rands = rand.Perm(len(members))
 for i, v := range rands {
  newMembers[i] = members[v]
 }
 return newMembers
}
&lt;/pre&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;ประเด็นอยู่ที่ว่า ไอ้ function SendMail&amp;nbsp;&lt;a href=&quot;http://golang.org/pkg/net/smtp/#SendMail&quot;&gt;http://golang.org/pkg/net/smtp/#SendMail&lt;/a&gt;&amp;nbsp;นั้นมันไม่มีที่ให้ใส่ Subject น่ะสิ ซึ่งค้นไปค้นมาไปเจอ Post นึงบอกว่าให้ใช้ &quot;Subject: xxxx&quot; ใน body message ได้เลย&amp;nbsp;&lt;a href=&quot;https://groups.google.com/d/msg/golang-nuts/b_zNHgr5cXU/2HLlGfwkTp4J&quot;&gt;https://groups.google.com/d/msg/golang-nuts/b_zNHgr5cXU/2HLlGfwkTp4J&lt;/a&gt;&amp;nbsp;ก็เลยจัดไป ได้ผลตามต้องการ&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.leknarm.com/feeds/8266354230868247919/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://www.leknarm.com/2013/12/how-to-send-mail-with-golang.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default/8266354230868247919'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default/8266354230868247919'/><link rel='alternate' type='text/html' href='http://www.leknarm.com/2013/12/how-to-send-mail-with-golang.html' title='How to send mail with Golang'/><author><name>leknarm</name><uri>http://www.blogger.com/profile/16051950622231030493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-57392424587537905.post-6122219071544389462</id><published>2013-10-21T12:07:00.002+07:00</published><updated>2013-10-21T12:07:58.083+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="alfresco"/><category scheme="http://www.blogger.com/atom/ns#" term="alfresco share"/><category scheme="http://www.blogger.com/atom/ns#" term="alfresco site"/><category scheme="http://www.blogger.com/atom/ns#" term="alfresco sites"/><category scheme="http://www.blogger.com/atom/ns#" term="invite"/><category scheme="http://www.blogger.com/atom/ns#" term="membership"/><category scheme="http://www.blogger.com/atom/ns#" term="site"/><category scheme="http://www.blogger.com/atom/ns#" term="sites"/><title type='text'>How to add user to Alfresco Sites without invite</title><content type='html'>&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;โดยปกติแล้วเวลาเราจะ Add Users เข้าไปใน Sites ของ Alfresco นั้นเราจะใช้วิธีการ Invite บุคคลนั้นๆ ผ่านเมนู Invite จากนั้นบุคคลนั้นต้อง Accept Invitation ถึงจะเข้าไปอยู่ใน Site ได้&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;ปัญหาคือบางกรณีเราต้องการทำ Pre Invite Users ให้เรียบร้อยก่อนที่จะเริ่มใช้งานจริง ซึ่งสามารถทำได้ผ่าน REST API ของ Alfresco ครับโดย API ที่เราจะใช้งานคือ Membership API &lt;a href=&quot;http://wiki.alfresco.com/wiki/Repository_RESTful_API_Reference#Membership&quot;&gt;http://wiki.alfresco.com/wiki/Repository_RESTful_API_Reference#Membership&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;ขั้นแรกเราต้องมี REST Client ก่อนครับ ในส่วนนี้จะใช้ตัวไหนก็ได้นะครับ แต่ผมแนะนำให้เป็น Postman ครับ (ความชอบส่วนตัว) &lt;a href=&quot;http://www.getpostman.com/&quot;&gt;http://www.getpostman.com/&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;การ Add member สามารถทำได้ผ่าน POST Method ครับโดยรายระเอียดของ Membership POST Method มีดังนี้&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;-webkit-text-stroke-width: 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19.5px; margin: 0.4em 0px 0.5em; orphans: auto; padding: 0px; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;&quot;&gt;
Adds a new membership to the site.&lt;/div&gt;
&lt;pre style=&quot;-webkit-text-stroke-width: 0px; background-color: #f9f9f9; border: 1px dashed rgb(47, 111, 171); color: black; font-family: monospace; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.1em; margin: 0px; orphans: auto; padding: 1em; text-align: left; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px;&quot;&gt;&lt;a class=&quot;external text&quot; href=&quot;http://localhost:8080/alfresco/service/api/sites/%7Bshortname%7D/memberships&quot; rel=&quot;nofollow&quot; style=&quot;background-image: url(http://wiki.alfresco.com/skins/alfresco/external.png); background-position: 100% 50%; background-repeat: no-repeat no-repeat; color: #3366bb; padding: 0px 13px 0px 0px; text-decoration: none;&quot;&gt;POST /alfresco/service/api/sites/{shortname}/memberships&lt;/a&gt;
&lt;/pre&gt;
&lt;div style=&quot;-webkit-text-stroke-width: 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19.5px; margin: 0.4em 0px 0.5em; orphans: auto; padding: 0px; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;&quot;&gt;
Requirements:&lt;/div&gt;
&lt;ul style=&quot;-webkit-text-stroke-width: 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19.5px; list-style-image: url(http://wiki.alfresco.com/skins/alfresco/bullet.gif); list-style-type: square; margin: 0.3em 0px 0px 1.6em; orphans: auto; padding: 0px; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;&quot;&gt;
&lt;li style=&quot;list-style: disc outside; margin: 0px 0px 0.1em; padding: 0px;&quot;&gt;Default Format: json&lt;/li&gt;
&lt;li style=&quot;list-style: disc outside; margin: 0px 0px 0.1em; padding: 0px;&quot;&gt;Authentication: user&lt;/li&gt;
&lt;li style=&quot;list-style: disc outside; margin: 0px 0px 0.1em; padding: 0px;&quot;&gt;Transaction: required&lt;/li&gt;
&lt;li style=&quot;list-style: disc outside; margin: 0px 0px 0.1em; padding: 0px;&quot;&gt;Format Style: any&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;-webkit-text-stroke-width: 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19.5px; margin: 0.4em 0px 0.5em; orphans: auto; padding: 0px; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;&quot;&gt;
Definition:&lt;/div&gt;
&lt;ul style=&quot;-webkit-text-stroke-width: 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19.5px; list-style-image: url(http://wiki.alfresco.com/skins/alfresco/bullet.gif); list-style-type: square; margin: 0.3em 0px 0px 1.6em; orphans: auto; padding: 0px; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;&quot;&gt;
&lt;li style=&quot;list-style: disc outside; margin: 0px 0px 0.1em; padding: 0px;&quot;&gt;Id: org/alfresco/repository/site/membership/memberships.post&lt;/li&gt;
&lt;li style=&quot;list-style: disc outside; margin: 0px 0px 0.1em; padding: 0px;&quot;&gt;Description: classpath:alfresco/templates/webscripts/org/alfresco/repository/site/membership/memberships.post.desc.xml&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;ซึ่งรายละเอียดได้ได้บอก JSON Format เรามา ดังนั้นผมจึงเข้าไปดู Code ว่า Format ที่จะใช้งานเป็นอย่างไร&amp;nbsp; ซึ่งสรุปได้ดังนี้&lt;/span&gt;&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;role : กำหนดเป็น SiteConsumer, SiteContributor, .....&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;member ที่จะ Add เข้าไปใน Site (person หรือ group)&lt;/span&gt;&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;person : กำหนดเป็นชื่อ userName ของบุคคลที่จะ Add เข้าไปใน Site&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;group : กำหนดเป็น groupId โดยต้องมี GROUP Prefix ด้วย&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/ol&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;Example &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGtdJApAmgMx7x6qSFRlrfzphju_Kgid7Vu3gP_0EutVUmau9EDfHKA_tjPLbjT9NslEKIWtUs7GEKjc6PZ7x0mdSfQksMR3P4Hst664oGf5l9akFlGe1OWqN5xNG_Rb77goMrqHpZR9k/s1600/postman.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;197&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGtdJApAmgMx7x6qSFRlrfzphju_Kgid7Vu3gP_0EutVUmau9EDfHKA_tjPLbjT9NslEKIWtUs7GEKjc6PZ7x0mdSfQksMR3P4Hst664oGf5l9akFlGe1OWqN5xNG_Rb77goMrqHpZR9k/s400/postman.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;จากตัวอย่างเป็นการ Add User tantai เข้าไปที่ site other โดยให้สิทธิ์เป็น SiteContributor สังเกตว่าผมใส่ Basic Authentication และ Content-Type ไว้เรียบร้อยแล้ว โดยเมื่อกด Send Request แล้วสำเร็จ จะได้ผลลัพธ์คือ&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhr9piAU3yyK1T1am5GBmcYeI1amMjFVrDVUTUl5sQkJzNaDdW4gNXCQfz565kDgS-mp_MceoUaQdQc0GQZVH7z5B9eAcKjcOMb0rbJpDR8B7fdkWYXrciR5lmpxDotITJnLlQlI2n9Zu4/s1600/postman2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;142&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhr9piAU3yyK1T1am5GBmcYeI1amMjFVrDVUTUl5sQkJzNaDdW4gNXCQfz565kDgS-mp_MceoUaQdQc0GQZVH7z5B9eAcKjcOMb0rbJpDR8B7fdkWYXrciR5lmpxDotITJnLlQlI2n9Zu4/s400/postman2.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;เท่านี้เราก็สามารถ Add Member เข้าไปใน Site ได้แล้วครับ แต่ว่าจะทำได้ทีละคน ดังนั้นเราอาจใช้ Python Script หรืออะไรก็ตามทำ loop เพื่อ Add Member ทีละเยอะๆ ได้ครับ&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.leknarm.com/feeds/6122219071544389462/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://www.leknarm.com/2013/10/how-to-add-user-to-alfresco-sites.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default/6122219071544389462'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default/6122219071544389462'/><link rel='alternate' type='text/html' href='http://www.leknarm.com/2013/10/how-to-add-user-to-alfresco-sites.html' title='How to add user to Alfresco Sites without invite'/><author><name>leknarm</name><uri>http://www.blogger.com/profile/16051950622231030493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGtdJApAmgMx7x6qSFRlrfzphju_Kgid7Vu3gP_0EutVUmau9EDfHKA_tjPLbjT9NslEKIWtUs7GEKjc6PZ7x0mdSfQksMR3P4Hst664oGf5l9akFlGe1OWqN5xNG_Rb77goMrqHpZR9k/s72-c/postman.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-57392424587537905.post-5503655460292646836</id><published>2013-10-16T11:30:00.002+07:00</published><updated>2013-10-16T11:33:00.503+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="alfresco"/><category scheme="http://www.blogger.com/atom/ns#" term="javascrpt"/><category scheme="http://www.blogger.com/atom/ns#" term="user"/><title type='text'>How to list all user in Alfresco</title><content type='html'>&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;บน Alfresco หากเราต้องการที่จะ list user ทั้งหมดออกมาดูจะสามารถหลายวิธี แต่ผมจะแนะนำวิธีง่ายๆ 2 วิธีคือ&lt;/span&gt;&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;แก้ไข share-config-custom.xml ให้ default search length มีค่าเป็น 0 จากนั้นพิมพ์ * ที่ช่อง User Search ได้ทันที&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;เขียน Script ลง JavaScript Console (&lt;a href=&quot;http://share-extras.github.io/addons/js-console/)&quot;&gt;http://share-extras.github.io/addons/js-console/)&lt;/a&gt; โดยใช้ Person Service ไปดึงค่าออกมา แล้ว log result เพื่อไปทำเป็น Report ต่อไป &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;โดยตัว Script&amp;nbsp; สามารถเขียนได้ดังนี้&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:javascript&quot;&gt;var ctx = Packages.org.springframework. web.context.ContextLoader.getCurrentWebApplicationContext();
var personService = ctx.getBean(&quot;personService&quot;);
var all = personService.getAllPeople().toArray();
for (var i = 0 ; i &amp;lt; all.length ; i++) {
  var node = utils.getNodeFromString(all[i]);
  logger.log(node.properties.email + &quot;,&quot; + node.properties.firstName + &quot;,&quot; + node.properties.lastName + &quot;,&quot; + node.properties.userName);
}
&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.leknarm.com/feeds/5503655460292646836/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://www.leknarm.com/2013/10/how-to-list-all-user-in-alfresco.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default/5503655460292646836'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default/5503655460292646836'/><link rel='alternate' type='text/html' href='http://www.leknarm.com/2013/10/how-to-list-all-user-in-alfresco.html' title='How to list all user in Alfresco'/><author><name>leknarm</name><uri>http://www.blogger.com/profile/16051950622231030493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-57392424587537905.post-7985052579371703058</id><published>2013-10-08T14:35:00.003+07:00</published><updated>2013-10-08T14:35:50.305+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="alfresco"/><category scheme="http://www.blogger.com/atom/ns#" term="comment"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><title type='text'>How to comment to Document with JavaScript in Alfresco</title><content type='html'>&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;ในบางกรณี เราอาจจำเป็นต้องใช้ JavaScript เพื่อไป Comment เอกสารแต่การที่จะ Comment เอกสารนั้นด้วย JavaScript API ของ Alfresco นั้นไม่ง่ายเลย ผมจึงทำ Function สำหรับ Comment ไปยัง node ของเอกสารไว้เพื่อง่ายต่อการใช้งานภายหลัง

&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:javascript&quot;&gt;function commentNode(nodeRef, comment) {
   var node = search.findNode(nodeRef);

   if(!node.hasAspect(&quot;fm:discussable&quot;)) {
      node.addAspect(&quot;fm:discussable&quot;);
   }
   if(!node.hasAspect(&quot;fm:commentsRollup&quot;)) {
      node.addAspect(&quot;fm:commentsRollup&quot;);
   }

   var forums = node.childAssocs[&quot;fm:discussion&quot;];
   var forum;
   if(forums.length === 0) {
     forum = node.createNode(node.properties.name + &quot; discussion&quot;, &quot;fm:forum&quot;, &quot;fm:discussion&quot;);
   } else {
     forum = forums[0];
   }

   var topics = forum.childAssocs[&quot;cm:contains&quot;];
   var topic;
   if(topics == null || topics.length === 0) {
     topic = forum.createNode(&quot;Comments&quot;, &quot;fm:topic&quot;, [], &quot;cm:contains&quot;, &quot;cm:Comments&quot;);
   } else {
     topic = topics[0];
   }

   var now = new Date();
   var name = &quot;comment-&quot; + now.getTime();
   var mypost = topic.createNode(name, &quot;fm:post&quot;, [], &quot;cm:contains&quot;, name);

   mypost.content = comment;
}
&lt;/pre&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;ตัว Function จะรับ NodeRef และ CommentText ไปจากนั้นนำ NodeRef ไปหา Node จริง จากนั้น check ว่า Node นั้นมี Aspect discussable กับ commentRollup หรือไม่ โดยหากไม่มีจะใส่ Aspect ให้&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;จากนั้นตรวจสอบว่ามีการทำ Child Association กับตัว discussion และตัว contains ไว้หรือยัง โดยหากยังก็ให้ Create Child Association ด้วย จากนั้นก็ add comment ลงไปครับ&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.leknarm.com/feeds/7985052579371703058/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://www.leknarm.com/2013/10/how-to-comment-to-document-with.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default/7985052579371703058'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default/7985052579371703058'/><link rel='alternate' type='text/html' href='http://www.leknarm.com/2013/10/how-to-comment-to-document-with.html' title='How to comment to Document with JavaScript in Alfresco'/><author><name>leknarm</name><uri>http://www.blogger.com/profile/16051950622231030493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-57392424587537905.post-416754201427181389</id><published>2013-09-16T11:56:00.001+07:00</published><updated>2013-09-16T12:17:40.076+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="activiti"/><category scheme="http://www.blogger.com/atom/ns#" term="advanced workflow"/><category scheme="http://www.blogger.com/atom/ns#" term="alfresco"/><category scheme="http://www.blogger.com/atom/ns#" term="custom workflow"/><category scheme="http://www.blogger.com/atom/ns#" term="workflow"/><title type='text'>Alfresco Workflow with Activiti</title><content type='html'>&lt;h2&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
Overview&lt;/span&gt;&lt;/h2&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;การสร้าง Custom Workflow บน Alfresco นั้นแบ่งออกเป็น 3 ส่วนใหญ่ๆ คือ &lt;/span&gt;&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;Workflow Definition&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;Alfresco Model&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;Share UI&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
Preparation &lt;/span&gt;&lt;/h2&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;ก่อนที่เราจะเริ่มสร้าง Workflow กันเราก็ต้องมาเตรียมความพร้อมกันก่อนโดยสิ่งที่เราต้องเตรียมมีดังนี้&lt;/span&gt;&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;Assume Alfresco Installed in your machine &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;Eclipse (can be STS) with Activiti Designer &lt;a href=&quot;http://www.activiti.org/userguide/index.html#eclipseDesignerInstallation&quot;&gt;http://www.activiti.org/userguide/index.html#eclipseDesignerInstallation&lt;/a&gt;&lt;/span&gt; &lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
Creating Workflow Definition&lt;/span&gt;&lt;/h2&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;หลังจากติดตั้ง Tools กันเรียบร้อยแล้ว ขั้นตอนต่อไปเราจะมาสร้าง (Simple) Custom Workflow&amp;nbsp; กันโดยมี Step การทำงานซัก 1-2 step โดยมีขั้นตอนดังนี้&lt;/span&gt;&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;Start the Eclipse (or STS)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;Create Activiti Diagram ใน project ใดก็ได้ (เนื่องจาก Alfresco ใช้งานเฉพาะ xml definition file ไม่ได้ต้องการ Activiti Project ดังนั้นการสร้างแค่ Diagram จึงทำได้ง่ายกว่า) โดยผมตั้งชื่อเป็น sample.bpmn20.xml&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;วาด Workflow ตามรูปด้านล่าง&lt;/span&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivCMmz-VOk6QMrnqmxFWFLVBf4GTj4avTKhBThwGP994KW090U8sTph0LBl49_5EQIcU31DY-0LdoHXTvZAHubz27k_HG0n4y02OJSxNS5DsxwwIP0x71jWGShDrDfxPfhkB0AkZfOnDM/s1600/wf1.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;149&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivCMmz-VOk6QMrnqmxFWFLVBf4GTj4avTKhBThwGP994KW090U8sTph0LBl49_5EQIcU31DY-0LdoHXTvZAHubz27k_HG0n4y02OJSxNS5DsxwwIP0x71jWGShDrDfxPfhkB0AkZfOnDM/s400/wf1.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMGKb5BYVJpYE62wG55c4hcFsfog8d2yUDA_Z2oaegNwZ6sY8doLEhvUlAamdg1cW7w3rYbZN11lHSZdgNJAGrFCw1DTlTOhWlrU24eZrMQ6uZytiz8BwNG1Ih1gSNkVUBthIBUGfgMj0/s1600/wf2.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;70&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMGKb5BYVJpYE62wG55c4hcFsfog8d2yUDA_Z2oaegNwZ6sY8doLEhvUlAamdg1cW7w3rYbZN11lHSZdgNJAGrFCw1DTlTOhWlrU24eZrMQ6uZytiz8BwNG1Ih1gSNkVUBthIBUGfgMj0/s400/wf2.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;Edit the candidate user or group in text editor&lt;/span&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAW6nZEPdcgb7mYzag8fDPRz0lMRw4rZQ2iL7c4Gm7bRGrOJnAhbvGdRIWtlbfrGPH3YgtA2z_LmtollQvnN_RK50-u7vSUTf-L3cIRnkkiEXwIdYpIYhiCwRa3gcy-WXhdoFlRqyPyQ4/s1600/wf3.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;272&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAW6nZEPdcgb7mYzag8fDPRz0lMRw4rZQ2iL7c4Gm7bRGrOJnAhbvGdRIWtlbfrGPH3YgtA2z_LmtollQvnN_RK50-u7vSUTf-L3cIRnkkiEXwIdYpIYhiCwRa3gcy-WXhdoFlRqyPyQ4/s400/wf3.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;จากรูปจะเห็นได้ว่ามีการกำหนด formKey ลงไปที่ startEvent และ userTask หมายความว่าเมื่อเรา Deploy Definition นี้ลงไปที่ Alfresco แล้ว เราต้องการให้ใช้ form ใดในการแสดงผลนั่นเอง ซึ่งผมกำหนดไว้ว่า startEvent ให้ใช้ form bpm:startTask และ userTask ต่างๆ ให้ใช้ form ของตัวเองที่ชื่อว่า sample:task1 และ sample:task2 &lt;br /&gt;&lt;br /&gt;ในส่วนของ acvititi:assignee นั้นผมกำหนดให้ task วิ่งไปยัง user tantai ซึ่งเมื่อมีการ Start Workflow แล้ว Task ก็จะวิ่งไปยัง user tantai ทันที รวมทั้งเมื่อจบ task1 ก็จะวิ่งไปยัง user tantai เช่นกันที่ task2&lt;br /&gt;&lt;br /&gt;ซึ่งต่อไปเราจะมาสร้าง Workflow Model กันบนฝั่ง Alfresco&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;Note :&amp;nbsp; Recommended to edit workflow definition in the text editor (not in 
Activiti Designer) because Activiti Designer have a lot of bug in 
current version (My version is 5.12.0)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
Creating Alfresco Model&lt;/span&gt;&lt;/h2&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;การสร้าง Model บน Alfresco นั้นประกอบไปด้วย 3 ส่วนคือ&lt;/span&gt;&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;Spring Context files&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;Model files&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;Message&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Note: แต่ในการสร้าง Workflow Model นั้น Message ใน Model ไม่จำเป็นครับ ผมขอตัดออกไปก่อนเพื่อ Focus ในส่วนของ Workflow จริงๆ &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;แนะนำให้อ่าน Data Dictionary ของ Alfresco ก่อนครับ &lt;a href=&quot;http://wiki.alfresco.com/wiki/Data_Dictionary_Guide&quot;&gt;http://wiki.alfresco.com/wiki/Data_Dictionary_Guide&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;เนื่องจาก Alfresco ได้เขียน Spring Config ไว้ให้ import ไฟล์ที่ชื่อตามด้วย -context.xml ทุกไฟล์ใน folder &lt;span style=&quot;color: #999999;&quot;&gt;TOMCAT_HOME/shared/classes/alfresco/extension/&lt;/span&gt; ไว้ ขั้นตอนแรกให้เราสร้าง Spring Context file ขึ้นมาโดยต้องตั้งชื่อเป็น sample-context.xml และวางไว้ที่ folder extension config bean ดังนี้&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:xml&quot;&gt;&amp;lt;beans&amp;gt;

   &amp;lt;!-- Registration of new models --&amp;gt;
   &amp;lt;bean depends-on=&quot;dictionaryBootstrap&quot; id=&quot;sample.model&quot; parent=&quot;dictionaryModelBootstrap&quot;&amp;gt;
      &amp;lt;property name=&quot;models&quot;&amp;gt;
         &amp;lt;list&amp;gt;
            &amp;lt;value&amp;gt;alfresco/extension/sample-model.xml&amp;lt;/value&amp;gt;
         &amp;lt;/list&amp;gt;
      &amp;lt;/property&amp;gt;
   &amp;lt;/bean&amp;gt;
&amp;lt;/beans&amp;gt;
&lt;/pre&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;จาก code ด้านบนเมื่อ Start Alfresco แล้ว Alfresco จะ load model จากไฟล์ที่ชื่อว่า sample-model.xml ดังนั้นให้เราสร้างไฟล์ sample-model.xml วางไว้ที่เดียวกันและ config bean ดังนี้&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:xml&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;
&amp;lt;model name=&quot;sample:sampleModel&quot; xmlns=&quot;http://www.alfresco.org/model/dictionary/1.0&quot;&amp;gt;

   &amp;lt;!-- Optional meta-data about the model --&amp;gt;
   &amp;lt;description&amp;gt;Sample Model&amp;lt;/description&amp;gt;
   &amp;lt;author&amp;gt;tantai@osdev.co.th&amp;lt;/author&amp;gt;
   &amp;lt;version&amp;gt;1.0&amp;lt;/version&amp;gt;

   &amp;lt;imports&amp;gt;
      &amp;lt;!-- Import Alfresco Dictionary Definitions --&amp;gt;
      &amp;lt;import uri=&quot;http://www.alfresco.org/model/dictionary/1.0&quot; prefix=&quot;d&quot;/&amp;gt;
      &amp;lt;!-- Import Alfresco Content Domain Model Definitions --&amp;gt;
      &amp;lt;import uri=&quot;http://www.alfresco.org/model/content/1.0&quot; prefix=&quot;cm&quot;/&amp;gt;
      &amp;lt;!-- Import Alfresco BPM Model Definitions --&amp;gt;
      &amp;lt;import uri=&quot;http://www.alfresco.org/model/bpm/1.0&quot; prefix=&quot;bpm&quot; /&amp;gt;
      &amp;lt;!-- Import Alfresco Workflow Model Definitions --&amp;gt;
      &amp;lt;import uri=&quot;http://www.alfresco.org/model/workflow/1.0&quot; prefix=&quot;wf&quot;/&amp;gt;
   &amp;lt;/imports&amp;gt;

   &amp;lt;!-- Introduction of new namespaces defined by this model --&amp;gt;
   &amp;lt;namespaces&amp;gt;
      &amp;lt;namespace uri=&quot;http://www.osdev.co.th/sample/workflow&quot; prefix=&quot;sample&quot;/&amp;gt;
   &amp;lt;/namespaces&amp;gt;

   &amp;lt;types&amp;gt;
      &amp;lt;type name=&quot;sample:task1&quot;&amp;gt;
         &amp;lt;title&amp;gt;Task1&amp;lt;/title&amp;gt;
         &amp;lt;parent&amp;gt;wf:reviewTask&amp;lt;/parent&amp;gt;
      &amp;lt;/type&amp;gt; 
      &amp;lt;type name=&quot;sample:task2&quot;&amp;gt;
         &amp;lt;title&amp;gt;Task2&amp;lt;/title&amp;gt;
         &amp;lt;parent&amp;gt;wf:reviewTask&amp;lt;/parent&amp;gt;
      &amp;lt;/type&amp;gt;
   &amp;lt;/types&amp;gt; 
&amp;lt;/model&amp;gt;
&lt;/pre&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;จาก code ด้านบน ผมกำหนด type ขึ้นมา 2 type คือ sample:task1 และ sample:task2&amp;nbsp; เพื่อให้ Workflow ใช้ type ดังกล่าวในการแสดงผล&lt;/span&gt;

&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;สังเกตุได้ว่า ผมไม่ได้สร้าง bpm:startTask เนื่องจาก bpm:startTask นั้นมีอยู่แล้วบน Alfresco (สามารถดูได้จากไฟล์ bpmModel.xml) และทั้ง 2 type ที่ผมสร้างขึ้นมาใหม่นั้นใช้ parent เป็น wf:reviewTask ซึ่งมีอยู่แล้วใน Alfresco เช่นกัน&lt;/span&gt;

&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;โดยเมื่อสร้าง Model เรียบร้อยแล้ว ให้สั่ง Restart Service Alfresco เพื่อให้ Alfresco load model ไปใช้งาน&lt;/span&gt;

&lt;br /&gt;
&lt;h2&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
Deploy Workflow&lt;/span&gt;&lt;/h2&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;การ Deploy Workflow บน Alfresco นั้นไม่ยากครับเพราะว่า Alfresco มีหน้า workflow-console เพื่อใช้จัดการพวก Workflow อยู่แล้ว โดยขั้นตอนการ Deploy เราแค่ copy file sample.bpmn20.xml ไปไว้ที่ folder extension จากนั้นไปยัง http://{host}:{port}/alfresco/faces/jsp/admin/workflow-console.jsp เพื่อสั่ง deploy workflow ด้วยคำสั่ง&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;

&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;/span&gt;


&lt;br /&gt;
&lt;pre class=&quot;brush:xml&quot;&gt;deploy activiti alfresco/extension/sample.bpmn20.xml 
&lt;/pre&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Note: หากเข้า url ดังกล่าวไม่ได้ ให้เช้าไปที่ url http://{host}:{port}/alfresco เพื่อทำการ login ก่อนแล้วจึงเข้าไปยัง url ดังกล่าวอีกครั้ง&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;

&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;โดยเมื่อสั่ง Deploy แล้ว ที่ Alfresco Share เราจะสามารถสั่ง Start Workflow Sample ที่เราทำได้&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;

&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;/span&gt;


&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfVSvXC0i0aY0Dv4dBtqHqYP-KjSW7ue1oeHiwHWkcaD0ar0Gda2APBooQLxx1trEN3Iv3nTyGp-b1STH8GEFPZA11I6y29QmfvH8TOLxYoJsf9pv1JoBa3WMxZPlCuKgfA0lq2eInWn4/s1600/wf4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfVSvXC0i0aY0Dv4dBtqHqYP-KjSW7ue1oeHiwHWkcaD0ar0Gda2APBooQLxx1trEN3Iv3nTyGp-b1STH8GEFPZA11I6y29QmfvH8TOLxYoJsf9pv1JoBa3WMxZPlCuKgfA0lq2eInWn4/s400/wf4.png&quot; width=&quot;382&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;แต่เมื่อเลือก Sample Workflow แล้วจะสังเกตุได้ว่า form UI ต่างๆ นั้นจะแสดง properties ทั้งหมดออกมา&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;

&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;/span&gt;


&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgTTdfd-gh0A5v5aIw_Uyu6UUlOIrSJMgJRbttLGr-pa3rrVLiGZEhkJepdclRAGx8L0TUPYYOOYGXLh-1G31vMgYmH2nlDU-SgivTKgYjiU3PEje2a9V4E3crIk0Z0-gAy41sDaWUXrI/s1600/wf5.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;317&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgTTdfd-gh0A5v5aIw_Uyu6UUlOIrSJMgJRbttLGr-pa3rrVLiGZEhkJepdclRAGx8L0TUPYYOOYGXLh-1G31vMgYmH2nlDU-SgivTKgYjiU3PEje2a9V4E3crIk0Z0-gAy41sDaWUXrI/s400/wf5.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;ซึ่งตามความเป็นจริงแล้ว เราต้องเลือกที่จะแสดงผล properties อะไรบ้าง ซึ่งจะอธิบายใน Step ต่อไปว่าเราจะกำหนด Share UI กันอย่างไร&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;

&lt;br /&gt;
&lt;h2&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444; font-size: large;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Configure Share UI&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;การ Config Share UI นั้นเราสามารถทำได้ที่ไฟล์ share-config-custom.xml ซึ่งอยู่ที่ &lt;span style=&quot;color: #666666;&quot;&gt;TOMCAT_HOME/shared/classes/alfresco/web-extension/share-config-custom.xml &lt;span style=&quot;color: black;&quot;&gt;โดยเราสามารถกำหนดการแสดงผลของแต่ละ form ได้ดังนี้&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #666666;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;

&lt;br /&gt;
&lt;pre class=&quot;brush:xml&quot;&gt;&amp;lt;config evaluator=&quot;string-compare&quot; condition=&quot;activiti$sample&quot;&amp;gt;
   &amp;lt;forms&amp;gt;
      &amp;lt;form&amp;gt;
         &amp;lt;field-visibility&amp;gt;
            &amp;lt;show id=&quot;packageItems&quot; /&amp;gt;
            &amp;lt;show id=&quot;transitions&quot; /&amp;gt;
         &amp;lt;/field-visibility&amp;gt;
         &amp;lt;appearance&amp;gt;
            &amp;lt;set id=&quot;&quot; appearance=&quot;title&quot; label-id=&quot;workflow.set.general&quot; /&amp;gt;
            &amp;lt;set id=&quot;items&quot; appearance=&quot;title&quot; label-id=&quot;workflow.set.items&quot; /&amp;gt;
            &amp;lt;set id=&quot;response&quot; appearance=&quot;title&quot; label-id=&quot;workflow.set.response&quot; /&amp;gt;

            &amp;lt;field id=&quot;packageItems&quot; set=&quot;items&quot; /&amp;gt;
         &amp;lt;/appearance&amp;gt;
      &amp;lt;/form&amp;gt;
   &amp;lt;/forms&amp;gt;
&amp;lt;/config&amp;gt;

&amp;lt;config evaluator=&quot;task-type&quot; condition=&quot;sample:task1&quot;&amp;gt;
   &amp;lt;forms&amp;gt;
      &amp;lt;form&amp;gt;
         &amp;lt;field-visibility&amp;gt;
            &amp;lt;show id=&quot;packageItems&quot; /&amp;gt;
            &amp;lt;show id=&quot;transitions&quot; /&amp;gt;
         &amp;lt;/field-visibility&amp;gt;
         &amp;lt;appearance&amp;gt;
            &amp;lt;set id=&quot;&quot; appearance=&quot;title&quot; label-id=&quot;workflow.set.general&quot; /&amp;gt;
            &amp;lt;set id=&quot;items&quot; appearance=&quot;title&quot; label-id=&quot;workflow.set.items&quot; /&amp;gt;
            &amp;lt;set id=&quot;response&quot; appearance=&quot;title&quot; label-id=&quot;workflow.set.response&quot; /&amp;gt;

            &amp;lt;field id=&quot;packageItems&quot; set=&quot;items&quot; /&amp;gt;
         &amp;lt;/appearance&amp;gt;
      &amp;lt;/form&amp;gt;
   &amp;lt;/forms&amp;gt;
&amp;lt;/config&amp;gt;

&amp;lt;config evaluator=&quot;task-type&quot; condition=&quot;sample:task2&quot;&amp;gt;
   &amp;lt;forms&amp;gt;
      &amp;lt;form&amp;gt;
         &amp;lt;field-visibility&amp;gt;
            &amp;lt;show id=&quot;packageItems&quot; /&amp;gt;
            &amp;lt;show id=&quot;transitions&quot; /&amp;gt;
         &amp;lt;/field-visibility&amp;gt;
         &amp;lt;appearance&amp;gt;
            &amp;lt;set id=&quot;&quot; appearance=&quot;title&quot; label-id=&quot;workflow.set.general&quot; /&amp;gt;
            &amp;lt;set id=&quot;items&quot; appearance=&quot;title&quot; label-id=&quot;workflow.set.items&quot; /&amp;gt;
            &amp;lt;set id=&quot;response&quot; appearance=&quot;title&quot; label-id=&quot;workflow.set.response&quot; /&amp;gt;

            &amp;lt;field id=&quot;packageItems&quot; set=&quot;items&quot; /&amp;gt;
         &amp;lt;/appearance&amp;gt;
      &amp;lt;/form&amp;gt;
   &amp;lt;/forms&amp;gt;
&amp;lt;/config&amp;gt;
&lt;/pre&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;จาก config ด้านบนผมกำหนดให้ตอน startEvent, task1, task2 นั้นแสดงผล properties แค่ packageItem เท่านั้นหมายถึงผู้ Start Workflow จะ add file เข้ามาได้&lt;/span&gt;เพียงอย่างเดียว&lt;/span&gt;

&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBwWeYcd77xonwBtsGIX9qldSFOwRzsbwwQ70Dc96OPFBjHkJgfnlwwlOAadW1UtnuEvrlj6b-8zJF9Rx-ISz8M2Jg4w0nmZr1K8Rr-VdcgPr0pwE_qT1Lzna9fsCaHOjfYsPPJhP8cK0/s1600/wf6.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;161&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBwWeYcd77xonwBtsGIX9qldSFOwRzsbwwQ70Dc96OPFBjHkJgfnlwwlOAadW1UtnuEvrlj6b-8zJF9Rx-ISz8M2Jg4w0nmZr1K8Rr-VdcgPr0pwE_qT1Lzna9fsCaHOjfYsPPJhP8cK0/s400/wf6.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;โดยเมื่อ Start Workflow แล้ว Task จะวิ่งไปหา tantai ซึ่งถูกกำหนดไว้ที่ definition แล้ว โดยเมื่อ tantai login เข้ามาในระบบ จะเห็น task ดังนี้&lt;/span&gt;

&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg44mJiSWhq1d9EK1si2aCA84tqhkUmvpNzRaY9jVDxEGB3KdHv3KckOjogOcPopKBQtGAVFMxyQ3aYeoLa1hXywNpGmF2nSeGVZOY3ndFpXssW5z4mJGeFR40rDipTClslM3VwCEVC9Sg/s1600/wf7.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg44mJiSWhq1d9EK1si2aCA84tqhkUmvpNzRaY9jVDxEGB3KdHv3KckOjogOcPopKBQtGAVFMxyQ3aYeoLa1hXywNpGmF2nSeGVZOY3ndFpXssW5z4mJGeFR40rDipTClslM3VwCEVC9Sg/s320/wf7.png&quot; width=&quot;295&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;โดยเมื่อคลิกเข้าไปก็จะเห็นหน้าตาดังที่เรา Config ไว้&lt;/span&gt;

&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgltt8bm_GlP0dbCScwhCot_6QGnqQ-FQhtQcfL381Kqxg0ITmqv4bbOllirMVHjY6DnrKU9GYSL3qr9f_RwNaDy0xDD2LJdKKzAWfetOrZnOp1eFyFg14CGEe_o6JxHWJnUxteA6kxFtQ/s1600/wf8.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;165&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgltt8bm_GlP0dbCScwhCot_6QGnqQ-FQhtQcfL381Kqxg0ITmqv4bbOllirMVHjY6DnrKU9GYSL3qr9f_RwNaDy0xDD2LJdKKzAWfetOrZnOp1eFyFg14CGEe_o6JxHWJnUxteA6kxFtQ/s400/wf8.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;โดยเมื่อกดปุ่ม Task Done, Task ก็จะวิ่งไปยัง tantai อีกครั้ง (หน้าตาเหมือนกันเพราะ Config ไว้เหมือนกัน)&lt;/span&gt;

&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgM3C0C3a63Bz5nqsw9Q0Y9uE-D69vBKuIl6dQKWVWFZLVoUiHHJ8rQLxpybdDq7_GqQusRgZEoa8xgYJrIJvsIPGejdW-ADEM3JUqp3R41xI4M8LCEopsh9_1AqUxTRtzVJqR00bzeOdk/s1600/wf9.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;162&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgM3C0C3a63Bz5nqsw9Q0Y9uE-D69vBKuIl6dQKWVWFZLVoUiHHJ8rQLxpybdDq7_GqQusRgZEoa8xgYJrIJvsIPGejdW-ADEM3JUqp3R41xI4M8LCEopsh9_1AqUxTRtzVJqR00bzeOdk/s400/wf9.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;โดยเมื่อกด Task Done อีกครั้งก็จะจบ Flow&lt;/span&gt;

&lt;br /&gt;
&lt;h2&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;Summary&lt;/span&gt;&lt;/h2&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;โดยปกติแล้วการสร้าง Workflow จะมีขั้นตอนพื้นฐานเพียงเท่านี้ แต่หากจะต้องการให้ Workflow ของเราทำงานอื่นๆ ด้วยเช่น ต้องการส่งเมลเตือน, Generate PDF files เราจำเป็นต้องทำเองโดยกำหนด Listener ของแต่ละ userTask เช่น เมื่อจบ task1 ให้สร้าง PDF files และ mail ไปยังบุคคลที่กำหนดไว้ที่ task2 สามารถดูรายละเอียดได้จาก link นี้เลยครับ &lt;a href=&quot;http://www.activiti.org/userguide/index.html#taskListeners&quot;&gt;http://www.activiti.org/userguide/index.html#taskListeners&lt;/a&gt;&lt;/span&gt;



&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;ซึ่งผมแนะนำให้เขียน Listener เป็น ScriptTaskListener พอครับ ไม่จำเป็นต้องเป็น Java Class เนื่องจาก Alfresco ใช้ Rhino เป็น JavaScript Engine ทำให้เราสามารถเรียกใช้งาน Java Class ได้ผ่าน Js ทันที&lt;/span&gt;

&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;
&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;ในส่วนการ Customize form &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;หากต้องการเพิ่ม properties ใดๆ&lt;/span&gt; ก็สามารถทำได้ที่ Model จากนั้นก็มา Config การแสดงผลที่ share-config-cuxtom.xml ได้ทันที&lt;/span&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.leknarm.com/feeds/416754201427181389/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://www.leknarm.com/2013/09/alfresco-workflow-with-activiti.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default/416754201427181389'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default/416754201427181389'/><link rel='alternate' type='text/html' href='http://www.leknarm.com/2013/09/alfresco-workflow-with-activiti.html' title='Alfresco Workflow with Activiti'/><author><name>leknarm</name><uri>http://www.blogger.com/profile/16051950622231030493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivCMmz-VOk6QMrnqmxFWFLVBf4GTj4avTKhBThwGP994KW090U8sTph0LBl49_5EQIcU31DY-0LdoHXTvZAHubz27k_HG0n4y02OJSxNS5DsxwwIP0x71jWGShDrDfxPfhkB0AkZfOnDM/s72-c/wf1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-57392424587537905.post-7188593927015673920</id><published>2013-05-14T16:51:00.002+07:00</published><updated>2013-05-14T16:52:15.731+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="bug"/><category scheme="http://www.blogger.com/atom/ns#" term="error"/><category scheme="http://www.blogger.com/atom/ns#" term="extension"/><category scheme="http://www.blogger.com/atom/ns#" term="LibreOffice"/><category scheme="http://www.blogger.com/atom/ns#" term="numbertext"/><category scheme="http://www.blogger.com/atom/ns#" term="thai"/><title type='text'>Fix bug in numbertext for thai in libreoffice</title><content type='html'>ใน numbertext extension สำหรับ libreoffice นั้นมี bug อยู่คือตัวเลขที่มากกว่าหลักล้านจะแปลผิด (สามารถลองใส่ตัวเลขได้ผ่านหน้า web &lt;a href=&quot;http://numbertext.org/&quot;&gt;http://numbertext.org&lt;/a&gt; ได้) ซึ่งผมได้ post bug + patch ไว้ที่ launchpad แล้วแต่เจ้าของเขายังไม่ patch ให้ซักที ผมเลย patch เองซะเลย คนอื่นจะได้เอาไปใช้กันได้ โดยสามารถ download ไปใช้งานกันได้เลยครับ&lt;br /&gt;
&lt;br /&gt;
link download&lt;br /&gt;
&lt;a href=&quot;https://docs.google.com/file/d/0B74Y1jkVlWmhZVJOQTg1MUtQRFE/edit?usp=sharing&quot;&gt;https://docs.google.com/file/d/0B74Y1jkVlWmhZVJOQTg1MUtQRFE/edit?usp=sharing&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
issue &lt;br /&gt;
&lt;a href=&quot;https://bugs.launchpad.net/numbertext/+bug/1074639&quot;&gt;https://bugs.launchpad.net/numbertext/+bug/1074639&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.leknarm.com/feeds/7188593927015673920/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://www.leknarm.com/2013/05/fix-bug-in-numbertext-for-thai-in.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default/7188593927015673920'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default/7188593927015673920'/><link rel='alternate' type='text/html' href='http://www.leknarm.com/2013/05/fix-bug-in-numbertext-for-thai-in.html' title='Fix bug in numbertext for thai in libreoffice'/><author><name>leknarm</name><uri>http://www.blogger.com/profile/16051950622231030493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-57392424587537905.post-4743560010668886718</id><published>2012-09-30T01:00:00.000+07:00</published><updated>2012-09-30T01:00:32.775+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="css"/><category scheme="http://www.blogger.com/atom/ns#" term="dotted"/><category scheme="http://www.blogger.com/atom/ns#" term="html"/><category scheme="http://www.blogger.com/atom/ns#" term="line"/><category scheme="http://www.blogger.com/atom/ns#" term="underline"/><title type='text'>วิธีการทำเส้นใต้เป็นเส้นประบน HTML</title><content type='html'>ปกติเวลาเราจะขีดเส้นใต้บน HTML เราก็มากำหนด CSS ดังนี้

&lt;pre class=&quot;brush:css&quot;&gt;
a {
   text-decoration: underline;
}
&lt;/pre&gt;


วิธีการทำเส้นประบน HTML ก็ไม่ได้ยากอะไร เพียงแค่เปลี่ยนจากการทำ text-decoration เป็นการทำ border แทนและกำหนดให้เป็นเส้นประดังนี้

&lt;pre class=&quot;brush:css&quot;&gt;
a {
   border-bottom: 1px dotted;
}
&lt;/pre&gt;

เท่านี้ก็ได้เส้นประตามที่ต้องการแล้ว</content><link rel='replies' type='application/atom+xml' href='http://www.leknarm.com/feeds/4743560010668886718/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://www.leknarm.com/2012/09/html.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default/4743560010668886718'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default/4743560010668886718'/><link rel='alternate' type='text/html' href='http://www.leknarm.com/2012/09/html.html' title='วิธีการทำเส้นใต้เป็นเส้นประบน HTML'/><author><name>leknarm</name><uri>http://www.blogger.com/profile/16051950622231030493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>จ.ชลบุรี ประเทศไทย</georss:featurename><georss:point>13.2017461 101.2523792</georss:point><georss:box>12.707069599999999 100.62066519999999 13.6964226 101.8840932</georss:box></entry><entry><id>tag:blogger.com,1999:blog-57392424587537905.post-3033114024342944159</id><published>2012-05-03T00:07:00.000+07:00</published><updated>2012-05-03T00:07:55.646+07:00</updated><title type='text'>[HOW TO] Switch Alfresco 4 กลับมาใช้งาน MySQL (Ubuntu 12.04 LTS)</title><content type='html'>&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;ใน Alfresco 4.x ใช้ PostgreSQL เป็น Default database และไม่สามารถเปลี่ยนมาใช้ MySQL ได้ในตอนติดตั้ง เนื่อง License ของ MySQL ไม่สามารถ Distribute MySQL เข้าไปใน Installer ได้&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;ดังนั้นหากเราต้องการจะใช้งาน Alfresco 4.x กับ MySQL เราต้องติดตั้ง MySQL ไว้ก่อนโดยใช้คำสั่ง&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;sudo apt-get install mysql-server&lt;/pre&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;&lt;/pre&gt;
&lt;br /&gt;
เมื่อติดตั้ง MySQL เรียบร้อยแล้ว ให้สร้าง Database ชื่อว่า alfresco และ Grant สิทธิ์ให้กับ database ดังกล่าวโดย สร้าง file db_setup.sql และใส่ script ดังนี้&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:sql&quot;&gt;create database alfresco default character set utf8 collate utf8_bin;
grant all on alfresco.* to &#39;alfresco&#39;@&#39;localhost&#39; identified by &#39;alfresco&#39; with grant option;
grant all on alfresco.* to &#39;alfresco&#39;@&#39;localhost.localdomain&#39; identified by &#39;alfresco&#39; with grant option;
&lt;/pre&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;จากนั้นให้ติดตั้ง Alfresco ตามปกติ โดยเมื่อ Installer ถามว่าจะติดตั้ง PostgreSQL หรือไม่ให้ตอบว่า &quot;ไม่&quot; และให้ใส่ข้อมูลเกี่ยวกับ database ดังนี้&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;Jdbc url : jdbc:mysql://localhost/alfresco?useUnicode=yes&amp;amp;characterEncoding=UTF-8
Driver : org.gjt.mm.mysql.Driver
Database name : alfresco
Username : alfresco
Password : alfresco&lt;/pre&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;เมื่อติดตั้งเสร็จ Installer จะถามว่าให้ Start Alfresco เลยหรือไม่ ให้ตอบว่า &quot;ไม่&quot; เนื่องจาก Alfresco ที่เราติดตั้งไป ยังไม่มี Driver ที่จะคุยกับ Database ได้ดังนั้นเราต้อง Download MySQL Connector มาใส่ไว้ใน Alfresco ก่อนแล้วจึงค่อย Start ซึ่งสามารถ Download ได้ที่&amp;nbsp;&lt;a href=&quot;http://dev.mysql.com/downloads/connector/j/&quot;&gt;http://dev.mysql.com/downloads/connector/j/&lt;/a&gt;&amp;nbsp;ซึ่ง Version ที่ผมใช้จะเป็น 5.1.20&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;ให้ Download Connector มาแล้วแตกไฟล์ จะได้ไฟล์&amp;nbsp;&lt;span style=&quot;background-color: white; color: #333333; text-align: left;&quot;&gt;mysql-connector-java-5.x.x-bin.jar ให้ copy ไฟล์ดังกล่าวไปไว้ที่ &amp;lt;ALFRESCO_HOME&amp;gt;/tomcat/lib จากนั้นค่อยสั่ง Start Alfresco ครับ&lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.leknarm.com/feeds/3033114024342944159/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://www.leknarm.com/2012/05/how-to-switch-alfresco-4-mysql-ubuntu.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default/3033114024342944159'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default/3033114024342944159'/><link rel='alternate' type='text/html' href='http://www.leknarm.com/2012/05/how-to-switch-alfresco-4-mysql-ubuntu.html' title='[HOW TO] Switch Alfresco 4 กลับมาใช้งาน MySQL (Ubuntu 12.04 LTS)'/><author><name>leknarm</name><uri>http://www.blogger.com/profile/16051950622231030493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-57392424587537905.post-1563432128524993777</id><published>2011-11-09T13:41:00.001+07:00</published><updated>2011-11-09T13:41:05.455+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cron"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="quartz"/><category scheme="http://www.blogger.com/atom/ns#" term="schedule"/><category scheme="http://www.blogger.com/atom/ns#" term="spring"/><title type='text'>ทำ Cron บน Web Application ง่ายๆ ด้วย Spring + Quartz</title><content type='html'>บน Linux เวลาต้องการที่จะรันโปรแกรม หรือ Script โดยตั้งเวลาให้รัน ทุกๆ เช้าหรือทุกๆ ชั่วโมงคงทำได้ไม่ยากเพราะบน Linux มี &lt;a href=&quot;http://en.wikipedia.org/wiki/Cron&quot;&gt;Cron&lt;/a&gt; อยู่ แต่ถ้าต้องการ Schedule รันโปรแกรมบน Windows คงต้องใช้ &lt;a href=&quot;http://en.wikipedia.org/wiki/Windows_Task_Scheduler&quot;&gt;Windows Task Scheduler&lt;/a&gt;&amp;nbsp;แต่ถ้าต้องการรัน Cron บน Web Application ล่ะจะต้องทำยังไง?&lt;br /&gt;
สำหรับ Java นั้นมี Library สำหรับจัดการ Schedule อยู่ชื่อว่า &lt;a href=&quot;http://quartz-scheduler.org/&quot;&gt;Quartz&lt;/a&gt;&amp;nbsp;เอาไว้จัดการ Schedule ต่างๆ ใน Application ได้&lt;br /&gt;
แต่เนื่องด้วยถ้าใช้ Quartz อย่างเดียวมันคงไม่หล่อเท่าไร ดังนั้นเราจึงต้องเอามา Integrate กับ Spring ซะเพราะหลายคนส่วนใหญ่ก็ใช้งาน Spring กันอยู่แล้ว&lt;br /&gt;
ก่อนอื่นเรามาดู dependency กันก่อนครับว่าจะใช้ Quartz กับ Spring นั้นต้องใช้อะไรบ้าง&lt;br /&gt;
&lt;br /&gt;
pom.xml
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:xml&quot;&gt;&amp;lt;dependencies&amp;gt;

 &amp;lt;dependency&amp;gt;
          &amp;lt;groupid&amp;gt;opensymphony&amp;lt;/groupid&amp;gt;
   &amp;lt;artifactid&amp;gt;quartz&amp;lt;/artifactid&amp;gt;
   &amp;lt;version&amp;gt;1.6.3&amp;lt;/version&amp;gt;
 &amp;lt;/dependency&amp;gt;
 
 &amp;lt;dependency&amp;gt;
   &amp;lt;groupid&amp;gt;commons-collections&amp;lt;/groupid&amp;gt;
   &amp;lt;artifactid&amp;gt;commons-collections&amp;lt;/artifactid&amp;gt;
   &amp;lt;version&amp;gt;3.2.1&amp;lt;/version&amp;gt;
 &amp;lt;/dependency&amp;gt;
 
 &amp;lt;dependency&amp;gt;
  &amp;lt;groupid&amp;gt;org.springframework&amp;lt;/groupid&amp;gt;
  &amp;lt;artifactid&amp;gt;spring&amp;lt;/artifactid&amp;gt;
  &amp;lt;version&amp;gt;3.0.5.RELEASE&amp;lt;/version&amp;gt;
 &amp;lt;/dependency&amp;gt;
 
 &amp;lt;dependency&amp;gt;
  &amp;lt;groupid&amp;gt;org.springframework&amp;lt;/groupid&amp;gt;
  &amp;lt;artifactid&amp;gt;spring-web&amp;lt;/artifactid&amp;gt;
  &amp;lt;version&amp;gt;3.0.5.RELEASE&amp;lt;/version&amp;gt;
 &amp;lt;/dependency&amp;gt;
 
  &amp;lt;/dependencies&amp;gt;
&lt;/pre&gt;
&lt;pre class=&quot;brush:xml&quot;&gt;&lt;/pre&gt;
จากนั้นให้สร้างไฟล์ที่เราต้องการจะรันเป็น Schedule
&lt;br /&gt;
&lt;br /&gt;
HelloQuartz.java&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:java&quot;&gt;public class HelloQuartz {
    public void hello() {
        System.out.println(&quot;hello quartz&quot;);
    }
}
&lt;/pre&gt;
เมื่อมีองค์ประกอบครบแล้ว เราก็มา config applicationContext.xml กัน

applicationContext.xml

&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:xml&quot;&gt;&amp;lt;bean id=&quot;helloQuartz&quot; class=&quot;com.example.scheduler.HelloQuartz&quot; /&amp;gt;
 
 &amp;lt;bean id=&quot;helloJobDetail&quot; class=&quot;org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean&quot;&amp;gt;
  &amp;lt;property name=&quot;targetObject&quot; ref=&quot;helloQuartz&quot; /&amp;gt;
  &amp;lt;property name=&quot;targetMethod&quot; value=&quot;hello&quot; /&amp;gt;
 &amp;lt;/bean&amp;gt;
 
 &amp;lt;bean id=&quot;helloJob&quot; class=&quot;org.springframework.scheduling.quartz.CronTriggerBean&quot;&amp;gt;
  &amp;lt;property name=&quot;jobDetail&quot; ref=&quot;helloJobDetail&quot; /&amp;gt;
  &amp;lt;property name=&quot;cronExpression&quot; value=&quot;0/5 * * * * ?&quot; /&amp;gt;
 &amp;lt;/bean&amp;gt;
 
 &amp;lt;bean class=&quot;org.springframework.scheduling.quartz.SchedulerFactoryBean&quot;&amp;gt;
  &amp;lt;property name=&quot;triggers&quot;&amp;gt;
   &amp;lt;list&amp;gt;
    &amp;lt;ref bean=&quot;helloJob&quot; /&amp;gt;
   &amp;lt;/list&amp;gt;
  &amp;lt;/property&amp;gt;
 &amp;lt;/bean&amp;gt;
&lt;/pre&gt;
จาก code ด้านบน เรากำหนดให้ bean ที่ต้องการรันเป็น HelloQuartz และกำหนด method ที่จะรันให้เป็น hello แล้วสั่งรันทุกๆ 5 วินาที ซึ่งเราสามารถกำหนด expression ได้ตาม pattern ของ &lt;a href=&quot;http://en.wikipedia.org/wiki/Cron&quot;&gt;Cron&lt;/a&gt;&amp;nbsp;ครับ</content><link rel='replies' type='application/atom+xml' href='http://www.leknarm.com/feeds/1563432128524993777/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://www.leknarm.com/2011/11/cron-web-application-spring-quartz.html#comment-form' title='2 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default/1563432128524993777'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default/1563432128524993777'/><link rel='alternate' type='text/html' href='http://www.leknarm.com/2011/11/cron-web-application-spring-quartz.html' title='ทำ Cron บน Web Application ง่ายๆ ด้วย Spring + Quartz'/><author><name>leknarm</name><uri>http://www.blogger.com/profile/16051950622231030493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-57392424587537905.post-7629325313257580461</id><published>2011-10-27T10:42:00.000+07:00</published><updated>2011-10-27T10:42:58.981+07:00</updated><title type='text'>แก้ปัญหา Failed to add the host to the list of known hosts ใน cygwin</title><content type='html'>บน cygwin เวลาเราจะ ssh ไปที่อื่นแล้วเกิด warning &quot;Failed to add the host to the list of known hosts (/home/[username]/.ssh/known_hosts).&quot; นั้นเนื่องมาจากใน windows เราไม่มี folder home อยู่แต่ home ของเราจะอยู่ที่ /cygdrive/c/Users/[username] แทนครับ&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
วิธีแก้ไข เราต้องไปแก้ไขไฟล์ที่บอก path ว่า home เราอยู่ที่ /cygdrive/c/Users/[username] โดยให้ไปแก้ไขที่ไฟล์
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;code&gt;C:\path\to\cygwin\etc\passwd&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;
&lt;div&gt;
โดยเปลี่ยน text ภายในไฟล์จาก /home/[username]  เป็น /cygdrive/c/Users/[username] แทน จากนั้นให้ลอง ssh ใหม่จะเห็นว่าสามารถ ssh ได้แล้วโดยไม่เตือน warning ดังกล่าว
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
ที่มา - &lt;a href=&quot;http://ekawas.blogspot.com/2007/03/solving-pesky-ssh-issues-in-cygwin.html&quot;&gt;http://ekawas.blogspot.com&lt;/a&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.leknarm.com/feeds/7629325313257580461/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://www.leknarm.com/2011/10/failed-to-add-host-to-list-of-known.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default/7629325313257580461'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default/7629325313257580461'/><link rel='alternate' type='text/html' href='http://www.leknarm.com/2011/10/failed-to-add-host-to-list-of-known.html' title='แก้ปัญหา Failed to add the host to the list of known hosts ใน cygwin'/><author><name>leknarm</name><uri>http://www.blogger.com/profile/16051950622231030493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-57392424587537905.post-7693639155756513954</id><published>2011-08-31T11:38:00.005+07:00</published><updated>2011-09-02T20:41:24.210+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="git"/><category scheme="http://www.blogger.com/atom/ns#" term="gitorious"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu 10.04"/><title type='text'>Install Gitorious บน Ubuntu 10.04 LTS</title><content type='html'>&lt;b&gt;ก่อนอื่นต้องติดตั้ง package ที่จำเป็นก่อน&lt;/b&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;apt-get install -y build-essential apache2 apache2-dev libapache2-mod-xsendfile git-core git-doc mysql-server mysql-client libmysqlclient15-dev phpmyadmin ruby-dev rubygems libopenssl-ruby libdbd-mysql-ruby libmysql-ruby libexpat-dev libcurl4-openssl-dev postfix apg geoip-bin libgeoip1 libgeoip-dev imagemagick libmagick++-dev libpcre3 libpcre3-dev zlib1g zlib1g-dev zip unzip libyaml-dev libonig-dev memcached irb aspell libaspell-dev aspell-en
&lt;/pre&gt;&lt;b&gt;update gem ให้เป็น version ล่าสุดเพราะว่ามี default gem version ต่ำเกินไป&lt;/b&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;gem install rubygems-update
cd /var/lib/gems/1.8/bin
./update_rubygems
&lt;/pre&gt;&lt;b&gt;ติดตั้ง ruby gems ที่ต้องจำเป็น&lt;/b&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;gem install -b --no-ri --no-rdoc rmagick chronic geoip daemons hoe echoe ruby-yadis ruby-openid mime-types diff-lcs json ruby-hmac rake stompserver passenger rails raspell
gem install -b --no-ri --no-rdoc -v 1.0.1 rack
gem install -b --no-ri --no-rdoc -v 1.3.1.1 rdiscount
gem install -b --no-ri --no-rdoc -v 1.1 stomp
&lt;/pre&gt;&lt;b&gt;ทำ symlinks ให้กับ ruby&lt;/b&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;ln -s /usr/bin/ruby1.8 /usr/bin/ruby
&lt;/pre&gt;&lt;b&gt;ติดตั้ง Sphinx&lt;/b&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;mkdir src
cd src
wget http://sphinxsearch.com/downloads/sphinx-0.9.8.1.tar.gz
tar -xvzf sphinx-0.9.8.1.tar.gz
cd sphinx-0.9.8.1/
./configure --prefix=/usr &amp;amp;&amp;amp; make all
sudo make install
&lt;/pre&gt;&lt;b&gt;clone Gitorious&lt;/b&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;mkdir -p /var/www/gitorious.osdev.co.th
chmod ugo+rwx /var/www/gitorious.osdev.co.th
cd /var/www/gitorious.osdev.co.th/
git clone git://gitorious.org/gitorious/mainline.git gitorious
&lt;/pre&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Configure Services&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;สร้าง init script ไฟล์ git-daemon&lt;/b&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;vim /etc/init.d/git-daemon
&lt;/pre&gt;&lt;pre class=&quot;brush:bash&quot;&gt;#! /bin/sh
### BEGIN INIT INFO
# Provides:          Gitorious GIT-Daemon
# Required-Start:
# Required-Stop:
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: GIT-Daemon server daemon
# Description:       Starts the GIT-Daemon needed by Gitorious
### END INIT INFO

# Author: Fabio Akita fabioakita@gmail.com

RETVAL=0
PROG=&quot;git-daemon&quot;
GITORIOUS_ROOT=/var/www/gitorious.osdev.co.th/gitorious
GIT_DAEMON=&quot;/usr/bin/ruby $GITORIOUS_ROOT/script/git-daemon -d&quot;
LOCK_FILE=/var/lock/git-daemon
PID_FILE=$GITORIOUS_ROOT/tmp/pids/git-daemon.pid

do_check_pid() {
if [ -f $PID_FILE ]; then
PID=`cat $PID_FILE`
RUNNING=`ps --pid $PID | wc -l`
else
PID=0
RUNNING=0
fi
}

runlevel=`runlevel | awk &#39;{print $2}&#39;`

start()
{
do_check_pid
if [ $RUNNING != 2 ] ; then
echo -n &quot;Starting $PROG: &quot;
/bin/su - git -c &quot;$GIT_DAEMON&quot;
sleep 10
if [ -f $PID_FILE ] ; then
echo &quot;success&quot;
RETVAL=0
else
echo &quot;failure&quot;
RETVAL=1
fi
else
echo -n &quot;$PROG already running&quot;
RETVAL=1
fi
[ &quot;$RETVAL&quot; = 0 ] &amp;amp;&amp;amp; touch $LOCK_FILE
echo
}

stop()
{
do_check_pid
echo -n &quot;Stopping $PROG: &quot;
if [ $RUNNING != 2 ] ; then
echo -n &quot;Stopping $PROG&quot;
else
PROGPID=`cat $PID_FILE`
kill -TERM $PROGPID
fi
RETVAL=0
# if we are in halt or reboot runlevel kill all running sessions
# so the TCP connections are closed cleanly
if [ &quot;x$runlevel&quot; = x0 -o &quot;x$runlevel&quot; = x6 ] ; then
PROGPID=`cat $PID_FILE`
kill -9 $PROGPID &amp;gt; /dev/null
fi
[ &quot;$RETVAL&quot; = 0 ] &amp;amp;&amp;amp; rm -f $LOCK_FILE &amp;amp;&amp;amp; rm -f $PID_FILE
echo
}

case &quot;$1&quot; in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
condrestart)
if [ -f $LOCK_FILE ] ; then
if [ &quot;$RETVAL&quot; = 0 ] ; then
stop
# avoid race
sleep 10
start
fi
fi
;;
*)
echo $&quot;Usage: $0 {start|stop|restart|condrestart}&quot;
RETVAL=1
esac
exit $RETVAL
&lt;/pre&gt;&lt;b&gt;สร้าง init script ไฟล์ git-ultrasphinx&lt;/b&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;vim /etc/init.d/git-ultrasphinx
&lt;/pre&gt;&lt;pre class=&quot;brush:bash&quot;&gt;#! /bin/sh
### BEGIN INIT INFO
# Provides:          Gitorious Ultrasphinx
# Required-Start:
# Required-Stop:
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Ultrasphinx daemon
# Description:       Starts the Ultrasphinx daemons needed by Gitorious
### END INIT INFO

# Author: Fabio Akita fabioakita@gmail.com

RETVAL=0
GITORIOUS_ROOT=/var/www/gitorious.osdev.co.th/gitorious

START_CMD=&quot;cd $GITORIOUS_ROOT &amp;amp;&amp;amp; rake ultrasphinx:daemon:start RAILS_ENV=production&quot;
STOP_CMD=&quot;cd $GITORIOUS_ROOT &amp;amp;&amp;amp; rake ultrasphinx:daemon:stop RAILS_ENV=production&quot;
RESTART_CMD=&quot;cd $GITORIOUS_ROOT &amp;amp;&amp;amp; rake ultrasphinx:daemon:restart RAILS_ENV=production&quot;
STATUS_CMD=&quot;cd $GITORIOUS_ROOT &amp;amp;&amp;amp; rake ultrasphinx:daemon:status RAILS_ENV=production&quot;
LOCK_FILE=/var/lock/git-ultrasphinx
PID_FILE=$GITORIOUS_ROOT/db/sphinx/log/searchd.pid

case &quot;$1&quot; in
start)
echo `date` &quot; Starting git-ultrasphinx&quot; &amp;gt;&amp;gt; &quot;$GITORIOUS_ROOT/log/git-ultrasphinx.log&quot;
/bin/su -- git -c &quot;$START_CMD&quot;
;;
stop)
echo `date`&quot; Stopping git-ultrasphinx&quot; &amp;gt;&amp;gt; &quot;$GITORIOUS_ROOT/log/git-ultrasphinx.log&quot;
/bin/su -- git -c &quot;$STOP_CMD&quot;
;;
status)
echo `date`&quot; Status For  git-ultrasphinx&quot; &amp;gt;&amp;gt; &quot;$GITORIOUS_ROOT/log/git-ultrasphinx.log&quot;
/bin/su -- git -c &quot;$STATUS_CMD&quot;
;;
restart)
echo `date`&quot; ReStarting git-ultrasphinx&quot; &amp;gt;&amp;gt; &quot;$GITORIOUS_ROOT/log/git-ultrasphinx.log&quot;
/bin/su -- git -c &quot;$RESTART_CMD&quot;
;;
*)
echo $&quot;Usage: $0 {start|stop|restart|status}&quot;
RETVAL=1
esac
exit $RETVAL
&lt;/pre&gt;&lt;b&gt;สร้าง init script ไฟล์ git-poller&lt;/b&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;vim /etc/init.d/git-poller
&lt;/pre&gt;&lt;pre class=&quot;brush:bash&quot;&gt;#!/bin/sh
# Start/stop the git poller
#
### BEGIN INIT INFO
# Provides: git-poller
# Required-Start: stomp
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 1
# Short-Description: Gitorious poller
# Description: Gitorious poller
### END INIT INFO

GITORIOUS_ROOT=/var/www/gitorious.osdev.co.th/gitorious
echo  `date` &quot; Starting git-poller&quot; &amp;gt;&amp;gt; &quot;$GITORIOUS_ROOT/log/git-poller.log&quot;
/bin/su -- git -c &quot; cd $GITORIOUS_ROOT; RAILS_ENV=production script/poller $@&quot;

&lt;/pre&gt;&lt;b&gt;สร้าง init script ไฟล์ stomp&lt;/b&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;vim /etc/init.d/stomp&lt;/pre&gt;&lt;pre class=&quot;brush:bash&quot;&gt;#!/bin/sh
# Start/stop the stompserver
# WATCH THE LINE WRAPPING BELOW
### BEGIN INIT INFO
# Provides: stomp
# Required-Start: $local_fs $remote_fs $network $syslog
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 1
# Short-Description: Stomp
# Description: Stomp
### END INIT INFO
test -f /usr/bin/stompserver || exit 0
. /lib/lsb/init-functions
case $1 in
start) log_daemon_msg Starting stompserver stompserver
start-stop-daemon --start --name stompserver --startas /usr/bin/stompserver \
--background --user git
log_end_msg $?
;;
stop) log_daemon_msg Stopping stompserver stompserver
start-stop-daemon --stop --name stompserver
log_end_msg $?
;;
restart) log_daemon_msg Restarting stompserver stompserver
start-stop-daemon --stop --retry 5 --name stompserver
start-stop-daemon --start --name stompserver --startas /usr/bin/stompserver \
--background --user git
log_end_msg $?
;;
status)
status_of_proc /usr/bin/stompserver stompserver &amp;amp;&amp;amp; exit 0 || exit $?
;;
*) log_action_msg Usage: /etc/init.d/stomp {start|stop|restart|status}
exit 2
;;
esac
exit 0
&lt;/pre&gt;&lt;b&gt;copy ไฟล์จาก gitorious ultrasphinx plugin ไปไว้ที่ aspell library&lt;/b&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;cp /var/www/gitorious.osdev.co.th/gitorious/vendor/plugins/ultrasphinx/examples/ap.multi /usr/lib/aspell/
&lt;/pre&gt;&lt;b&gt;สร้าง gitorious logrotate file&lt;/b&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;vim /etc/logrotate.d/gitorious
&lt;/pre&gt;โดยมี content &lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;/var/www/gitorious.osdev.co.th/gitorious/log/*log {
missingok
notifempty
sharedscripts
postrotate
/etc/init.d/git-daemon restart &amp;gt; /dev/null 2&amp;gt;/dev/null || true
/etc/init.d/git-ultrasphinx restart &amp;gt; /dev/null 2&amp;gt;/dev/null || true
/bin/touch /var/www/gitorious.osdev.co.th/gitorious/tmp/restart.txt &amp;gt; /dev/null 2&amp;gt;/dev/null || true
endscript
}
&lt;/pre&gt;&lt;b&gt;สร้าง git system user&lt;/b&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;adduser --system --home /home/git/ --group --shell /bin/bash g
chown -R git:git /home/git
passwd git #ใส่ password ตามต้องการ
sudo usermod -a -G git www-data
sudo chown -R git:git /var/www/gitorious.osdev.co.th
&lt;/pre&gt;&lt;b&gt;set init script ให้รันเมื่อ start up&lt;/b&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;cd /var/www/gitorious.osdev.co.th/gitorious
chown -R git:git config/environment.rb script/poller log tmp
chmod -R g+w config/environment.rb script/poller log tmp
chmod ug+x script/poller

chown git:git /etc/init.d/git-ultrasphinx
chown git:git /etc/init.d/git-daemon
chown git:git /etc/init.d/stomp
chown git:git /etc/init.d/git-poller
chmod 755 /etc/init.d/git-ultrasphinx
chmod 755 /etc/init.d/git-daemon
chmod 755 /etc/init.d/stomp
chmod 755 /etc/init.d/git-poller
update-rc.d stomp defaults
update-rc.d git-daemon defaults
update-rc.d git-ultrasphinx defaults
update-rc.d git-poller defaults
&lt;/pre&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt; Config Apache2&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt; ติดตั้ง passenger module สำหรับ apache&lt;/b&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;/var/lib/gems/1.8/bin/passenger-install-apache2-module
&lt;/pre&gt;&lt;b&gt;สร้างไฟล์ passenger.load สำหรับ module ของ apache&lt;/b&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;vim /etc/apache2/mods-available/passenger.load&lt;/pre&gt;โดยมี content (ส่วนนี้อาจเปลี่ยนไปตาม passenger version)&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-3.0.8/ext/apache2/mod_passenger.so
PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-3.0.8
PassengerRuby /usr/bin/ruby1.8
&lt;/pre&gt;&lt;b&gt;Enable module ที่จำเป็น&lt;/b&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;/usr/sbin/a2enmod passenger
/usr/sbin/a2enmod rewrite
/usr/sbin/a2enmod ssl
&lt;/pre&gt;&lt;b&gt;Enable SSL site&lt;/b&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;/usr/sbin/a2ensite default-ssl
&lt;/pre&gt;&lt;b&gt;Restart Apache&lt;/b&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;/etc/init.d/apache2 restart
&lt;/pre&gt;&lt;b&gt;สร้าง site gitorious&lt;/b&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;vim /etc/apache2/sites-available/gitorious&lt;/pre&gt;&lt;pre class=&quot;brush:bash&quot;&gt;&lt;virtualhost *:80=&quot;&quot;&gt;
ServerName gitorious.osdev.co.th
DocumentRoot /var/www/gitorious.bluequartz.net/gitorious/public

# Enable X-SendFile for gitorious repo archiving to work
XSendFile on
XSendFileAllowAbove on

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
#
LogFormat &quot;%h %l %u %t \&quot;%r\&quot; %&amp;gt;s %b \&quot;%{Referer}i\&quot; \&quot;%{User-Agent}i\&quot;&quot; combined
LogFormat &quot;%h %l %u %t \&quot;%r\&quot; %&amp;gt;s %b&quot; common
LogFormat &quot;%{Referer}i -&amp;gt; %U&quot; referer
LogFormat &quot;%{User-agent}i&quot; agent

CustomLog /var/log/apache2/gitorious_access.log combined
TransferLog /var/log/apache2/gitorious_access.log
ErrorLog /var/log/apache2/gitorious_error.log
&lt;/virtualhost&gt;
&lt;/pre&gt;&lt;b&gt;สร้าง site gitorious-ssl&lt;/b&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;vim /etc/apache2/sites-available/gitorious-ssl&lt;/pre&gt;&lt;pre class=&quot;brush:bash&quot;&gt;&lt;ifmodule mod_ssl.c=&quot;&quot;&gt;
&lt;virtualhost _default_:443=&quot;&quot;&gt;
SSLEngine on
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
BrowserMatch &quot;.*MSIE.*&quot; nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
DocumentRoot /var/www/gitorious.osdev.co.th/gitorious/public

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
#
LogFormat &quot;%h %l %u %t \&quot;%r\&quot; %&amp;gt;s %b \&quot;%{Referer}i\&quot; \&quot;%{User-Agent}i\&quot;&quot; combined
LogFormat &quot;%h %l %u %t \&quot;%r\&quot; %&amp;gt;s %b&quot; common
LogFormat &quot;%{Referer}i -&amp;gt; %U&quot; referer
LogFormat &quot;%{User-agent}i&quot; agent

CustomLog /var/log/apache2/gitorious_ssl_access.log combined
TransferLog /var/log/apache2/gitorious_ssl_access.log
ErrorLog /var/log/apache2/gitorious_ssl_error.log&lt;/virtualhost&gt;&lt;/ifmodule&gt;
&lt;/pre&gt;&lt;b&gt;Disable default SSL site และ enable the Gitorious sites&lt;/b&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;/usr/sbin/a2dissite default
/usr/sbin/a2dissite default-ssl
/usr/sbin/a2ensite gitorious
/usr/sbin/a2ensite gitorious-ssl
&lt;/pre&gt;&lt;b&gt;สร้าง repository directory &lt;/b&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;su git
cd ~
mkdir .ssh
touch .ssh/authorized_keys
chmod 700 .ssh
chmod 600 .ssh/authorized_keys
mkdir repositories
mkdir tarballs
mkdir tarballs-work
chmod ug+rwx repositories
echo &quot;export PATH=$PATH:/var/www/gitorious.osdev.co.th/gitorious/script&quot; &amp;gt; ~/.bashrc
&lt;/pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Configure Gitorious&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&lt;pre class=&quot;brush:bash&quot;&gt;cd /var/www/gitorious.osdev.co.th/gitorious
mkdir tmp/pids
cp config/database.sample.yml config/database.yml
cp config/gitorious.sample.yml config/gitorious.yml
cp config/broker.yml.example config/broker.yml
&lt;/pre&gt;&lt;b&gt;แก้ไขไฟล์ config/gitorious.yml&lt;/b&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;vim /var/www/gitorious.osdev.co.th/gitorious/config/gitorious.yml
&lt;/pre&gt;&lt;pre class=&quot;brush:bash&quot;&gt;#  Remove every section but production
# Be sure if you paste a generated secret key using apg -m 64 that you clean up
# any line breaks. The secret key that is pasted should be on a SINGLE line.
production:

# ให้รันคำสั่ง apg -m 64 แล้วนำผลลัพธ์ที่ได้มา paste ที่ cookie_secret
cookie_secret: urbecpajicEvpigdiOlqueDracpevyerbEmDecetsendeehurEjShucJox8Ojit4WaWrinyienderdalyaifugNeahatdashyunnamFucwerdolfyedyeactEjEajIb5IksEytkurewsEetAiwirtEkfedtheebyatNoganyoofBabikOcyemEshvovHasojTropsyengyegidzyggEdamCasdijHegdeasfudCovmenpobdywajcycsuchDabr2NadUlHighEisyoilmojliawgOdAcyimpifCaiWumtangEvzueshjajOtFuciddEbWhoivedesjetockVemOdEvnooquoncoapCaQuavnelkoijfudcatfezUlreylbUd

# The path where git repositories are stored. The actual (bare) repositories resides
# in repository_base_path/#{project.slug}/#{repository.name}.git/:
repository_base_path: &quot;/home/git/repositories&quot;

# Stuff that&#39;s in the html . custom stats javascript code etc
extra_html_head_data:

# System message that will appear on all pages if present
system_message:

# Port the ./script/gitorious script should use which should be
# the same port that the web server is running on. In Some development
# environments you may see 3000 for the value. For production
# servers you should use the same port as your web server.
gitorious_client_port: 80

# Host the ./script/gitorious script should use:
gitorious_client_host: gitorious.bluequartz.net

# Host which is serving the gitorious app, eg &quot;gitorious.org&quot;
gitorious_host: gitorious.bluequartz.net

# System User which is running git daemon
gitorious_user: git

# Email spam on server errors to:
# You probably want this during development or when you are trying to debug
# an installation that is not working correctly.
exception_notification_emails: mike.jackson@bluequartz.net

# Mangle visible e-mail addresses (spam protection)
mangle_email_addresses: true

# Enable or Disable Public Mode (true) or Private Mode (false)
public_mode: true

# Define your locale
locale: en

# Where should we store generated tarballs?
# (should be readable by webserver, since we tell it to send the file using X-Sendfile)
archive_cache_dir: &quot;/Users/git/tarballs&quot;

# Which directory should we work in when we generate tarballs, before moving
# them to the above dir?
archive_work_dir: &quot;/Users/git/tarballs-work&quot;

# is it only site admins who can create new projects?
only_site_admins_can_create_projects: false

# Should we hide HTTP clone urls?
hide_http_clone_urls: false

# Is this gitorious.org? Read: should we have a very flashy homepage?
is_gitorious_dot_org: false

# Pick a default license
#default_license: GNU Affero General Public License (AGPLv3)
&lt;/pre&gt;&lt;b&gt;แก้ไขไฟล์ config/database.yml&lt;/b&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;vim /var/www/gitorious.osdev.co.th/gitorious/config/database.yml
&lt;/pre&gt;&lt;pre class=&quot;brush:bash&quot;&gt;# Remove every section but production
# Make sure the &#39;production&#39; section is the following
production:
adapter: mysql
database: gitorious
username: git
password: [secret]
host: localhost
encoding: utf8
reconnect = true
&lt;/pre&gt;&lt;b&gt;สร้าง SQL User&lt;/b&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;su git
mysql -uroot -p
mysql&amp;gt; CREATE USER &#39;git&#39;@&#39;localhost&#39; IDENTIFIED BY &#39;******&#39;;
mysql&amp;gt; GRANT ALL PRIVILEGES ON * . * TO  &#39;git&#39;@&#39;localhost&#39; IDENTIFIED BY  &#39;******&#39; WITH GRANT OPTION MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0;
mysql&amp;gt; GRANT ALL PRIVILEGES ON `gitorious` .* TO &#39;git&#39;@&#39;localhost&#39;;
mysql&amp;gt; quit
&lt;/pre&gt;&lt;b&gt;Create the Gitorious Databases&lt;/b&gt;&lt;br /&gt;
ให้ใช้ user root ไปที่ cd /var/www/gitorious.osdev.co.th/gitorious แล้วรันคำสั่ง&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;bundle install
&lt;/pre&gt;จากนั้นให้ใช้ user git รันคำสั่ง&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;su git
cd /var/www/
chmod go-w gitorious.osdev.co.th
cd gitorious.osdev.co.th/gitorious
vim Rakefile
&lt;/pre&gt;ให้เพิ่ม require &#39;thread&#39; เข้าไปด้านบนสุดของส่วน require&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;bundle exec rake db:create RAILS_ENV=production
bundle exec rake db:migrate RAILS_ENV=production
&lt;/pre&gt;&lt;b&gt;สร้าง Gitorious Admin User&lt;/b&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;cd /var/www/gitorious.osdev.co.th/gitorious
vim vendor/rails/activesupport/lib/active_support.rb
&lt;/pre&gt;ให้เพิ่มส่วน require &#39;thread&#39; เข้าไปด้านบนสุดของส่วน require&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;env RAILS_ENV=production /usr/bin/ruby1.8 script/create_admin
&lt;/pre&gt;ให้ใส่ admin email และ password ที่ต้องการ&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;b&gt; Configure Sphinx Search Daemon&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;pre class=&quot;brush:bash&quot;&gt;vim /var/www/gitorious.osdev.co.th/gitorious/config/ultrasphinx/default.base
&lt;/pre&gt;แก้ไขในส่วน&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;# Daemon options
searchd
{
# What interface the search daemon should listen on and where to store its logs
address = 0.0.0.0
port = 3312
.......
&lt;/pre&gt;ให้เป็น&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;# Daemon options
searchd
{
# What interface the search daemon should listen on and where to store its logs
address = localhost
port = 3312
.......
&lt;/pre&gt;&lt;b&gt;load configurations เข้าไปใน ruby files&lt;/b&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;cd /var/www/gitorious.osdev.co.th/gitorious
bundle exec rake ultrasphinx:bootstrap RAILS_ENV=production
bundle exec rake ultrasphinx:spelling:build RAILS_ENV=production
&lt;/pre&gt;&lt;b&gt;Set permissions อีกครั้งเพื่อความชัวร์&lt;/b&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;cd /var/www/gitorious.osdev.co.th/gitorious
chown -R git:git config/environment.rb script/poller log tmp
chmod -R g+w config/environment.rb script/poller log tmp
chmod ug+x script/poller
&lt;/pre&gt;&lt;b&gt;Setup Cron Job&lt;/b&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;su git
crontab -e
* */1 * * * cd /var/www/gitorious.bluequartz.net/gitorious &amp;amp;&amp;amp; rake ultrasphinx:index RAILS_ENV=production
&lt;/pre&gt;reference&amp;nbsp;&lt;a href=&quot;http://www.bluequartz.net/projects/EIM_Segmentation/SCMService/html/gitorious___ubuntu__setup.html&quot;&gt;http://www.bluequartz.net/&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.leknarm.com/feeds/7693639155756513954/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://www.leknarm.com/2011/08/install-gitorious-ubuntu-1004-lts.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default/7693639155756513954'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default/7693639155756513954'/><link rel='alternate' type='text/html' href='http://www.leknarm.com/2011/08/install-gitorious-ubuntu-1004-lts.html' title='Install Gitorious บน Ubuntu 10.04 LTS'/><author><name>leknarm</name><uri>http://www.blogger.com/profile/16051950622231030493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-57392424587537905.post-8967554828795370510</id><published>2011-07-18T22:33:00.000+07:00</published><updated>2011-07-18T22:33:00.782+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="convert"/><category scheme="http://www.blogger.com/atom/ns#" term="convert digit"/><category scheme="http://www.blogger.com/atom/ns#" term="convert thai number"/><category scheme="http://www.blogger.com/atom/ns#" term="LibreOffice"/><category scheme="http://www.blogger.com/atom/ns#" term="OpenOffice"/><category scheme="http://www.blogger.com/atom/ns#" term="OpenOffice.org"/><category scheme="http://www.blogger.com/atom/ns#" term="Osdev"/><category scheme="http://www.blogger.com/atom/ns#" term="thai"/><category scheme="http://www.blogger.com/atom/ns#" term="แปลงเลข"/><category scheme="http://www.blogger.com/atom/ns#" term="แปลงเลขไทย"/><title type='text'>แปลงเลขอาราบิกให้เป็นเลขไทยใน LibreOffice/OpenOffice.org</title><content type='html'>จาก post &lt;a href=&quot;http://www.leknarm.com/2010/10/openofficeorg-writer.html%20&quot;&gt;http://www.leknarm.com/2010/10/openofficeorg-writer.html&lt;/a&gt; ผมได้เขียนมาโครง่ายๆ และได้ทำเป็น extension ไว้ให้ลองเล่นกันแล้ว แต่ว่ามี bug อยู่จำนวนมาก และจากงาน OpenOffice.org Codefest#9 ก็ได้มีเพื่อนๆ ช่วยกันพัฒนา extension นี้จนสมบูรณ์ขึ้นมา&lt;br /&gt;
&lt;br /&gt;
แต่ระหว่างที่ผมกำลัง review และปรับปรุง extension อยู่นั้นก็ได้เกิดเหตุการที่ไม่คาดฝันขึ้น มีบุคคลนึงเอา extension จาก post ที่กล่าวมาเอาไป publish ที่ OpenOffice.org Extensions เฉยเลย &lt;br /&gt;
http://extensions.services.openoffice.org/en/project/thai-number-converter (ไม่ขอทำเป็น link นะครับเพราะ SEO) น่าเศร้าใจเป็นที่สุด&lt;br /&gt;
&lt;br /&gt;
แต่ตอนนี้ทางทีมก็ได้ publish extension ที่แก้ไขและปรับปรุงเรียบร้อยแล้วไว้ที่ &lt;a href=&quot;http://extensions.services.openoffice.org/project/convertdigit&quot;&gt;http://extensions.services.openoffice.org/project/convertdigit&lt;/a&gt; ทุกท่านสามารถ download และทดลองใช้ได้เลยครับ หากมี bug หรือ comment ในส่วนไหนสามารถ comment ได้ที่ extension หรือที่ blog นี้ก็ได้ครับ</content><link rel='replies' type='application/atom+xml' href='http://www.leknarm.com/feeds/8967554828795370510/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://www.leknarm.com/2011/07/libreofficeopenofficeorg.html#comment-form' title='2 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default/8967554828795370510'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default/8967554828795370510'/><link rel='alternate' type='text/html' href='http://www.leknarm.com/2011/07/libreofficeopenofficeorg.html' title='แปลงเลขอาราบิกให้เป็นเลขไทยใน LibreOffice/OpenOffice.org'/><author><name>leknarm</name><uri>http://www.blogger.com/profile/16051950622231030493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-57392424587537905.post-3866908081605744054</id><published>2011-05-19T15:59:00.003+07:00</published><updated>2011-08-31T09:43:20.549+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="drupal"/><category scheme="http://www.blogger.com/atom/ns#" term="embed"/><category scheme="http://www.blogger.com/atom/ns#" term="embedded"/><category scheme="http://www.blogger.com/atom/ns#" term="view"/><title type='text'>การ embedded view ลงใน content บน drupal</title><content type='html'>โจทย์คือต้องการแสดงผลของ view หลายๆ view ในหน้าเดียวจะทำอย่างไร?&lt;br /&gt;
&lt;br /&gt;
ก่อนอื่นผมได้ลองหา module เกี่ยวกับการ embedded view แล้วหาเท่าไรก็หาไม่เจอ ที่เจอก็ใช้ยากหรือใช้ไม่ได้เลย คราวนี้ก็เลยต้องมาหา API ในการเรียกใช้มันแทน ปรากฏว่าง่ายกว่าที่คิดเยอะ ทำให้รู้เลยว่าทำไมเขาไม่ทำเป็น module กัน&lt;br /&gt;
&lt;br /&gt;
วิธีการ embedded มีดังนี้&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: php&quot;&gt;&amp;lt;?php
&amp;nbsp; $viewName = &#39;viewname&#39;;
&amp;nbsp; print views_embed_view($viewName);
?&amp;gt;&lt;/pre&gt;&lt;br /&gt;
แค่นี้เราก็สามารถ embedded view เข้าไปใน page หรือ story ได้แล้วครับ&lt;br /&gt;
&lt;br /&gt;
ที่มา - &lt;a href=&quot;http://thedrupalblog.com/embedding-view-drupal-6-using-views-embed-view&quot;&gt;thedrupalblog.com&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.leknarm.com/feeds/3866908081605744054/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://www.leknarm.com/2011/05/embedded-view-content-drupal.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default/3866908081605744054'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default/3866908081605744054'/><link rel='alternate' type='text/html' href='http://www.leknarm.com/2011/05/embedded-view-content-drupal.html' title='การ embedded view ลงใน content บน drupal'/><author><name>leknarm</name><uri>http://www.blogger.com/profile/16051950622231030493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-57392424587537905.post-1786756954032456727</id><published>2011-05-11T11:21:00.000+07:00</published><updated>2011-05-11T11:21:21.144+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="DispatchHelper"/><category scheme="http://www.blogger.com/atom/ns#" term="extension"/><category scheme="http://www.blogger.com/atom/ns#" term="extensions"/><category scheme="http://www.blogger.com/atom/ns#" term="LibreOffice"/><category scheme="http://www.blogger.com/atom/ns#" term="Menubar"/><category scheme="http://www.blogger.com/atom/ns#" term="Merge"/><category scheme="http://www.blogger.com/atom/ns#" term="MergePoint"/><category scheme="http://www.blogger.com/atom/ns#" term="Merging"/><category scheme="http://www.blogger.com/atom/ns#" term="Toolbar"/><category scheme="http://www.blogger.com/atom/ns#" term="UNO"/><category scheme="http://www.blogger.com/atom/ns#" term="UNO function"/><category scheme="http://www.blogger.com/atom/ns#" term="ลิเบอร์"/><category scheme="http://www.blogger.com/atom/ns#" term="เมนู"/><title type='text'>การทำ Menu/Toolbar Merging บน LibreOffice</title><content type='html'>จาก&amp;nbsp;&lt;a href=&quot;http://www.leknarm.com/2009/07/openofficeorg-menubar-merging.html&quot;&gt;http://www.leknarm.com/2009/07/openofficeorg-menubar-merging.html&lt;/a&gt;&amp;nbsp;ผมได้เขียนวิธีการทำ Menubar/Toolbar Merging ไว้แต่การที่จะกำหนด MergePoint ได้นั้นจะต้องรู้ก่อนว่า Menubar นั้นๆ หรือ Toolbar นั้นๆ มี UNO function ชื่อว่าอะไร&lt;br /&gt;
&lt;br /&gt;
แต่ document เกี่ยวกับ UNO function หรือ DispatchHelper นั้นหาได้ยากยิ่ง &lt;a href=&quot;http://sites.google.com/site/leknarm/files/HOW-TOUseDispatchHelper%28ru%29.odt?attredirects=0&amp;amp;d=1&quot;&gt;UNO function Russian document&lt;/a&gt; (ยิ่งกว่าหา M$ เถื่อน) และถึงจะหามาได้ก็ไม่รู้อยู่ดีว่า UNO function ที่ได้มานั้นเป็นการทำงานส่วนไหน&lt;br /&gt;
&lt;br /&gt;
ถ้าการหา document นั้นมันยากเราก็เข้าไปดูใน LibreOffice เลยสิเพราะเนื่องจากโครงสร้างของ Menu/Toolbar ของ LibreOffice นั้นเป็นลักษณะ xml ที่ Override กันอยู่เป็นชั้นๆ ซึ่งลองหาดูก็พบ Menu/Toolbar configuration อยู่ที่ LibO_HOME/Basis/share/config/soffice.cfg/modules/[program]&lt;br /&gt;
&lt;br /&gt;
หากลองเข้าไปดูจะเห็นโครงสร้างของ Menu/Toolbar เป็นชั้นๆ ซึ่งเราสามารถนำ UNO function ที่กำหนดอยู่ในนั้นมากำหนดเป็น MergePoint ใน extensions เราได้เลยครับ</content><link rel='replies' type='application/atom+xml' href='http://www.leknarm.com/feeds/1786756954032456727/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://www.leknarm.com/2011/05/menutoolbar-merging-libreoffice.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default/1786756954032456727'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default/1786756954032456727'/><link rel='alternate' type='text/html' href='http://www.leknarm.com/2011/05/menutoolbar-merging-libreoffice.html' title='การทำ Menu/Toolbar Merging บน LibreOffice'/><author><name>leknarm</name><uri>http://www.blogger.com/profile/16051950622231030493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-57392424587537905.post-1213121652571491028</id><published>2011-04-18T15:34:00.001+07:00</published><updated>2011-08-31T09:45:12.340+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mysql"/><category scheme="http://www.blogger.com/atom/ns#" term="replace"/><category scheme="http://www.blogger.com/atom/ns#" term="search"/><title type='text'>การ search &amp; replace ใน MySQL</title><content type='html'>เผอิญต้อง search &amp;amp; replace ใน MySQL เลยไปค้นดูปรากฏว่าใช้แค่บรรทัดเดียวคือ&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: sql&quot;&gt;update [table_name] set [field_name] = replace([field_name],&#39;[string_to_find]&#39;,&#39;[string_to_replace]&#39;);&lt;/pre&gt;&lt;br /&gt;
ที่มา &lt;a href=&quot;http://www.mediacollege.com/computer/database/mysql/find-replace.html&quot;&gt;mediacollege&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.leknarm.com/feeds/1213121652571491028/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://www.leknarm.com/2011/04/search-replace-mysql.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default/1213121652571491028'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default/1213121652571491028'/><link rel='alternate' type='text/html' href='http://www.leknarm.com/2011/04/search-replace-mysql.html' title='การ search &amp; replace ใน MySQL'/><author><name>leknarm</name><uri>http://www.blogger.com/profile/16051950622231030493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-57392424587537905.post-2428779795486886547</id><published>2011-02-24T12:26:00.000+07:00</published><updated>2011-02-24T12:26:29.268+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="dhas"/><category scheme="http://www.blogger.com/atom/ns#" term="label"/><category scheme="http://www.blogger.com/atom/ns#" term="labellion"/><category scheme="http://www.blogger.com/atom/ns#" term="thai"/><title type='text'>Thai labels for LibreOffice และ OpenOffice.org</title><content type='html'>วันนี้ขอมาเขียนสั้นๆ ครับเนื่องจากได้เคยทำ extensions label ไว้นานแล้ว เป็น extensions ที่ติดตั้ง size กระดาษที่เป็น label ที่มีขายอยู่ในประเทศไทย สามารถ download ได้จาก&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://extensions.services.openoffice.org/project/thailabels&quot;&gt;http://extensions.services.openoffice.org/project/thailabels&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
ซึ่งที่ได้ทำไปมีอยู่ 2 ยี่ห้อครับคือ labellion และตราช้างนะครับ&lt;br /&gt;
ลองเอาไป download ใช้กันดูนะครับ</content><link rel='replies' type='application/atom+xml' href='http://www.leknarm.com/feeds/2428779795486886547/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://www.leknarm.com/2011/02/thai-labels-for-libreoffice.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default/2428779795486886547'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default/2428779795486886547'/><link rel='alternate' type='text/html' href='http://www.leknarm.com/2011/02/thai-labels-for-libreoffice.html' title='Thai labels for LibreOffice และ OpenOffice.org'/><author><name>leknarm</name><uri>http://www.blogger.com/profile/16051950622231030493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-57392424587537905.post-2495043267596631</id><published>2011-02-07T17:04:00.000+07:00</published><updated>2011-02-07T17:04:45.087+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="debug"/><category scheme="http://www.blogger.com/atom/ns#" term="java openoffice.org"/><category scheme="http://www.blogger.com/atom/ns#" term="libo"/><category scheme="http://www.blogger.com/atom/ns#" term="LibreOffice"/><category scheme="http://www.blogger.com/atom/ns#" term="ooo"/><title type='text'>วิธีการ debug LibreOffice/OpenOffice.org ด้วย Visual Studio</title><content type='html'>การ debug LibO หรือ OOo บน Windows นั้นมีอยู่หลายวิธีด้วยกันแต่ผมจะขอนำวิธีการใช้ Visual Studio มาเล่าให้ฟังละกันครับ เพราะว่ามันสามารถตอบโจทย์การ debug ครั้งนี้ได้&lt;br /&gt;
&lt;br /&gt;
ขอเล่าวิธีการทั่วไปหากต้องการ debug ก่อนครับ ก่อนอื่นหากเราต้องการ debug code ในส่วนใดเราจำเป็นต้อง build module นั้นๆ ด้วย parameter debug=true ก่อนแล้ว copy output ไปไว้ที่ LibO/OOo Installation folder (copy &amp;lt;module name&amp;gt;/&amp;lt;output folder&amp;gt;/bin/*.dll ไปไว้ที่ &amp;lt;LibO Root&amp;gt;/program/)&lt;br /&gt;
&lt;br /&gt;
โจทย์ในครั้งนี้คือ ต้อง debug code ในส่วนตอนเริ่มโปรแกรม ซึ่งการ Attach to process ธรรมดาไม่สามารถใช้งานได้ เนื่องจากกว่าเราจะได้ Attach to process, program มันก็ถูกรันไปเรียบร้อยแล้ว&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
อีกทั้ง LibO และ OOo ตัว binary จริงๆ นั้นไม่ใช่ exe ไฟล์แต่เป็น bin(soffice.bin) ซึ่งตามปรกติแล้ว Visual Studio ไม่สามารถเปิดไฟล์ชนิดดังกล่าวได้ ดังนั้นเราจึงจำเป็นต้อง rename soffice.bin ให้กลายเป็น .exe ซะหรือจะใส่นามสกุลเพิ่มไปเลยก็ได้ (soffice.bin.exe)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
จากนั้นให้ไปเพิ่ม path ที่จำเป็นเข้าไปใน Windows ด้วยซึ่ง path ที่ต้องเพิ่มมีดังนี้&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;&amp;lt;LibO Root&amp;gt;\URE\bin&lt;/li&gt;
&lt;li&gt;&amp;lt;LibO Root&amp;gt;\Basis\program&lt;/li&gt;
&lt;/ol&gt;เมื่อเพิ่ม path เรียบร้อยแล้ว ก็สามารถ debug ได้ตามปรกติเลยครับ</content><link rel='replies' type='application/atom+xml' href='http://www.leknarm.com/feeds/2495043267596631/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://www.leknarm.com/2011/02/debug-libreofficeopenofficeorg-visual.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default/2495043267596631'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default/2495043267596631'/><link rel='alternate' type='text/html' href='http://www.leknarm.com/2011/02/debug-libreofficeopenofficeorg-visual.html' title='วิธีการ debug LibreOffice/OpenOffice.org ด้วย Visual Studio'/><author><name>leknarm</name><uri>http://www.blogger.com/profile/16051950622231030493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-57392424587537905.post-506367979304345872</id><published>2011-02-04T13:39:00.003+07:00</published><updated>2011-02-04T13:51:39.893+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="7"/><category scheme="http://www.blogger.com/atom/ns#" term="LibreOffice"/><category scheme="http://www.blogger.com/atom/ns#" term="OpenOffice.org"/><category scheme="http://www.blogger.com/atom/ns#" term="vista"/><category scheme="http://www.blogger.com/atom/ns#" term="windows"/><category scheme="http://www.blogger.com/atom/ns#" term="ตัวอักษรซ้อน"/><title type='text'>แก้ปัญหา Font ภาษาไทยซ้อนกันบน OpenOffice.org และ LibreOffice</title><content type='html'>จากปัญหา &lt;a href=&quot;http://www.leknarm.com/2009/11/openofficeorg-calc-windows-7.html&quot;&gt;http://www.leknarm.com/2009/11/openofficeorg-calc-windows-7.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
จากตอนแรกเดาปัญหาว่าเกิดจากการที่ตัว OpenOffice.org หรือ LibreOffice เมื่อใช้งาน UI font ของ Windows จะทำให้แสดงผลได้ผิดพลาดเนื่องจาก font ที่ใช้เป็น UI ของ Windows นั้นไม่มี gryph ไทยซึ่งก็จริงตามนั้น แต่หากใน OOo หรือ LibO ไม่ได้ใช้ Use system font for user interface มันควรจะใช้ได้แต่ดันไม่ได้&lt;br /&gt;
&lt;br /&gt;
ปัญหาที่แท้จริงนั้นเกิดจาก default font ที่ใช้เป็น UI ของ OOo และ LibO นั้นใช้เป็น Andale Sans UI ซึ่งเป็น font ของ StarOffice แต่เนื่องจากเราไม่ได้ใช้ version StarOffice จึงทำให้เราไม่มี font ดังกล่าว&lt;br /&gt;
&lt;br /&gt;
ปัญหานี่สามารถแก้ไขได้ 2 วิธีคือ&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;ไปแก้ที่ default font ใน project officecfg โดยให้ default font นั้นเป็น font อื่นที่มี gryph ครบทุกภาษา&lt;/li&gt;
&lt;li&gt;แก้ replacement table ซึ่งมีขั้นตอนดังนี้&lt;/li&gt;
&lt;ol&gt;&lt;li&gt;ไปที่เมนู Tools &amp;gt; Option &amp;gt; LibreOffice(OpenOffice.org) &amp;gt; Fonts&amp;nbsp;&lt;/li&gt;
&lt;li&gt;เลือก Apply replacement table แล้ว replace font จาก Andale Sans UI ไปเป็น Tahoma หรือ font อื่นๆ ที่ชอบ&amp;nbsp;&lt;/li&gt;
&lt;li&gt;แล้วกดเครื่องหมายถูกด้านขวาจะได้ font replace ไปอยู่ในกล่องด้านล่าง&lt;/li&gt;
&lt;li&gt;คลิกเครื่องหมายถูกหน้า Always แล้วกด OK&lt;/li&gt;
&lt;/ol&gt;&lt;/ol&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEim5CAMofioLgJk14HYM5fD08RZqtrkCfG72id7qsxOPRTR-idVTsfJULg8_btyQfj5Vt9_Vtz941nIt29wRtJ6l64nJd7Lf6W-1ULDn53KS0618V4GzYe6xIrRo2nZ7u6il3sIfo9D4zs/s1600/font-replacement-table.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;170&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEim5CAMofioLgJk14HYM5fD08RZqtrkCfG72id7qsxOPRTR-idVTsfJULg8_btyQfj5Vt9_Vtz941nIt29wRtJ6l64nJd7Lf6W-1ULDn53KS0618V4GzYe6xIrRo2nZ7u6il3sIfo9D4zs/s320/font-replacement-table.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
แค่นี้เราก็สามารถใช้งานภาษาไทยบน LibO และ OOo ได้อย่างมีความสุขแล้ว&lt;br /&gt;
&lt;br /&gt;
อ่อลืมบอกไป ต้องไม่ใช้ Use system font for user interface ด้วยนะครับโดยปิดที่&lt;br /&gt;
Tools &amp;gt; Option &amp;gt; LibreOffice &amp;gt; View แล้วเลือกเครื่องหมาถูกหน้า Use system font for user interface ออกครับ</content><link rel='replies' type='application/atom+xml' href='http://www.leknarm.com/feeds/506367979304345872/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://www.leknarm.com/2011/02/font-openofficeorg-libreoffice.html#comment-form' title='4 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default/506367979304345872'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/57392424587537905/posts/default/506367979304345872'/><link rel='alternate' type='text/html' href='http://www.leknarm.com/2011/02/font-openofficeorg-libreoffice.html' title='แก้ปัญหา Font ภาษาไทยซ้อนกันบน OpenOffice.org และ LibreOffice'/><author><name>leknarm</name><uri>http://www.blogger.com/profile/16051950622231030493</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEim5CAMofioLgJk14HYM5fD08RZqtrkCfG72id7qsxOPRTR-idVTsfJULg8_btyQfj5Vt9_Vtz941nIt29wRtJ6l64nJd7Lf6W-1ULDn53KS0618V4GzYe6xIrRo2nZ7u6il3sIfo9D4zs/s72-c/font-replacement-table.png" height="72" width="72"/><thr:total>4</thr:total></entry></feed>