Bing Search Plug-in for BlogEngine.NET

Posted by sriram

About This Plug-in

Bing provides a JSON interface that allows developers to consume the search results in many creative ways. The purpose of this plug-in is to reduce the load on BlogEngine.NET by offloading search onto Bing. This plug-in will automatically switch to the internal search engine if no results are returned by Bing; further site visitors can also manually click on "Use Internal Search" to get results from the BlogEngine.NET search system.

To test this plug-in simply search for anything in the Khoofia.com SearchBar. Put it simply, I'm publishing the code used to enable search on Khoofia.com. Laughing

The plug-in requires JQuery and uses the Simple Modal Dialog developed by Eric Martin.

 

How to use?

You can download the source package here. A ReadMe file within the Zip package can provide detailed assistance.

In Brief:

Unzip the files to the Theme folder in use

Paste this in <head></head> of site.master
<link type="text/css" href="khoofia_bingsearch.css" rel="Stylesheet" />

Edit site.master page and paste the code (from search code.txt), where you wish the search bar to appear

Replace the following lines (in search code.txt) to point to your theme folder.

<%= Page.ResolveClientUrl("~/themes/Standard/khoofia_bingsearch.js") %>
<%= Page.ResolveClientUrl("~/themes/Standard/i/bing25h.gif")%>
<%= Page.ResolveClientUrl("~/themes/Standard/i/back.gif")%>
<%= Page.ResolveClientUrl("~/themes/Standard/i/front.gif")%>

In the javascript variables provided, enter your Bing API Key, Your Site Domain Name, Your BlogEngine.NET internal search engine page, Your SearchBar text

 

Just the Code

There's lots of code inside the zip download, i think its best the code be explored through an IDE.
Update: I'll upload a clearer version requiring less edits sometime soon. You can volunteer too, if you wish. Basically the idea is to take all the html markup and put it in a document.write().

 

Download The Plug-In (12.97 kb)

Comments

6/15/2010 9:28:46 PM #

trackback

Bing Search Plug-in for  BlogEngine.NET

Bing Search Plug-in for  BlogEngine.NET

Khoofia |

Comments are closed
bada bing! Your search results courtesy of Bing Search Logo
Search results will appear shortly. Thanks you for your patience.
Previous Page Next Page
Sign in
Thanks for visiting. Site & content licensed under Kopimi, mostly. Help support free speech & free beer ;-). This site runs on a BlogEngine.NET 1.6 backend(mostly); Candy Theme created by me.
Sriram
Says
Hi
Map Image Invisible Area Invisible Area Invisible Area Invisible Area