Freeola Internet Get Dotted Domains Blog Guides Chat
All .uk domains 99p
Register any UK domain (.uk, .co.uk, .org.uk or .me.uk) for just 99p for 1 year! Offer ends 30th June 2017

Viewing Thread:
'Announce your search function to the world.'

Thu 09/11/06 at 15:59:
cjh
Regular
"It goes so quickly"
Posts: 4,083
Tell the world about your search function.

People online find what they are looking for mostly via an online search engine, be it Google, Windows Live or Ask. These sites are designed purely to list the rest of the World Wide Web, and so it’s no surprise that web browsers are now coming with their own little search box included.

The new released of Internet Explorer (version 7) and Firefox (version 2) allow for these search boxes to be added to with ease by the web user. If they wish to have more than one search engine within this little box, they can.

But this little box is no longer exclusive to big search engines; anybody can offer up a search function to their own web site, no matter how big or small. If a non-generic search engine type web site (for example, your own) has a search function, you too can offer up yourself to the web browsing public. This little guide will tell you how, using a little XML file containing some code known as OpenSearch.

One such site that offers a non-generic web search function is Freeola, with its cheats, walkthroughs and Internet domain names. It is this type of site and search function that will also benefit users and site owners alike, which is why Freeola offer up their search function using the opensearch method, and so as the main example, we'll be using the search function of the Freeola GetDotted web site, which sells domain name registrations.

Before you continue, you will need to already have a search function based on your web site. This OpenSearch XML file will only create a reference to it for the web user via their browser, so that they can quickly access your search function. Freeola fit this bill, as their search function already exists on their web sites. All we are going to do here is let the user add it to their web browsers search box.

You will also need to know the full web address of your search function, and how it receives a search query. For our example, GetDotted, the web address to the search function is http://getdotted.com/domain-name-search.php, and the search query is passed to this address using the variable name domain, so the users search is sent as one long web address, which may look like http://getdotted.com/ domain-name-search.php?domain=freeola.com if the user was searching for freeola.com. If you are unsure what these details are for your web site, you should either refer to your search script, contact the person who made the search script, or make a post on the Freeola web forums.

Don't worry about how the user will add your web site search, as each web browser has its own way of dealing with it. Users won’t be bombarded with any messages or annoying pop-ups, and it won’t make your web site look desperate for visitors, it’ll only offer an enhancement to it for frequent viewers.

While we will use GetDotted for our examples, you should replace all the required values to suite your web site.

To start, open up any text editor (Notepad for a Windows powered PC is fine) and create a new file, saving it as search.xml (see note at the end of this post)*. Then, copy and paste the sample code below in to the new file:






The above is a generic piece of OpenSearch code, which shouldn’t be altered. The next piece of code is where you’ll need to add your own bits of information, to suite your own web site, but for our example we’ll use the info GetDotted would need.


GetDotted
GetDotted, Internet domain name registration service from Freeola
http://getdotted.com/favicon.ico


The text between the tags is the text that will be displayed in the search box when the user is not using it, or in the drop-down list if the user has more than one search function. Change this to the text you would like the user to see, so that they can identify your particular search. Using "search", "click here to search" or "my web site" isn’t helpful. In our example, using "GetDotted" allows the user to see the search is for Freeola’s GetDotted web site, and you should use the same type of ShortName for your text. A ShortName should not be longer than 16 characters. If you wish, you may also (not instead of) add a tag, which can contain up to 48 characters, but this currently isn’t used by Firefox or Internet Explorer.

The text between the tags should contain a short description of your web site’s search function. In this example the text "GetDotted, Internet domain name registration service from Freeola" describes the search function is for a domain name registration service, from Freeola, branded as GetDotted. If your name was John, and your search function was for your web forum about music, you could use the text "John’s music lovers web forum search facility". A Description should not be longer than 1024 characters.

