scribefire กับ wordpress

หลังจากพยายามค้นหาโปรแกรมสำหรับแก้ไขจัดการบล็อก ที่มีลูกเล่นสำคัญอันหนึ่งคือ drag n drop คือ ลากภาพมาใช้ในบล็อกได้เลยแล้วตัวโปรแกรมจะทำการ upload รูปนั้นพร้อมทั้งจัดการลิงค์ไปให้ ซึ่งใช้ได้บนลีนุกซ์ลองมาหลายตัว ทั้ง bloGTK Lekhonee QTM สุดท้ายมาลงที่ scribefire ซึ่งเป็น extension ของ mozilla firefox

จริง ๆ แล้ว scribefire มีรุ่นเบต้า ซึ่งเป็น extension ของ google chrome ด้วย แต่เราไม่พูดถึง เนื่องจากฟีเจอร์ drag n drop ยังใช้ไม่ได้
พอเริ่มติดตั้งแล้วเริ่มใช้ ก็พบปัญหาสำคัญของ extension นี้อย่างนึงก็คือ มันเข้ารหัสภาษาไทยผิดทุกที่ ๆ เป็นภาษาไทยจะกลายเป็นอักขระประหลาดไปหมด พอจะหาวิธีเลือกเปลี่ยน encoding ก็หาที่เปลี่ยนไม่ได้ สุดท้ายจึงต้องทำการแก้ที่ต้นเหตุครับ คือสันนิษฐานว่าปัญหาเกิดจากการที่ scribefire มัน detect ภาษาใน post หรือ หัวข้อของเราผิดพลาด ดังนั้นการแก้ผมจึงใช้วิธีแก้ไฟล์ xmlrpc.js ในไฟล์ scribefire.jar เสียใหม่ โดยยกเลิกการ encode  เป็น unicode โดย ทำการเพิ่ม คอมเม้นในบรรทัด สามบรรทัด ดังแสดงข้างล่าง แล้วบันทึกไฟล์ทับของเดิมลงไป

try {
     //theTitle = unicodeConverter.ConvertToUnicode(theTitle);
 } catch (e) { } 
  try {
      //theContent = unicodeConverter.ConvertToUnicode(theContent);
 } catch (e) { }
  try {
      /theTags = unicodeConverter.ConvertToUnicode(theTags);

after edit

Enhanced by Zemanta

ใส่ความเห็น

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / เปลี่ยนแปลง )

Twitter picture

You are commenting using your Twitter account. Log Out / เปลี่ยนแปลง )

Facebook photo

You are commenting using your Facebook account. Log Out / เปลี่ยนแปลง )

Connecting to %s