Monday, March 23, 2015

มาใส่ Bootstrap Tags Input ให้เว็บดูดี



<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
    <title>Bootstrap Tagsinput</title>

    <!-- Bootstrap -->
    <link href="css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="css/bootstrap-tagsinput/bootstrap-tagsinput.css">


  </head>
  <body>
    <h1>Hello, world!</h1>
<input type="text" value="Amsterdam,Washington,Sydney,Beijing,Cairo" data-role="tagsinput">


    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="js/bootstrap.min.js"></script>
<script src="js/bootstrap-tagsinput/bootstrap-tagsinput.js"></script>

  </body>
</html>

ที่มา:http://timschlechter.github.io/bootstrap-tagsinput/examples/

Tuesday, July 23, 2013

วิธีใช้ Google Search Operators มีประโยชน์กับ SEO อย่างไร



Find Websites where you can find industry resources:

Keyword + “top 10 resources”/”top resources”
Keyword + “top 10 sites/”top sites”
Keyword + “top 10 websites”/”top websites”
Keyword + “top 10 articles”/ “top articles”
Keyword + “top 10 tools”/”top tools”
Keyword + “top 10 web resources”/”top web resources”
Keyword + “top 10 internet resources”/”top internet resources”
Keyword + “top 10 online resources”/”top online resources”

Keyword + “recommended resources”/”suggested resources”
Keyword + “useful resources”/”interesting resources”
Keyword + “favorite resources”
Keyword + “recommended sites”/”suggested sites”
Keyword + “useful sites”/”interesting sites”
Keyword + “favorite sites”
Keyword + “recommended websites”/”suggested websites”
Keyword + “useful websites”/”interesting websites”
Keyword + “favorite websites”
Keyword + “recommended articles”/”suggested articles”
Keyword + “useful articles”/”interesting articles”
Keyword + “favorite articles”
Keyword + “recommended tools”/”suggested tools”
Keyword + “useful tools”/”interesting tools”
Keyword + “favorite tools”
Keyword + “recommended links”/”suggested links”
Keyword + “useful links”/”interesting links”
Keyword + “favorite links”
Keyword + “intitle:resources”
Keyword + “round up”
Keyword + intitle:”round up”
Keyword + “round up” + intitle:weekly/daily/monthly
Keyword + intitle:list
Keyword + “guide”
“list of + Keyword + sites”
Keyword + “news”/”industry news”
Keyword + “magazine”/”industry magazine”
Keyword + “journal”/”industry journal”
Keyword + “whitepapers”
Keyword + “videos”
Keyword + “podcasts”
Keyword + “research”
Keyword + site:.edu
Keyword + site:.info
Keyword + filetype:doc/docx/xls/ppt/pdf
inanchor:keyword
allinanchor:keyword
Keyword +  inurl:links/resources
 ==============================

Wednesday, July 17, 2013

ปกป้องไม่ให้ใครมา Copy เนื้อหาบนเว็บไซต์ของคุณด้วย Authorship Snippets

ทำความรู้จัก Google Authorship Rich Snippets

