PDA

View Full Version : Integration with vBulletin - Search Your Site From Firefox


Ntfu2
27 Aug 2006, 04:53
Everyone knows that little box in the top right of firefox that contains search engines such as google, ask, blah blah.

Well now you can have you're own site searched right from that nifty box, not that anyone ever uses it, but hey atleast you can be cool and have your own, right?
________________________________________________________________
1. Heres how its done, replace SITE with the your site information,to point to your search.php page.


<search
version="7.1"
name="SITE Search"
description="SITE search engine description"
action="http://SITE.com/forums/search.php?do=process&"
searchForm="http://www.SITE.com"
method="GET"
>

<input name="sourceid" value="Mozilla-search">
<input name="showposts=0&quicksearch=1&query" user="">

</search>


Copy and paste that, into a file called yoursitename.src and save it inside Program Files\Mozilla Firefox\searchplugins

Create a 16x16 pixel icon, give it the same name as your plug-in, and save it as either a .jpg or .png graphics file. Then, put it in the C:\Program Files\Mozilla Firefox\searchplugins folder

Then just share your .src file with your users telling them where to install.

EXAMPLE: to search vB.org. copy and paste this into notepad file, save as vBulletinORG.src under the C:\Program Files\Mozilla Firefox\searchplugins folder



<search
version="7.1"
name="vBulletin.org Search"
description="vBulletin.org Search w000oooh000"
action="http://vbulletin.org/forum/search.php?do=process&"
searchForm="http://www.vbulletin.org"
method="GET"
>

<input name="sourceid" value="Mozilla-search">
<input name="showposts=0&quicksearch=1&query" user="">

</search>


I'll help you out the best i can, so just ask.

therocks
27 Aug 2006, 06:46
great idea... i'm using a mac and firefox v1.5.0.6 ... i had to get to the searchplugins folder a little differently but i got there.. it's working perfectly! thanks alot..

Ntfu2
27 Aug 2006, 07:55
Glad to hear.

do you mind sharing the location for future mac users :)

Breaker
27 Aug 2006, 09:10
what do you mean no1 uses, i use it daily :D

thanks alot

Milad
27 Aug 2006, 11:09
Very Good

Thank you

Mattikana
27 Aug 2006, 11:41
http://www.captain.at/howto-firefox-add-search-engine.php

much more userfriendly.. the way you want us to install it is too sloppy imho.. make use of the javascript function :cool:

Ntfu2
27 Aug 2006, 14:54
i dont understand, whats the difference between that one and the one i made above?

ctrl-alt-del
27 Aug 2006, 15:46
Very useful. Thank you!! Now I have a request. Please create this mod for Internet Explorer 7.

Mattikana
27 Aug 2006, 15:52
i dont understand, whats the difference between that one and the one i made above?
now I every user of my forum has to download 2 files and put them in the proper folder. with the javascript trick you can do this much easier. (i.e. just click on a link)

https://addons.mozilla.org/search-engines.php

On the site above you can simply add one by clicking them. can't be hard to make a mod for this :)

edit: also check this (http://games.telenet.be/forum/) site out. Make the Search box appear and click on Mozilla Search Plugins.

ctrl-alt-del
27 Aug 2006, 16:01
If you want a custom icon to appear, append this to the end:

<BROWSER
updateIcon="https://www.site.com/icon.png"
updateCheckDays="3"
>

(Just change out the details of course)

I think it will accept .png, .gif and maybe even .jpg.

Ntfu2
27 Aug 2006, 16:14
now I every user of my forum has to download 2 files and put them in the proper folder. with the javascript trick you can do this much easier. (i.e. just click on a link)

https://addons.mozilla.org/search-engines.php

On the site above you can simply add one by clicking them. can't be hard to make a mod for this :)

edit: also check this (http://games.telenet.be/forum/) site out. Make the Search box appear and click on Mozilla Search Plugins.


You still have to create the .src file, and then simply provide the link to download it and it seems to automatically place the file in the correct folder :)

I'll try to work on something that will let you input your details, create the .src file, and you just link to that for people to download :) We'll see how it goes.

Thanks for the link btw ;)

Ntfu2
27 Aug 2006, 16:20
Very useful. Thank you!! Now I have a request. Please create this mod for Internet Explorer 7.


I was looking at how to do this, and everything so far has you editing your registry or adding a registry key.

Im not sure people would go for that or not, but soon as i figure it out i'll have one made up.

therocks
27 Aug 2006, 17:58
Glad to hear.

do you mind sharing the location for future mac users :)
sure thing..

Mac HD ==> Applications ==> Right-Click on your Firefox Application ==> Select 'Show Package Contents' ==> Contents ==> MacOS ==> searchplugins

this is using os x tiger ;)

-the rocks

Snake
27 Aug 2006, 23:35
This is great. Thanks!

dvsDave
28 Aug 2006, 00:39
http://www.captain.at/howto-firefox-add-search-engine.php

much more userfriendly.. the way you want us to install it is too sloppy imho.. make use of the javascript function :cool:

I figured out a nice place to put a link for installing the search engine.

First edit the javascript mentioned above for your site then add a link to it in the headinclude template.
Read the above link and then put this code in the search forums template:


FIND:

<tr>
<td class="tcat">
$vbphrase[search_forums]
</td>
</tr>

ADD AFTER:
<if condition="is_browser('firefox')">
<tr>
<td class="panelsurround" align="center">
$vbphrase[searchfromfirefox] <a href="javascript:addEngine('filename','ext','description')">Install the |your site name here| search engine!</a>
<td>
</tr>
</if>


Replace sitename with the filename of the .src and ext with the extension of the 16x16 graphic used (gif or png) *note, the grahic has to have the same name as the .scr file.

