Trace:
Differences
This shows you the differences between the selected revision and the current version of the page.
| joomla:add-opensearch-in-joomla-site 2009/10/30 17:13 | joomla:add-opensearch-in-joomla-site 2010/04/03 23:44 current | ||
|---|---|---|---|
| Line 7: | Line 7: | ||
| 1. สร้างไฟล์ขึ้นมาใหม่โดยใช้ชื่อว่า opensearch.xml โดยไฟล์ดังกล่าวมีข้อความดังนี้ | 1. สร้างไฟล์ขึ้นมาใหม่โดยใช้ชื่อว่า opensearch.xml โดยไฟล์ดังกล่าวมีข้อความดังนี้ | ||
| - | <nocode> | + | |
| <?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> | ||
| <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/" xmlns:ie="http://schemas.microsoft.com/Search/2008/"> | <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/" xmlns:ie="http://schemas.microsoft.com/Search/2008/"> | ||
| - | <ShortName>[Web Site Name]</ShortName> ---> ใ้ห้ระบุชื่อสั้นที่ต้องการให้ปรากฎในรายการ search engine provider บน web browser | + | <ShortName>[Web Site Name]</ShortName> ---> ใ้ห้ระบุชื่อสั้นที่ต้องการให้ปรากฎในรายการ search engine provider บน web browser เช่น NSTDA Thailand |
| <Description>search in [Web Site Name] Website</Description> ---> ใ้ห้ระบุคำอธิบาย | <Description>search in [Web Site Name] Website</Description> ---> ใ้ห้ระบุคำอธิบาย | ||
| <Tags>keyword1 keyword2</Tags> ---> ใ้ห้ระบุ keyword | <Tags>keyword1 keyword2</Tags> ---> ใ้ห้ระบุ keyword | ||
| Line 23: | Line 23: | ||
| <Url type="text/html" method="GET" template="http://yourdomainname/[path of your joomla search component]" /> ---> ใ้ห้ระบุ URL ที่ใช้ทำการสืบค้นบนเว็บไซต์ Joomla โดยที่ส่วนนี้ขึ้นอยู่กับการติดตั้งและปรับแต่งใช้งานฟังก์ชันสืบค้นใน Joomla โดยให้แทนที่คำค้นด้วยตัวแปร "{searchTerms}" เช่น url ที่ใช้ในการค้นเป็น "http://yourdomainname/index.php/component/search/[searchword]?&searchphrase=all" ให้แก้ไขเป็น "http://yourdomainname/index.php/component/search/{searchTerms}?&searchphrase=all" โดยเครื่องหมาย "&" ให้แทนที่ด้วย "&" | <Url type="text/html" method="GET" template="http://yourdomainname/[path of your joomla search component]" /> ---> ใ้ห้ระบุ URL ที่ใช้ทำการสืบค้นบนเว็บไซต์ Joomla โดยที่ส่วนนี้ขึ้นอยู่กับการติดตั้งและปรับแต่งใช้งานฟังก์ชันสืบค้นใน Joomla โดยให้แทนที่คำค้นด้วยตัวแปร "{searchTerms}" เช่น url ที่ใช้ในการค้นเป็น "http://yourdomainname/index.php/component/search/[searchword]?&searchphrase=all" ให้แก้ไขเป็น "http://yourdomainname/index.php/component/search/{searchTerms}?&searchphrase=all" โดยเครื่องหมาย "&" ให้แทนที่ด้วย "&" | ||
| </OpenSearchDescription> | </OpenSearchDescription> | ||
| - | </nocode> | + | |
| - | 2. แก้ไขไฟล์ index.php ของ template ปัจจุบัน ซึ่งถูกเรียกใช้งานอยู่ ซึ่งอยู่ใน folder /templates/template-name/ โดยเพิ่มบรรทัดต่อไปนี้ | ||
| + | 2. แก้ไขไฟล์ index.php ของ template ปัจจุบัน ซึ่งถูกเรียกใช้งานอยู่ ซึ่งอยู่ใน folder /templates/template-name/ โดยเพิ่มบรรทัดต่อไปนี้ ในส่วน <head></head> | ||
| + | |||
| + | |||
| + | <head> | ||
| + | . | ||
| + | . | ||
| + | . | ||
| + | <link rel="search" type="application/opensearchdescription+xml" title="[Web Site Name]" href="<http://yourdomainname/[path of opensearch.xml]" /> | ||
| + | . | ||
| + | . | ||
| + | . | ||
| + | </head> | ||
| + | |||
| ---- | ---- | ||
| Line 33: | Line 45: | ||
| - นายขันธ์ศิริ อาทร เจ้าหน้าที่ระบบคอมพิวเตอร์ ศูนย์บริการความรู้ทางวิทยาศาสตร์และเทคโนโลยี | - นายขันธ์ศิริ อาทร เจ้าหน้าที่ระบบคอมพิวเตอร์ ศูนย์บริการความรู้ทางวิทยาศาสตร์และเทคโนโลยี | ||
| - | {{tag>joomla opensearch "search engine"}} | + | {{tag>joomla opensearch "search engine" web html}} |