หลายคนคงจะเคยมีคำถามในใจเวลาเีขียนเนื้อหาลงบนเว็บไซต์ว่า เอ…ถ้าเราเป็นคนแต่งเนื้อหาขึ้นมา แต่มีคนอื่น Copy เนื้อหาเราไปบนเว็บที่ดังกว่า เนื้อหาเราจะกลายเป็นถูกมองว่าเป็นของ Copy หรือไม่ วันนี้ Google ได้หาวิธีแก้ปัญหาตรงนี้มาให้เราแล้วครับ และการใช้ Authorship Rich Snippets ตัวนี้ ยังเป็นผลดีต่อ SEO ด้วยครับ มาดูกันเลย…!
Google Authorship Rich Snippets
Google Authorship Rich Snippets
Authorship rich snippets ประโยชน์ของมันก็คือทำให้เจ้าของเว็บไซต์สามารถ บอก Google ได้ว่า เนื้อหาที่อยู่บนเว็บไซต์นั้นเป็นเนื้อหาที่เป็นต้นฉบับ ทำให้คนที่เอาเนื้อหาเราไปใช้ต่อจะถูก Google มองว่าเป็นเนื้อหาที่มีการถูก copy ไป และจะให้เครดิตที่ดีต่อเว็บไวต์เรามากกว่า
ประโยชน์หลัก 3 ข้อ ของ Authorship Rich Snippets มีดังนี้
1. เพิ่มอัตราคนคลิกเข้าเว็บให้สูงขึ้น (CTR)
ถ้าหากว่าเนื้อหาของเราถูก Google เชื่อมต่อกับ Google Plus profile แล้ว รูปของเราจะมาขึ้นในผลการค้นหาแบบนี้ครับ
ซึ่งจะทำให้เนื้อหาดูน่าสนใจมากยิ่งขึ้น อย่าลืมเอารูปหล่อๆสวยๆ หรือรูปที่ดูน่าสนใจมาขึ้นนะครับ
2. ปกป้องเนื้อหาของเราจากการถูก Copy
Code Authorship Rich Snippets นี้จะบอก Google ว่าเนื้อหาของเรานั้น เราเป็นเจ้าของ
เพราะฉะนั้นถ้าใครนำเนื้อหาเราไป Post ที่อื่น Google จะมองว่าเนื้อหานั้นเป็นของ Copy
เว็บที่เป็นเจ้าของย่อมได้เครดิตดีกว่า
3. เพิ่มความน่าเชื่อถือให้เนื้อหา
ตรงนี้ผมว่าเป็นส่วนที่สำคัญที่สุด ถ้าคนที่กำลังค้นหาเห็นว่าเนื้อหาที่อยู่บนหน้านั้นเราเป็นเจ้าของ
ไม่ได้ไป Copy ที่อื่นมา ผู้ที่เข้ามาอ่านจะรู้สึกเชื่อถือ และจดจำใน Brand ของเราได้ดียิ่งขึ้นครับ
และก็ยังน่าเชื่อถือในสายตา Google มากขึ้นอีกด้วย ส่งผลให้อันดับเราดีขึ้นด้วยครับ
อ่านถึงตรงนี้อย่าเพิ่งกังวลว่าจะทำยากหรือเปล่า ต้องใช้ความรู้อะไรเป็นพิเศษรึเปล่าวิธีทำก็ไม่ได้ยากขนาดนั้นครับ ลองอ่านทำตามไปช้าๆ
เราสามารถทำ Authorship Snippets ได้ด้วยวิธีการ 5 ขั้นตอนดังนี้ครับ
1. เข้าไปที่ link นี้ https://developers.google.com/+/plugins/badge/ แล้ว Gen code ที่ได้ไปติดในเว็บของคุณในทุกหน้า อาจจะติดที่ Footer หรือ Header ก็ได้ครับ
2. หลังจากทำ Step 1 เสร็จแล้วให้เข้าไปที่ link นี้http://www.google.com/webmasters/tools/richsnippets เพื่อตรวจสอบความถูกต้อง
3. หลังจากนั้นเข้าไปทำการ Verify โดยใส่ email address ที่มี domain เดียวกันกับเว็บไซต์ของคุณ เช่น www.ads-now.com ก็ใช้ info@ads-now.com เข้าไปที่ link นี้ครับ (https://plus.google.com/authorship)
4. ไปที่ Google Plus profile ของคุณ ไปที่ส่วน Edit และใส่ domain name ลงใน Contributor to
5. ลองตรวจสอบดูใน link http://www.google.com/webmasters/tools/richsnippets อีกครั้งนึงครับ
6. เรียบร้อยแล้วครับ! ลอง Search ชื่อเว็บไซต์ของคุณอีกครั้งในอีกประมาณ 1-2 สัปดาห์ ก็จะได้ผลลัพธ์ดังรูปด้านบนที่ได้แสดงไปแล้ว

ที่มาข้อมูล http://www.ads-now.com/%E0%B8%9B%E0%B8%81%E0%B8%9B%E0%B9%89%E0%B8%AD%E0%B8%87%E0%B9%84%E0%B8%A1%E0%B9%88%E0%B9%83%E0%B8%AB%E0%B9%89%E0%B9%83%E0%B8%84%E0%B8%A3%E0%B8%A1%E0%B8%B2-copy-%E0%B9%80%E0%B8%99%E0%B8%B7%E0%B9%89/

Tuesday, July 16, 2013

วิธีแก้ไข timthumb.php error

วิธีแก้ไข timthumb.php error ที่เกิดขึ้นจากการที่เราลืมสร้าง folder cache หรือลืมเปลี่ยน Permission ของ Folder Cache


ซึ่งการแก้ไข สามารถทำได้ง่ายๆ ดังนี้ครับ 

  1. ทำการ Update Timthumb.php ให้เป็นตัวล่าสุดก่อน โดยสามารถไปเอาได้ที่ http://timthumb.googlecode.com/svn/trunk/timthumb.php (จริงๆไม่ต้องทำก็ได้นะครับ) 
  2. ทำการแก้ไข Permission ของ Folder Cache ให้เป็น 777 เพื่อที่จะได้สามารถทำการเขียน และแก้ไข Cache 
  3. ใน Folder Cache ลองทำการเช็คดูว่า มีไฟล์ Index.html อยู่หรือไม่ และถ้ามี ปรับสิทธิ์ เป็น 777 แล้วรึยัง 
  4. ทำการ Clear Cache ต่างๆที่มีอยู่ใน Folder 
  5. ลองรันอีกครั้งก็จะพบกับรูปภาพแล้ว 


Sunday, January 13, 2013

วิธีติดตั้ง ioncube ใน localhost

1.ให้ไป download ioncube loader จาก ที่นี้ หรือ http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_win_vc6_x86.zip
2.แตกไฟล์ออกมาจากนั้นให้ copy file ioncube_loader_win_5.2.dll ไปยัง C:\AppServ\php5\ext\
3.ให้เิพิ่มคำสั่ง zend_extension_ts="C:\AppServ\php5\ext\ioncube_loader_win_5.2.dll" ใน file php.ini
4.จากนั้นให้ Apache Restart แค่นี้ก็เรียบร้อยแล้่วครับ ^ ^

Tuesday, January 8, 2013

เขียน PHP สั่ง Printer

ถ้าใครที่เขียน PHP สั่ง Printer ดูทางนี้ครับ

สำหรับคนที่ใช้ appserv 2.5.10
1.โหลด extension จากที่นี้ http://us.php.net/get/pecl-5.2.6-Win32.zip/from/a/mirror
2. เพิ่ม extension=php_printer.dll ใน php.ini
3. Restrart Apache เรียบร้อยครับ

โค้ดทดสอบ
<?php

$handle = printer_open("ชื่อ printer");

$buffer = "ทดสอบ Printer";



printer_set_option($handle, PRINTER_PAPER_FORMAT, PRINTER_FORMAT_A4);

printer_write($handle, $buffer);

printer_close($handle);
?>