You have to add a phrase in the language and phrases admincp menu. Add the phrase name, "searchfromfirefox", and the phrase text: "Want to search the forums from firefox?"

See it at my site : http://www.controlbooth.com/forums/search.php

I'm working on putting it in the search results as well. Will post update when that is done.

dvsDave
28 Aug 2006, 00:51
Very useful. Thank you!! Now I have a request. Please create this mod for Internet Explorer 7.

here's a link to information on how to do this, but there is already a mod created for this.

http://msdn.microsoft.com/workshop/browser/external/overview/ie7_opensearch_ext.asp

Here's the link to the mod that has already been created:

http://www.vbulletin.org/forum/showthread.php?t=119144&highlight=opensearch

dvsDave
28 Aug 2006, 01:16
I'm working on putting it in the search results as well. Will post update when that is done.
In the search_results template:

FIND:
<if condition="$displayCommon">

ADD BEFORE:

<if condition="is_browser('firefox')">
<tr>
<td class="thead" colspan="$threadcolspan" align="center">
$vbphrase[searchfromfirefox] <a href="javascript:addEngine('filename','ext','description')">Install the |your site name here| search engine!</a>
<td>
</tr>
</if>

ctrl-alt-del
28 Aug 2006, 14:59
Thanks Dave. And where is a good place to put the javascript?

function addEngine(name,ext,cat)
{
if ((typeof window.sidebar == "object") && (typeof
window.sidebar.addSearchEngine == "function"))
{
window.sidebar.addSearchEngine(
"http://www.leo.org/dict/plugins/"+name+".src",
"http://www.leo.org/dict/plugins/"+name+"."+ext,
name,cat);
alert('Download completed');
}
else
{
errorMsg(name,ext,cat);
}
}

Ntfu2
28 Aug 2006, 16:12
You can put it anywhere, but try the headinclude template

dvsDave
28 Aug 2006, 19:24
I actually just copied the javascript to blank .txt file and renamed it: addsearchengine.js and uploaded it to a new directory called search_script. First you have to edit the javascript to point to your directory where the .src and .png file are. DON'T change the "+name+"."+ext,name,cat); part, or it won't work. Then in the headinclude file, I added a link to the .js file (just look at the first link to a javascript file and copy that format) Now the javascript will be on each page and if you need to edit it, you just edit the .js file instead of having to edit the headinclude template. It's also advisable to avoid editing the headinclude template as much as possible if you think you will ever use vbSEO.

SecTa
12 Oct 2006, 04:06
action="http://SITE.com/forums/search.php?do=process&"
How can i tweak it for searching titles only?

Alfa1
14 Oct 2006, 15:02
Would it be possible to create a search function to search multiple vbulletin boards on the same subject?
Can it be done with any of the techniques above? If so: how?

Mecho
14 Oct 2006, 16:05
hi .. i create .scr file and i save it in .../searchplugins . but nothing happend :(

<search
version="7.1"
name="MechoDownload.com Search"
description="MechoDownload search engine"
action="http://www.MechoDownload.com/forum/search.php?do=process&"
searchForm="http://www.MechoDownload.com"
method="GET"
>

<input name="sourceid" value="Mozilla-search">
<input name="showposts=0&quicksearch=1&query" user="">

</search>

i copy this code on notepad and save it as SRC file on ... /searchplugins , is it right ?

tnx

Alfa1
14 Oct 2006, 16:50
There are some serious issues with the page http://www.MechoDownload.com/forum/search.php?do=process&
It loads very slow if at all.

Mecho
14 Oct 2006, 17:38
There are some serious issues with the page http://www.MechoDownload.com/forum/search.php?do=process&
It loads very slow if at all.


yea .. u right . sometimes its load so slow .. i donno why :(

i think coz of my server , isnt it ?

what shall i do with my search engine :D ?

Alfa1
15 Oct 2006, 16:50
If your search page doesn't load, this script will not work.
I do not think it is your sever alone. There are loads of functions, adds, needed plugins, etc which absorbs to much bandwidth. I am on very fast connection, and it almost doesn't load. Same goes for other pages on your site. I doubt visitors on dial up are able to access your site at all.

Mecho
16 Oct 2006, 17:21
tnx Alfa1 for reply ..

would u plz help me to fix that SCR file too ? i cannot fix it :(

Tnx

Alfa1
16 Oct 2006, 17:43
If the page http://www.MechoDownload.com/forum/search.php?do=process& doesn't load, the SCR script will not work. You need to fix that first.

Mecho
16 Oct 2006, 17:50
it works now mate .. but SCR doest work yet ..

Alfa1
19 Oct 2006, 23:39
You have followed the instructions correctly, so it should work. The only difference between your code and that of the example is that you use capitals in your url's. Try leaving them out and post if it works.

Mecho
21 Oct 2006, 16:00
First edit the javascript mentioned above for your site then add a link to it in the headinclude template.
Read the above link and then put this code in the search forums template:


FIND:

<tr>
<td class="tcat">
$vbphrase[search_forums]
</td>
</tr>



its great .. but i can not find this code in headinclude !! i check defult of it but this code is not exist .. would u plz help me .
Tnx

Mecho
21 Oct 2006, 16:00
You have followed the instructions correctly, so it should work. The only difference between your code and that of the example is that you use capitals in your url's. Try leaving them out and post if it works.

Tnx Alfa1 ... it works fine now .

Viper007Bond
29 Oct 2006, 23:22
To limit it to one or more areas of your forum, add this:

...&forumchoice[]=15&forumchoice[]=12&...

FireFish
08 Nov 2006, 23:21
It works nicely; the only problem I've seen is that if say you have hidden forums & have your browser set to automatically log you into the forum, when searching, it will search as guest even if you should automatically be logged in.

Any workaround for that?