The text between the tags is the web address of an image that may be used along side the search function, and is usually the same as the web sites favicon. This tag is not necessary (you can leave it out if you wish), and currently Internet Explorer does not make use of any icon, but Firefox does, so include one where possible. The attributes height and width define the height and width (in pixels) of the image, while the type attribute states the type of image used. This doesn’t have to be an icon image, and can also be a PNG (image/png) or JPEG (image/jpeg) image, for example. You’re able to add more than one tag to your search file if you wish, to cater to different image sizes. If you use a regular PNG or JPEG image, be sure to resize it first, as the first (or only) image should ideally be 16 pixels by 16 pixels.

Up next is the piece of code that will determine how a search is passed on to your web site. This particular option is very important, as if it isn’t set correctly, the user won’t be able to use your search function.

Your search script on your web site will need to be set up to receive a search via a query or get request. This means that the search is added to the web address and sent to the web site with it. Our previous example of this was http://getdotted.com/ domain-name-search.php?domain=freeola.com, where:

http://getdotted.com/domain-name-search.php is the web address.
? means the end of the web address, and the start of the variable.
domain is the variable used by the search script.
= is the end of the variable , and the start of the search term.
freeola.com is the search term the user is searching for.

You will need to know the web address to your search script, as well as the variable which your search script uses to refer to a users search terms. For example, Freeola cheats use the variable keywords, while Freeola walkthroughs use the variable txtGame and GetDotted uses the variable domain, as shown above.

You will need to add this information in the following way:





First off, note the forward slash (/) at the end of the tag; and the fact that there is no tag at the end; this is required. The type attribute can be left alone, as it tells the browser that the results will come back as HTML, but the template value will need to be changed to wherever your search script is located, as well as contain your scripts variable name.

You will need to change the web address to point to your web site and search script, but where the web address ends, there is a question mark ? here, which is needed and so shouldn’t be deleted. The word domain will need to be replaced with whatever variable name your script uses, but the ={searchTerms} needs to be left as it is.

So, if we pretend your web site search is http://domain.com/search-script.php and that your scripts variable name is search, look or value, then the code would need to be set respectively as follows:







The key element in the above is {searchTerm}, as the users web browser will place whatever the user is searching for in its place. When the web browser sends the request, it may look something like http://domain.com/search-script.php?lookfor=hotel in London.


Once that is complete, you will need to close of the OpenSearch code. To do this, you need to add the following:





So, a full version of an OpenSearch search file for GetDotted may look like this:




GetDotted
GetDotted, Internet domain name registration service from Freeola
http://getdotted.com/favicon.ico




Of course, yours will look a little different, because you’ve changed some of the values to reflect your own web site search function.

Once saved, the file will need to be uploaded to your web space.

Then, to let the visitors to your web site know they can add your search function to their web browser search panel, you will need to add this following code to your HTML web page(s):





You should change the value for title from GetDotted to match that of your ShortName value, as this will be shown by the web browser before the search file is downloaded and added.

And there you have it, an easy to use search function for the user direct from their web browser. If you have any trouble implementing it, simply pop on over to the Freeola web forums, where you can ask for a little assistance.

* If Windows is not set up to handle .xml files (Windows may save the file as a normal txt file), you may need to place quotation marks to the left and right of the file name when you first save this file. When you come to open this file again later (via a double click) you may see a window asking which program should be used to open the file. From this window, choose the ‘Select the program from a list’ option, then select Notepad from the list, and ensure the ‘Always use the selected program to open this kind of file’ is ticked, then click OK. This will add the .xml file type to your Windows system, and you’ll be able to open and edit web feed files like a normal text file from this point.

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

As always, any comments, questions, and especially corrections are welcome.
Thu 09/11/06 at 16:43:
cjh
Regular
"It goes so quickly"
Posts: 4,083
Thanks BW20.

Is their any chance you're able to edit a post beyond the limits of a regular user?

