2006/11/30

2 Steps to Create Search Provider

如果你正在浏览我的网站,而不是通过 RSS 订阅;如果你正在使用 Internet Explorer 7 (IE 7), 而不是基于 IE 7 的外壳浏览器 (TheWorld, Maxthon, NetCaptor, etc.), 你会发现 IE 7 右上角的搜索框发生了微小的变化——它的下拉按钮显示为橙色:

IE 7 found new search provider

New search providerAdd search provider

很明显,变化的颜色激发了用户进一步探索的欲望,而又不至于影响当前的浏览。点开它,如上图所示,IE 7 发现这页面可以提供 Search Provider (以下简称 SP). 这是个很吸引人的特性,能帮助用户快速添加特定的搜索引擎。IE 7 官方网站已经有一些可用的 SP, 但显然不能满足用户的个性需求。

现在,我们用两步创建自己的 SP.

1. 向内添加这样的 <link> 标签:

<link title="NAME-OF-THE-MENU-ITEM" href="YOUR-XML-URL" type = "application/opensearchdescription+xml" rel="search">

这里输入你要显示在菜单上的名字和 XML 配置文件的地址。

2. 创建自己的 XML. XML 格式参考:

<?xml version="1.0" encoding="UTF-8" ?>
<opensearchdescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<shortname>janlay's blog Search</shortname>
<description>Search janlay's blog.</description>
<tags>janlay's blog Search</tags> <contact>janlay</contact> <img height="16" src="" width="16" type="image/png" />http://janlay.com/favicon.ico</img> <url type="text/html" template="http://search.blogger.com/?as_q={searchTerms}&amp;ie=UTF-8&ui=blg&bl_url=janlay.com"> </opensearchdescription>

这里各元素所表示的意义都很直观,不必赘述。值得注意的是,template URL 如果包含 &, 则应写成 &amp;amp; 用以将 XML 的 & 转义。

创建自己的 SP 就这么简单:)

补充:IE 7 菜单项是 Add Search Providers, 注意到这里的 provider 是复数。由此可推知 IE 7 应该支持多个 SPs, 方法就是多写几个 <link> 标签

6 条评论:

匿名 说...

我用的不是IE 7.0 :(

Unknown 说...

michael kors
ralph lauren outlet
louis vuitton handbags
coach outlet online
retro 11
oakley sunglasses wholesale
coach outlet online
cheap oakley sunglasses
kd shoes
coach factory outlet
jordan 5
abercrombie store
true religion jeans
jordan 8 playoffs
coach outlet online
retro jordans
oakley sunglasses wholesale
burberry scarf
red timberland boots
tods outlet
football jerseys
michael kors
cheap oakley sunglasses
louis vuitton
oakley sunglasses
20150603yuanyuan

Unknown 说...

20151027 junda
coach factory outlet
nfl jerseys
Gucci Outlet Online Sale
Abercrombie T-Shirts
hollister clothing store
ugg boots
michael kors outlet
Michael Kors Outlet Handbags Factory Price
ugg boots
toms outlet
abercrombie
mont blanc
michael kors outlet
michael kors outlet
Coach Outlet Store Online Shop
canada goose outlet
michael kors outlet
Abercrombie and Fitch Outlet Sale
Louis Vuitton Bags Outlet Store
michael kors bags
Wholesale Authentic Designer Handbags
ugg outlet store
air max 95,nike golf,nike janoski,air max 1,nike canada,nike plus,nike shox,nike factory store
michael kors handbag
Louis Vuitton Handbags For Cheap
cheap ugg boots
Christian Louis Vuitton Red Bottoms
coach outlet store online
true religion outlet
canada goose jackets

mmjiaxin 说...

canada goose outelt
michael kors handbags clearance
pittsburgh steelers
oakley sunglasses
the north face outlet
green bay packers
cheap ray ban sunglasses
parajumpers outlet
tory burch outlet online
tommy hilfiger
oakley sunglasses
michael kors handbags
hermes outlet
cheap uggs
ray ban sunglasses
pandora outlet
oakley sunglasses wholesale
michael kors handbags wholesale
ralph lauren polo
cheap wedding dresses
mm1031

raybanoutlet001 说...

zzzzz2018.4.27
christian louboutin outlet
canada goose outlet
ray ban eyeglasses
louboutin shoes
canada goose outlet
bears jerseys
prada handbags
christian louboutin outlet
minnesota vikings jerseys
coach factory outlet

Unknown 说...

zzzzz2018.6.30
christian louboutin shoes
kate spade handbags
vibram fivefingers shoes
louboutin shoes
fitflops sale
coach outlet
ultra boost 3.0
supreme shirt
nike factory outlet
valentino