vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Community Lounge (https://vborg.vbsupport.ru/forumdisplay.php?f=13)
-   -   Search your forum directly from Firefox (https://vborg.vbsupport.ru/showthread.php?t=102814)

Alan @ CIT 12-12-2005 07:35 PM

Search your forum directly from Firefox
 
1 Attachment(s)
This isn't really a vB addon, so I decided to post here instead of as a release :)

This little mod lets you search your vBulletin 3.5 forum directly from within Firefox, using Firefox's quick search box (to the right of the Address box).

It adds an option to the dropdown menu in that box to search your forum.

Installation:
Extract the zip file to:

Code:

C:\Program Files\Mozilla Firefox\searchplugins
(or whereever the correct folder may be on your system :))

Now edit the vbulletin.src file using any text editor. You need to edit the following 2 lines:

Code:

action="http://www.your-website.com/forum/search.php"
searchForm="http://www.your-website.com/forum/search.php"

Edit these, and put your website / forum path in there instead.

Once done, save the file, load Firefox, and it (should) appear in the search dropdown :)

Alan.

Wayne Luke 12-12-2005 07:49 PM

I used to have a addition to my Windows XP Taskbar that searched right from there. Have to look and see if I still have it. Was back from 2002. Worked in any browser.

Protoman 12-12-2005 08:31 PM

to add an automated installer for your forum members.. here's a very basic web page that shows what you need.
Code:

<html>
<head><title>yourSite Search installer..</title></head>
<body>
<script
  type="text/javascript">
<!--
function errorMsg()
{
  alert("Netscape 6 or Mozilla is needed to install a sherlock plugin");
}
function addEngine(name,ext,cat,type)
{
  if ((typeof window.sidebar == "object") && (typeof
  window.sidebar.addSearchEngine == "function"))
  {
    //cat="Web";
    //cat=prompt('In what category should this engine be installed?','Web')
    window.sidebar.addSearchEngine(
      "http://yourSite.com/searchbox/"+name+".src",
      "http://yourSite.com/searchbox/"+name+"."+ext,
      name,
      cat );
  }
  else
  {
    errorMsg();
  }
}
//-->
</script>

<h2>Add yourForum search to your right search box in Mozilla Firefox</h2>
<a href="javascript:addEngine('srcName','imageType','General','0')">Click to Install..</a>
</body>
</html>

upload your .src file and image (png, gif, jpg) to the folder specified above (example is :/searchbox/)
srcName should be the name of your .src file without the .src extension
imageType should be png, gif, or jpg

EricaJoy 12-12-2005 09:23 PM

/me wants to click install

filburt1 12-13-2005 02:34 PM

Loverly. I will now steal.

edit: Theft complete. Now to thief me, modify search_forums:
HTML Code:

<if condition="is_browser('firefox') or is_browser('mozilla')">
        <br />
        <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
                <thead>
                        <tr>
                                <td class="tcat">Search $vboptions[bbtitle] from <if condition="is_browser('firefox')">Firefox<else />Mozilla</if>'s toolbar</td>
                        </tr>
                </thead>
                <tbody>
                        <tr>
                                <td class="alt1">
                                        <p>You can search $vboptions[bbtitle] directly from the &quot;Search&quot; field of
                                                <if condition="is_browser('firefox')">Firefox<else />Mozilla</if>'s
                                                toolbar. Simply select the link below. When installed, you can select the icon in the left of the search box and
                                                select &quot;$vboptions[bbtitle].&quot;
                                        </p>
                                  <p>Unlike many other searching assistants, this one does not include spyware or even software that installs on your computer. It simply adds an
                                                additional searching source to <if condition="is_browser('firefox')">Firefox<else />Mozilla</if>'s capabilities.
                                                <a href="view-source:$vboptions[bburl]/search.php?$session[sessionurl]" target="_blank">View this page's source</a>
                                                to see how it works.</p>
                                </td>
                        </tr>
                       
                        <tr>
                                <td class="alt2">
                                        <script type="text/javascript">
                                                <!--
                                                        // yes you can copy this script for your own use given how simple it is
                                               
                                                        var mozillaSearchTitle = "$vboptions[bbtitle] Toolbar Search";
                                                        var mozillaSearchFile = "wdfMozillaSearch";
                                               
                                                        function updateMozillaSearch()
                                                        {
                                                                if ((typeof window.sidebar == "object") && (typeof window.sidebar.addSearchEngine == "function"))
                                                                {
                                                                        window.sidebar.addSearchEngine(
                                                                                "$vboptions[bburl]/" + mozillaSearchFile + ".src",
                                                                                "$vboptions[bburl]/" + mozillaSearchFile + ".png",
                                                                                mozillaSearchTitle, "Web");
                                                                }
                                                                else
                                                                {
                                                                        alert("Installing the $vboptions[bbtitle] search toolbar functionality failed.\n" +
                                                                                "Are you using Firefox or Mozilla and did you confirm any security prompts?");
                                                                }
                                                        }
                                                // -->

                                        </script>
                               
                                        <a href="javascript: updateMozillaSearch()">Add $vboptions[bbtitle] search capabilities to
                                                <if condition="is_browser('firefox')">Firefox<else />Mozilla</if></a>
                                </td>
                        </tr>
                </tbody>
        </table>
</if>


Dollah 12-13-2005 03:43 PM

thanx will try this

EricaJoy 12-13-2005 11:06 PM

Quote:

Originally Posted by filburt1
Loverly...

Here I thought I was the only one who said loverly.

KW802 04-12-2006 05:03 PM

Is there any type of JS check that could be done to the browser client to see if they already have it installed or not?

filburt1 04-12-2006 10:06 PM

Use is_browser() in a template.

KW802 04-12-2006 11:58 PM

Quote:

Originally Posted by filburt1
Use is_browser() in a template.

Filburt, I must not have had enough caffiene today... I know is_browser() can tell me if they're using FF or not but how would I use it to see if they already have the search engine installed? :nervous:

filburt1 04-13-2006 12:16 AM

Oh. Next time I'll, you know, read the post. :)

KW802 04-13-2006 12:38 AM

Quote:

Originally Posted by filburt1
Oh. Next time I'll, you know, read the post. :)

I was hoping you had some kind of trick up your sleeve that I wasn't thinking of. Shucks. :p

Code Monkey 04-13-2006 02:03 AM

Quote:

Originally Posted by KW802
Is there any type of JS check that could be done to the browser client to see if they already have it installed or not?

I went through this issue when I made one of these for my forums last year. The answer, no. It's a security issue.


All times are GMT. The time now is 03:38 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.01343 seconds
  • Memory Usage 1,770KB
  • 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
  • (3)bbcode_code_printable
  • (1)bbcode_html_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (13)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete