Please support VectorLinux!

Author Topic: How to make VectorLinux search plugin for Firefox.  (Read 3493 times)

exeterdad

  • Packager
  • Vectorian
  • ****
  • Posts: 2046
How to make VectorLinux search plugin for Firefox.
« on: August 26, 2007, 04:46:45 pm »
Not much of a how-to, but after much trial and error I came up with this.

Open console as root and paste this command:
Code: [Select]
cat > /usr/lib/firefox-2.0.0.6/searchplugins/vectorlinux.xml << EOF
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
<ShortName>VectorLinux Forum</ShortName>
<Description>Search VectorLinux Forums</Description>
<InputEncoding>ISO-8859-1</InputEncoding>
<Image width="16" height="16">data:image/x-icon;base64,AAABAAEAEBAAAAEACABoBQAAFgAAACgAAAAQAAAAIAAAAAEACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAjAAAAIQEAACEAAAAhEEAAIQkAACEIAAAlAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAQBAQEFBQAAAAIBAQEBAAAAAQEBAQAAAAAAAQEBAAAAAQEBAAAAAP9/AAD+fwAA/H8AAPx/AAD4PwAA+D8AAPA/AADiHwAAxh8AAM8fAACPDwAAjw8AAI+HAACHgQAAwcMAAOOPAAA=</Image>
<Url type="text/html" method="post" template="http://www.vectorlinux.com/forum2/index.php?action=search2">
  <Param name="search" value="{searchTerms}"/>
  <Param name="submit" value="Search"/>
  <Param name="advanced" value="0"/>
</Url>
<SearchForm>http://www.vectorlinux.com/forum2/</SearchForm>
</SearchPlugin>
EOF
Noooo... The long line is not a typo.
Restart Firefox
Done

You will find your new VectorLinux Forum search and icon in the top right drop down box.


Enjoy  :)
« Last Edit: August 27, 2007, 04:26:43 am by exeterdad »

uelsk8s

  • Administrator
  • Vectorian
  • *****
  • Posts: 2504
Re: How to make VectorLinux search plugin for Firefox.
« Reply #1 on: August 26, 2007, 05:16:22 pm »
very cool exeterdad
Thanks

stoichyu

  • Packager
  • Vectorite
  • ****
  • Posts: 369
Re: How to make VectorLinux search plugin for Firefox.
« Reply #2 on: August 26, 2007, 06:40:29 pm »
Alternatively, you can right click the search box in the VL forums and click "Add a Keyword for this Search" Then give it a name and a keyword. Then you can just go to the address bar and type "<keyword> <search query>."
There's no place like ~.
VL 5.8 PentiumD 2.8Ghz Registered Linux User #432836

exeterdad

  • Packager
  • Vectorian
  • ****
  • Posts: 2046
Re: How to make VectorLinux search plugin for Firefox.
« Reply #3 on: August 27, 2007, 04:28:38 am »
stoichyu:
That's really slick!  I knew you could add a keyword to a web location (Very AOL-like).  But not to a target on a page.  Clever.

jovanoti

  • Member
  • *
  • Posts: 11
Re: How to make VectorLinux search plugin for Firefox.
« Reply #4 on: August 30, 2007, 02:54:35 pm »
In case you have updated Firefox with its own update manager then /usr/lib directory is /usr/lib/firefox-2.0
Just change the code to:
Code: [Select]
cat > /usr/lib/firefox-2.0/searchplugins/vectorlinux.xml << EOF
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
<ShortName>VectorLinux Forum</ShortName>
<Description>Search VectorLinux Forums</Description>
<InputEncoding>ISO-8859-1</InputEncoding>
<Image width="16" height="16">data:image/x-icon;base64,AAABAAEAEBAAAAEACABoBQAAFgAAACgAAAAQAAAAIAAAAAEACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAjAAAAIQEAACEAAAAhEEAAIQkAACEIAAAlAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8AAAAAAAAAAAABAAAAAAAAAAAAAAAAAAABAQAAAAAAAAAAAAAAAAABAQEAAAAAAAAAAAAAAAAABgEBAAAAAAAAAAAAAAAAAQEBBwEAAAAAAAAAAAAAAAEBAQEBAAAAAAAAAAAAAAEBAQEBAQAAAAAAAAAAAAEBAQADAQEBAAAAAAAAAAEDAQAAAQEBAQAAAAAAAAABBgAAAAADAQEAAAAAAAABAQQAAAAAAQEBAQAAAAAAAQMEAAAAAAEBAQEAAAAAAAEBAQAAAAAAAQEBAQAAAAABAwEDAAAAAAQBAQEFBQAAAAIBAQEBAAAAAQEBAQAAAAAAAQEBAAAAAQEBAAAAAP9/AAD+fwAA/H8AAPx/AAD4PwAA+D8AAPA/AADiHwAAxh8AAM8fAACPDwAAjw8AAI+HAACHgQAAwcMAAOOPAAA=</Image>
<Url type="text/html" method="post" template="http://www.vectorlinux.com/forum2/index.php?action=search2">
  <Param name="search" value="{searchTerms}"/>
  <Param name="submit" value="Search"/>
  <Param name="advanced" value="0"/>
</Url>
<SearchForm>http://www.vectorlinux.com/forum2/</SearchForm>
</SearchPlugin>
EOF

Really nice and helpful plugin. :)

exeterdad

  • Packager
  • Vectorian
  • ****
  • Posts: 2046
Re: How to make VectorLinux search plugin for Firefox.
« Reply #5 on: August 30, 2007, 06:22:49 pm »
Thanks jovanoti,

Useful indeed.  I haven't used the Firefox update so I wasn't aware it would shift directories on ya.