It's just that a few of web addresses in the post were too long, and needed a space in between them to get through. Would you be able to remove those spaces, so that their aren't any problems for anybody who reads it?
Thu 09/11/06 at 16:29:
Regular
"incognito"
Posts: 98
Very interesting, sounds like a good idea. I have passed this on to our marketing team to investigate further.

Thanks very much.
Thu 09/11/06 at 15:59:
cjh
Regular
"It goes so quickly"
Posts: 4,083
Tell the world about your search function.

People online find what they are looking for mostly via an online search engine, be it Google, Windows Live or Ask. These sites are designed purely to list the rest of the World Wide Web, and so it’s no surprise that web browsers are now coming with their own little search box included.

The new released of Internet Explorer (version 7) and Firefox (version 2) allow for these search boxes to be added to with ease by the web user. If they wish to have more than one search engine within this little box, they can.

But this little box is no longer exclusive to big search engines; anybody can offer up a search function to their own web site, no matter how big or small. If a non-generic search engine type web site (for example, your own) has a search function, you too can offer up yourself to the web browsing public. This little guide will tell you how, using a little XML file containing some code known as OpenSearch.

One such site that offers a non-generic web search function is Freeola, with its cheats, walkthroughs and Internet domain names. It is this type of site and search function that will also benefit users and site owners alike, which is why Freeola offer up their search function using the opensearch method, and so as the main example, we'll be using the search function of the Freeola GetDotted web site, which sells domain name registrations.

Before you continue, you will need to already have a search function based on your web site. This OpenSearch XML file will only create a reference to it for the web user via their browser, so that they can quickly access your search function. Freeola fit this bill, as their search function already exists on their web sites. All we are going to do here is let the user add it to their web browsers search box.

You will also need to know the full web address of your search function, and how it receives a search query. For our example, GetDotted, the web address to the search function is http://getdotted.com/domain-name-search.php, and the search query is passed to this address using the variable name domain, so the users search is sent as one long web address, which may look like http://getdotted.com/ domain-name-search.php?domain=freeola.com if the user was searching for freeola.com. If you are unsure what these details are for your web site, you should either refer to your search script, contact the person who made the search script, or make a post on the Freeola web forums.

Don't worry about how the user will add your web site search, as each web browser has its own way of dealing with it. Users won’t be bombarded with any messages or annoying pop-ups, and it won’t make your web site look desperate for visitors, it’ll only offer an enhancement to it for frequent viewers.

While we will use GetDotted for our examples, you should replace all the required values to suite your web site.

To start, open up any text editor (Notepad for a Windows powered PC is fine) and create a new file, saving it as search.xml (see note at the end of this post)*. Then, copy and paste the sample code below in to the new file:






The above is a generic piece of OpenSearch code, which shouldn’t be altered. The next piece of code is where you’ll need to add your own bits of information, to suite your own web site, but for our example we’ll use the info GetDotted would need.


GetDotted
GetDotted, Internet domain name registration service from Freeola
http://getdotted.com/favicon.ico


The text between the tags is the text that will be displayed in the search box when the user is not using it, or in the drop-down list if the user has more than one search function. Change this to the text you would like the user to see, so that they can identify your particular search. Using "search", "click here to search" or "my web site" isn’t helpful. In our example, using "GetDotted" allows the user to see the search is for Freeola’s GetDotted web site, and you should use the same type of ShortName for your text. A ShortName should not be longer than 16 characters. If you wish, you may also (not instead of) add a tag, which can contain up to 48 characters, but this currently isn’t used by Firefox or Internet Explorer.

The text between the tags should contain a short description of your web site’s search function. In this example the text "GetDotted, Internet domain name registration service from Freeola" describes the search function is for a domain name registration service, from Freeola, branded as GetDotted. If your name was John, and your search function was for your web forum about music, you could use the text "John’s music lovers web forum search facility". A Description should not be longer than 1024 characters.

