vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Integration with vBulletin - Search Your Site From Firefox (https://vborg.vbsupport.ru/showthread.php?t=125034)

Ntfu2 08-27-2006 03:14 PM

Quote:

Originally Posted by Mattikana
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 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 08-27-2006 03:20 PM

Quote:

Originally Posted by ctrl-alt-del
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 08-27-2006 04:58 PM

Quote:

Originally Posted by Ntfu2
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 08-27-2006 10:35 PM

This is great. Thanks!

dvsDave 08-27-2006 11:39 PM

Quote:

Originally Posted by Mattikana
http://www.captain.at/howto-firefox-...rch-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:
Code:

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

ADD AFTER:
Code:

<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 08-27-2006 11:51 PM

Quote:

Originally Posted by ctrl-alt-del
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/b...search_ext.asp

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

https://vborg.vbsupport.ru/showthrea...ght=opensearch

dvsDave 08-28-2006 12:16 AM

Quote:

Originally Posted by dvsDave
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:
Code:

<if condition="$displayCommon">
ADD BEFORE:
Code:

<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 08-28-2006 01:59 PM

Thanks Dave. And where is a good place to put the javascript?

Code:

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 08-28-2006 03:12 PM

You can put it anywhere, but try the headinclude template

dvsDave 08-28-2006 06:24 PM

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.


All times are GMT. The time now is 08:31 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01162 seconds
  • Memory Usage 1,750KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_code_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete