100 likes | 243 Views
Разработка простого Visual Search для IE8. Михаил Черномордиков Developer Evangelist, Microsoft http://blogs.msdn.com/mikcher mikcher@microsoft.com. Visual Search - ключевые факты. Поставщики поиска появились в IE7 Основываются на спецификации OpenSearch
E N D
Разработка простого Visual Search для IE8 Михаил Черномордиков Developer Evangelist, Microsoft http://blogs.msdn.com/mikcher mikcher@microsoft.com
Visual Search - ключевые факты • Поставщики поиска появились в IE7 • Основываются на спецификации OpenSearch • IE8 позволяет включать автоподсказки (suggestions), в том числе графические
Пример описания Visual Search • <?xml version="1.0" encoding="UTF-8"?> • <OpenSearchDescriptionxmlns="http://a9.com/-/spec/opensearch/1.1/"> • <ShortName>example Search</ShortName> • <Url type="text/html" template="http://www.example.com/results.aspx ?q={searchTerms}" /> • <Url type="application/x-suggestions+json" template="http://suggestions.example.com/ • ?q={searchTerms}"/> • <Url type="application/x-suggestions+xml" template="http://suggestions.example.com/ • ?q={searchTerms}"/> • <Image height="16" width="16“ type="image/icon"> • http://www.example.com/favicon.ico • </Image> • </OpenSearchDescription>
Визуальные подсказки • <?xml version="1.0"?> • <SearchSuggestion> • <Query>query</Query> • <Section> • <Item> • <Text>Name</Text> • <Url>http://www.example.com/name</Url> • <Description>My name</Description> • <Image width="100" height="134" align="middle" • source="http://www.example.com/name.jpg" /> • </Item> • <Separator/> • </Section> • </SearchSuggestion>
Описание провайдера • <link • rel="search" type="application/opensearchdescription+xml" href="http://example.com/opensearch.xml" title="example Search" • /> • <a href="javascript:window.external.AddSearchProvider • ('/opensearch.xml')"> • Click here to add my search engine to IE8! • </a>
Дополнительные настройки • Размер <Url type="application/x-suggestions+xml" template="http://search.mysite.com/suggestions/results.aspx? q={searchTerms}&src={referrer:source?}& maxwidth={maxWidth}&rowheight={rowHeight}&sectionHeight={sectionHeight}" /> • Кодировка<SearchSuggestion> <InputEncoding>windows-1251</InputEncoding>
Полезные ссылки • Раздел IE на TechDayshttp://www.techdays.ru/Search.aspx?Tag=Internet+Explorer+8 • Официальный блог команды IEhttp://blogs.msdn.com/ieru (перевод)http://blogs.msdn.com/ie (оригинал) • Центр разработки IE http://msdn.com/ie • CтатьяSearch Provider Extensibility http://msdn.microsoft.com/ru-ru/library/cc848862(en-us).aspx
Разработка простого Visual Search для IE8 Михаил Черномордиков Developer Evangelist, Microsoft http://blogs.msdn.com/mikcher mikcher@microsoft.com