When I was setting up my blog, one of the first things I found out about was creating custom searches using Google. So I promptly set up a custom search that had a list of my favourite and most frequently visited flex sites and at the same time if those sites didn’t have the info I required any search that was directed to the ‘web’ rather than the ‘flex collection’ would be weighted to sites that had AS3, Flex, or Adobe related info.
After a little bit more research I managed to create an OpenSearch plugin from the custom Google search, and after that turned it into a firefox plugin. See the ‘how to’ here on creating your own custom search and firefox plugin.
Live
Well the folk at Mozilla (or whoever tests the plugins) have just changed its status to LIVE 🙂 yeh.
check it out here http://addons.mozilla.org/addon/11823
You can also check out the original post with a list of all the included sites here.
So you may have read my previous posts on the custom search that I created, well as suggested in a previous comment the information to create one then turn it into a open search search plugin and then into a firefox plugin is out there. It’s just not all in the same place.
So I’m going to go through the process and try to make clear each step of the way. Here is what I’m going to cover.
Create the custom search (hosted by Google)
Take new custom search and insert into wordpress
Create a OpenSearch plugin from code that’s compatible with the majority of browsers
Turn OpenSearch plugin into a firefox plugin so that you can list it under firefoxes search plugins
Make the browser automatically pick up the openSearch plugin to show user you have plugin available
So first you need to create the search.
1, Create Google custom search.
For this (AFAIK) you need a Google account and you then need to get a adSense account set up. This is how I found the custom search as it is part of the options on the general screen. I kind of expect that this option to create a custom search will be available elsewhere on the Google site but this is where I found it.
Once you go through the wizard that Google gives you, you get a choice. I’ve gone with opening the result inside Google. If you choose the last option then the end result will mean that you will get two bits of code to insert into your wordpress site. If this is the case then I’d have a look at a wordpress plugin to deal with the code. There are a few out there, but they may or may not work depending on your theme that you have.
I choose the hosted on Google option because – 1, should it (the search) be popular then it will not increase my bandwidth usage and 2, it makes it more offical if its hosted on a google URL (just my opinion).
You should now have some code from Google, something along the following lines
2, Insert code into wordpress
Now that you have your code you will need to find the searchform.php file from your theme. Should be inside wp-content->themes->{your theme} -> searchform.php
Open up that file and insert the new code.
I didn’t do anything to the Google code, just pasted it above the standard wordpress code so I now have 2 searchs on my site, one for the ‘Flex collection’ and one for my site.
Thats it, part 2 done.
3, Create OpenSearch plugin
First you need to get a URL that you can use for your search. So either do a search after installing your search in your wordpress blog or look at the code and put it all together to create one.
Fill in all the boxes (they’re all pretty much self explanatory), but as an example the two main inputs that have to be correct are the ‘Search URL’ and the ‘Search Form URL’
Pick a licence, then it will ask you to upload a file. Upload the XML file that you just saved. Then its just a case of editing the appropriate sections and you are now done.
Do a quick search for your plugin and you can now get a URL such as https://addons.mozilla.org/en-US/firefox/addon/11823 and send this round friends etc to get some reviews. Once you have a few reviews you can submit your plugin to be made public.
Feel free to review my plugin, I need some reviews so that I can submit it.
Finally.
5, Make the browser pick up the openSearch plugin when your site is viewed
The above image shows what happens if a browser picks up that the site it is displaying has a custom search tool that can be installed. It highlights a small button beside the search box.
To do this I’ve placed the following code into the header file
Use the above but replace the href with whatever URL you saved from part 3 (the mycroft.mozdev link) and obviously replace the title with something relevant to your search.
Then place that line of code into the header.php for your theme (or somewhere that will always get served up on your site, I just choose the header as that seemed appropriate). Put it beside the other links if your header file has them otherwise just make sure it’s in the head tag.
Following on from my recent post on creating a specific flex search using Google I wanted to make it easier to flick between the main Google search and the flex collection Google search.
Well I’ve created an OpenSearch plugin (supported by Firefox 2+, Internet Explorer 7+, etc) so I can now easily flick to a specifc flex search whenever I wish now.
I’d like it to contain as many helpful flex, AIR and flash sites as possible. I’m talking about sites that actually give you code hints, tips and samples without tonnes of text that get them up the page rankings without actually being of any real use.
Hopefully you’ll all like the search and find it useful.I’d love it if this flex/AS/AIR search could be as comprehensive as possible.It would help me (and others) when looking for appropriate information. (I know there are various aggregators out there but the search facilities on these sites aren’t normally great, but Google’s is — so go on, help me add to the list to make it better for everyone 🙂 )