Add Opensearch in blog

opensearch ဆိုတာကတော့ firefox မှာ အပေါ်ညာဘက်မှာ ပါတဲ့ searchbox လေးကို ပြောတာပါ။ အခု ကျွန်တော့် blog ကို တစ်ခါတည်း လာစရာမလိုပဲ ရှာလို့ရအောင် opensearch ထည့်ထားတယ်။ အဲဒီ ညာဘက် ထောင့်လေး လင်းနေတာကို တွေ့မယ်။
လုပ်ရတာလွယ်လွယ်လေးပါ။ အရင်ဆုံး notepad အရင်ဖွင့်ဖို့လိုတယ်။

opensearch.xml နဲ့သိမ်းလိုက်ပါ။

ပြီးရင်

opensearch.xml

<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>Your Blog</ShortName>
<Description>Your Blog</Description>
<Tags>Your Blog</Tags>
<Url type="text/html"
template="http://www.yourblog.com/?s={searchTerms}"/>
<Image height="16" width="16" type="image/x-icon">http://www.yourblog.com/favicon.ico</Image>
</OpenSearchDescription>

ကျွန်တော်တို့ searchterms ရှာဖို့အတွက် ကျွန်တော်ကတော့ အရင်ဆုံး ကိုယ့် blog မှာ ကိုယ်ရှာကြည့်လိုက်တယ်။ Ubuntu လို့ရှာလိုက်တယ်။

အဲဒီအခါမှာ www.saturngod.net/?s=Ubuntu

ဆိုပြီးထွက်လာတယ်။ ဒီတော့

<Url type="text/html"
template="http://www.yourblog.com/?s={searchTerms}"/>

အဲဒီ နေရာမှာ

<Url type="text/html"
template="http://www.saturngod.net/?s={searchTerms}"/>

တကယ်လို့
www.ornagai.com/search.php?message=’test’&amp;page=0

ဆိုပါဆို့။
ဒါဆိုရင်

<Url type="text/html"
template="http://www.ornagai.com/?message={searchTerms}&amp;page=0"/>

& ကို
&amp;
လို့ရေးရပါတယ်။ ဒါမှအလုပ်လုပ်မှာပါ။ favicon ပတ်လမ်းကြောင်းကတော့ ကိုယ့် ပုံ လမ်းကြောင်းပေါ့။

အဲဒါတွေပြီးသွားရင် opensearch.xml ကို Uplaod တင်လိုက်။

www.yourblogname.com/opensearch.xml ခေါ်ကြည့်။ အဆင်ပြေလားလို့။ အဆင်ပြေရင် blog ထဲမှာထည့်ရအောင်။

wordpress မှာဆိုရင်တော့ Apperance -&gt; Editor -&gt; header.php မှာ လို့ရှာပြီး အဲဒီအပေါ်မှာ

<link rel="search" type="application/opensearchdescription+xml" title="Saturngod Blog" href="http://www.saturngod.net/opensearch.xml">

ဆိုပြီး ထည့်လိုက်ပေါ့။ ဒါဆိုရင်တော့ သင့် blog မှာ opensearch ရသွားပါပြီဗျာ။ အဲလိုမျိုးပုံစံအတိုင်း website တွေကိုလည်း ထည့်လို့ရပါတယ်။

6 Comments

  1. exiter says:

    မိုက်တယ်ဗျို့ လုပ်ကြည့်လိုက်ဦးမယ် :D

  2. နောက်ဆုံး Blog ထဲမှာ သွားထည့်သလို SMF တို့ Joomla တို့ မှာဆိုရင်ကော ဘယ်နေရာမှာ သွားထည့်ရမလဲ ကိုစေတန် ..

    ခင်မင်စွာဖြင့်

    မနောသား

    1. saturngod says:

      တူတူပဲလေ… SMF တို့ Joomla တို့မှာ search ကိုဘယ်လို အလုပ်လုပ်ထားလဲ.. လုပ်ထားတဲ့ပေါ်မှာ မူတည်ပြီး ထည့်မှရမှာ…

  3. ဟုတ်ကဲ့ ကိုစေတန် ..အပေါ်က URL ညွန်းတာကို သဘောပေါက်တယ်ဗျ ..ကျွန်တော် သိချင်တာက ..Wp မှာကျ header.php မှာ သွားထည့်သလို ကျန်တဲ့ ကောင်တွေကျတော့ ဘယ်နေရာမှာ သွားထည့်ရသလဲဆိုတာ သိချင်တာပါ ကိုစေတန် ..

    ခင်မင်စွာဖြင့်

    မနောသား

    1. saturngod says:

      theme file ထဲမှာပဲ ထည့်ရမယ်နဲ့တူတယ်ဗျ။ အပေါ်မှာ ဖြည့်ရုံပဲလေ။

  4. ကိုစေတန် ..ခင်ဗျာ ..ကျွန်တော် ဘာသာရေး ဆိုဒ်တစ်ခုမှ ထည့်တာ အဆင်မပြေဘူး ဖြစ်နေတယ်ဗျ .. SMF မှာပါ .. အောက်မှာ ပြထားတဲ့ အတိုင်း အဲဒီ Code လေးကို Themes File ထဲမှာ အစားထိုးတာ အခက်ခဲ ဖြစ်နေတာပါ။ ဘယ်နေရာမှာ ထည့်ရမှန်း မသိ ဖြစ်နေတာ ..။ ဒါမှ မဟုတ် ကျွန်တော် လုပ်ထားတဲ့ Code ကပဲ မှားနေတာလား မသိဘူး။ ကူညီပါဦး ကိုစေတန် …။

    ခင်မင်စွာဖြင့်

    မနောသား

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.