The text between the tags is the web address of an image that may be used along side the search function, and is usually the same as the web sites favicon. This tag is not necessary (you can leave it out if you wish), and currently Internet Explorer does not make use of any icon, but Firefox does, so include one where possible. The attributes height and width define the height and width (in pixels) of the image, while the type attribute states the type of image used. This doesn’t have to be an icon image, and can also be a PNG (image/png) or JPEG (image/jpeg) image, for example. You’re able to add more than one tag to your search file if you wish, to cater to different image sizes. If you use a regular PNG or JPEG image, be sure to resize it first, as the first (or only) image should ideally be 16 pixels by 16 pixels.

Up next is the piece of code that will determine how a search is passed on to your web site. This particular option is very important, as if it isn’t set correctly, the user won’t be able to use your search function.

Your search script on your web site will need to be set up to receive a search via a query or get request. This means that the search is added to the web address and sent to the web site with it. Our previous example of this was http://getdotted.com/ domain-name-search.php?domain=freeola.com, where:

http://getdotted.com/domain-name-search.php is the web address.
? means the end of the web address, and the start of the variable.
domain is the variable used by the search script.
= is the end of the variable , and the start of the search term.
freeola.com is the search term the user is searching for.

You will need to know the web address to your search script, as well as the variable which your search script uses to refer to a users search terms. For example, Freeola cheats use the variable keywords, while Freeola walkthroughs use the variable txtGame and GetDotted uses the variable domain, as shown above.

You will need to add this information in the following way:





First off, note the forward slash (/) at the end of the tag; and the fact that there is no tag at the end; this is required. The type attribute can be left alone, as it tells the browser that the results will come back as HTML, but the template value will need to be changed to wherever your search script is located, as well as contain your scripts variable name.

You will need to change the web address to point to your web site and search script, but where the web address ends, there is a question mark ? here, which is needed and so shouldn’t be deleted. The word domain will need to be replaced with whatever variable name your script uses, but the ={searchTerms} needs to be left as it is.

So, if we pretend your web site search is http://domain.com/search-script.php and that your scripts variable name is search, look or value, then the code would need to be set respectively as follows:







The key element in the above is {searchTerm}, as the users web browser will place whatever the user is searching for in its place. When the web browser sends the request, it may look something like http://domain.com/search-script.php?lookfor=hotel in London.


Once that is complete, you will need to close of the OpenSearch code. To do this, you need to add the following:





So, a full version of an OpenSearch search file for GetDotted may look like this:




GetDotted
GetDotted, Internet domain name registration service from Freeola
http://getdotted.com/favicon.ico




Of course, yours will look a little different, because you’ve changed some of the values to reflect your own web site search function.

Once saved, the file will need to be uploaded to your web space.

Then, to let the visitors to your web site know they can add your search function to their web browser search panel, you will need to add this following code to your HTML web page(s):





You should change the value for title from GetDotted to match that of your ShortName value, as this will be shown by the web browser before the search file is downloaded and added.

And there you have it, an easy to use search function for the user direct from their web browser. If you have any trouble implementing it, simply pop on over to the Freeola web forums, where you can ask for a little assistance.

* If Windows is not set up to handle .xml files (Windows may save the file as a normal txt file), you may need to place quotation marks to the left and right of the file name when you first save this file. When you come to open this file again later (via a double click) you may see a window asking which program should be used to open the file. From this window, choose the ‘Select the program from a list’ option, then select Notepad from the list, and ensure the ‘Always use the selected program to open this kind of file’ is ticked, then click OK. This will add the .xml file type to your Windows system, and you’ll be able to open and edit web feed files like a normal text file from this point.

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

As always, any comments, questions, and especially corrections are welcome.

Freeola is a UK internet service provider offering the best value and extensive free services. Please compare our domain name registration prices or check out our UK high speed internet access. If you are in business please see examples of our free hosting at Freeola.com/customer-sites.

Safe and Secure Payment