Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-08-19 05:50:45

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,012
Website GitHub Mastodon Twitter

Add your site's search in Firefox

This method adds your site’s search in the search engines in FF and also allows your visitors to do that too.
Hope some people might find it useful

1. Copy the code below and paste it in your code editor program. (bbetit, textmate, whatever)

<code>#——————————————————————————————————-#</code>
<code># Author: colak #</code>
<code># Website: http://www.neme.org/ #</code>
<code># Date created: Aug 18, 2006 #</code>
<code># Date Modified: Aug 19, 2006 #</code>
<code># Plug in version: 0.4 #</code>
<code>#——————————————————————————————————-#</code>
<<code>search </code>
<code>version=“7.1” </code>
<code>name=“name of your site” </code>
<code>description=“Description of your site” </code>
<code>action=“http://site.com/” </code>
<code>searchForm=“http://site.com/” </code>
<code>method=“get” </code>
<code>> </code>
<code><input name=“q” value=”“> </code>
<code><input name=“q” user=”“> </code>
<code></search> </code>
<<code>browser </code>
<code>update=“http://site.com/files/txpFF.src” </code>
<code>updateIcon=“http://site.com/images/txpFF.png” </code>
<code>updateCheckDays=“10” </code>
<code>></code>

1a. Save the above as txpFF.src
1b. Create a 16×16px png graphic, save it as txpFF and upload it to your site via ftp in your images folder.
1c. Replace “name of your site” and “Description of your site” with what is relevant to you
1d. Replace all instances of site.com with your site addess
1e. Upload your newlly saved txpFF.src using the files tab

2. Click <a href=“http://neme.org/main/file_download/20” title=“txpFF.js”>here</a> to download txpFF.js.
(I tried to post the code here but I gave up after 3 attempts)
2a. Open it in your code editor and change all instances of site.com with your site addess
2c. Upload it in your site’s root via ftp
2d. Call the javascript in your pages by adding <code><script type=“text/javascript” src=“txpFF.js”></script></code> in the head of your templates

3. Copy the code below and paste it somewhere in your page layout

<code><a href=“javascript:addtxpFF(‘name of your site’,‘Category of your site’)”>Search this from your Firefox</a></code>

3a. Change ‘name of your site’,‘Category of your site’ with … do I have to explain everything?

4. View your site and click on the link to add your search in FF

enjoy

Tested on FF1.5 Mac

Demo
The code appears above the bookmarklets graphics

EDIT> <b>Suggestion</b>: I have used txpFF above for both the image name and the source but it would be better to change those names in all instances where they occur with your own naming conventions. This way your plugin will not be replaced by another one using the same name.

Last edited by colak (2006-08-19 09:42:32)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#2 2006-08-20 07:17:41

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,012
Website GitHub Mastodon Twitter

Re: Add your site's search in Firefox

Further to the above. Here is a very easy method of achieving the same thing using the mozila/sherlock standard

First create a graphic for your search. It has to be 16×16px and have a jpg, gif or png extension

Download: <a href=“http://neme.org/main/file_download/21” title=“generic.src”>generic.src</a>

Within the <b>&#60;search</b> part of the code
Insert your site’s name and description
change site.com to your site’s address. If your site resides in a folder insert that. ie site.com/folder/

In the <b>&#60;browser</b> section of the code
change “generic” to the name of the src file <i>(Filename should be <=20 chars and contain only a-z, 0-9 and _ characters)</i>
Also change the “generic” for the image <i>(src and image names should be the same)</i>

Once completed the above Go to the mozdev site and follow the instructions re submitting the plugin.

Once the plugin is submitted go to the How to host plugins section, write the name of the src file and get the js code you need for your site


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#3 2006-10-15 20:55:12

1beb
Plugin Author
From: Canada, Ontario, Toronto
Registered: 2004-11-22
Posts: 169
Website

Re: Add your site's search in Firefox

You should check out rollyo

There’s another way to do something very similar to this: it is especially useful if you have a bunch or group of sites that you frequently have to search. You can denote the search engine and the domain names of the place you want to search and add it to firefox so you can alt+k your way to search freedom.

Actually, some textpattern users seem to have adopted this particular method already (Wilshire)

Last edited by 1beb (2006-10-15 20:56:01)

Offline

Board footer

Powered by FluxBB