Page 1 of 4

Searching Mint Forums - A Better Way

Posted: Thu May 14, 2009 1:05 pm
by altair4
NOTE: Because of changes to firefox over time there is a better way to do this and that was supplied by another member ( caribriz ) futher down in this topic. He's done all the hard work for you so it becomes even easier: http://forums.linuxmint.com/viewtopic.p ... 40#p949811

There is something very peculiar about the search function within this forum. I often don't get any results even though I'm using common linux terms in my search. Either that or I get far too many and it takes me forever go go through then all. I've come to use googles "advanced" search function to search instead of the forum search.
It looks like this in the search bar in Firefox: site:forums.linuxmint.com term1 term2 term3 ... Since you're using google to perform the search you have access to all of googles syntax.

Although that works it is a pain to go through that every time I need to do a search. There is a better way - create your own Firefox Search Engine for Mint Forums and add it to the "searchplugins" directory:

Create a new file with this contents:

Code: Select all

<search
name="Mint Forums"
method="GET"
action="http://www.google.com/search"
queryCharset="utf-8"
>

<input name="q" user>
<input name="sitesearch" value="forums.linuxmint.com">
</search>
And save it to this location:
/home/altair/.mozilla/firefox/mwad0hks.default/searchplugins/mint-forums.src
You may have to create the searchplugins directory first. Change altair and mwad0hks.default to your own values

You can also create an icon to go with that entry. It must be a 16x16 gif with the same file name as the scr file but with a gif extension, like mint-forums.gif and it must be saved in the same directory as the src file. Or you can use mine:
mint-forums.gif
mint-forums.gif (1.05 KiB) Viewed 21698 times
Restart Firefox if you have it open and see if Mint Forums is listed in the combo box.

Re: Searching Mint Forums - A Better Way

Posted: Thu May 14, 2009 5:24 pm
by dlkreations
Nicely done. Works rather well too. Thanks!

Re: Searching Mint Forums - A Better Way

Posted: Fri May 15, 2009 3:47 am
by exploder
Thanks altair4! I asked if this could be added to mint 7. This is a very nice little feature! :D

Re: Searching Mint Forums - A Better Way

Posted: Fri May 15, 2009 9:15 am
by LuxTux
Great idea! this made me think and I made a firefox search extension for the forum. I tried to add a direct link to the file but since ie7 (or later) and firefox 2 (or later) need a javascript line to install the search providers. you'll have to go to this page to install it

Re: Searching Mint Forums - A Better Way

Posted: Wed May 20, 2009 2:26 am
by emorrp1
LuxTux, good work, but is there anyway you could make it use mint's google (you just add a cse bit to the url I think) that way there's plenty of cash for linux mint.

Re: Searching Mint Forums - A Better Way

Posted: Wed May 20, 2009 6:35 am
by Husse
I use this and it goes to the Mint search and thanks emorrp1 for reminding

Re: Searching Mint Forums - A Better Way

Posted: Wed May 20, 2009 8:04 am
by markcynt
It doesn't use Mint's Google for me either.

Re: Searching Mint Forums - A Better Way

Posted: Wed May 20, 2009 8:47 am
by altair4
Is this better ?

Code: Select all

<search 
 name="Mint Forums"
 method="GET"
 action="http://www.google.com/cse"
 queryCharset="utf-8"
> 

  <input name="q" user>
  <input name="cx" value="002683415331144861350%3Atsq8didf9x0"
  <input name="sitesearch" value="forums.linuxmint.com">
</search>
I'm in windows at the moment but when I now do a google search on the forums I get the Mint "branded" search results page.

The line that changed is: action="http://www.google.com/cse"
A line is added: <input name="cx" value="002683415331144861350%3Atsq8didf9x0"

Re: Searching Mint Forums - A Better Way

Posted: Wed May 20, 2009 9:16 am
by markcynt
Yes, that solved it for me. Thanks altair4.

Re: Searching Mint Forums - A Better Way

Posted: Tue Aug 25, 2009 11:43 pm
by smokeymtn_ron
LuxTux,
you'll have to go to this page to install it
I did this, and it works, but it doesn't show up in my searchplugins folder. I too want it to use the Mints google, but I can't find the file to edit. :( :(

Ron

Re: Searching Mint Forums - A Better Way

Posted: Wed Aug 26, 2009 3:22 am
by emorrp1
altair4 wrote:In Mint: /usr/lib/firefox-addons/searchplugins

Re: Searching Mint Forums - A Better Way

Posted: Wed Aug 26, 2009 6:07 pm
by smokeymtn_ron
I've looked in there and do not see it. What is the name of the file? Is it 'mint forums' or something else? Maybe I'm looking for the wrong name :oops: . I really want to change it so Mint gets the money :D

Thanks,
Ron

Re: Searching Mint Forums - A Better Way

Posted: Wed Aug 26, 2009 6:14 pm
by markcynt
Try this.

Copy the code in post # 8

Paste into text editor

Name it mint-forums.src

Save to desktop

Open Nautilus as root

Browse to /usr/lib/firefox-addons/searchplugins

Copy file on Desktop and paste into /usr/lib/firefox-addons/searchplugins

Re: Searching Mint Forums - A Better Way

Posted: Wed Aug 26, 2009 7:19 pm
by smokeymtn_ron
markcynt,
:D :D That worked :D :D Thank you very much. (I tried that yesterday and it didn't work. Maybe because I wasn't using Nautilus?) :roll:

Thanks,
Ron

Re: Searching Mint Forums - A Better Way

Posted: Thu Aug 27, 2009 6:22 am
by markcynt
Glad I could help.

Mark

Re: Searching Mint Forums - A Better Way

Posted: Fri Nov 06, 2009 6:34 pm
by sausageandeggs
There is also another way to search the forum easily with google if you use firefox.If you follow the instructions on http://kb.mozillazine.org/Using_keyword_searches you can search the forum from your address bar.

How:
Bookmark forum hompage http://forums.linuxmint.com/
Edit the new bookmarks preferences, Give it a short keyword (i used m)
Edit the URL of bookmark adding " ?*=%s " (Where * is your keyword)
(So my URL with a keyword of "m" is " http://forums.linuxmint.com/?m=%s" )
Then to search the forum just type your keyword into the address bar followed by what your searching for. e.g i would type " m sound " into the address bar to search the forum for "sound"

Hope that makes sense!!

Re: Searching Mint Forums - A Better Way

Posted: Sat Nov 07, 2009 10:06 am
by altair4
I'm having a couple of problems with your suggestion:

(1) The problem I was addressing in my original post related to deficiencies in the built in search facility of the forum itself. It often ignores certain keywords using some kind of algorithm that I don't quite understand. My solution was to use google's "site search" facility to work around these deficiencies. If I understand your post, you're using the forum search facility so the problem still exists.

(2) For the life of me I can't get it to work. I copy and pasted your example:
Location: "http://forums.linuxmint.com/?m=%s" <--- without the quotes
Keyword: m

Then I issued the following into the address bar: m automount fred
It brought me to the main page of the forum

I tried different variations, for example:
Location: "http://forums.linuxmint.com/search.php?m=%s"
That brought me to the "Advanced Search" page requireing me to input my search terms.

What am I doing wrong? Is there some setting in mozilla that needs to be changed to make this work?

Re: Searching Mint Forums - A Better Way

Posted: Sat Nov 07, 2009 3:48 pm
by sausageandeggs
Hi, I hadn't thought about your first point so it may still using the site search engine, i dont know, my results always show up on a google page though, and the url points to a google site search. I tried it with your search request "m automount fred" and it gave me this http://www.google.com/cse?q=automount+f ... uxmint.com Don't know if thats the right results for you.(*Edit - I've just compared these results to the ones i get using the code from your OP and the results are nearly identical. So I think it is using google site search*)
As for why it wont work for you i don't know, I haven't changed anything in FF, the only thing i can suggest is to do it the long(ish) way and go to the forum home page and bookmark it and then edit the url adding ?"keyword"=%s and keyword, rather than copy paste.Thats how i did it (and have done it for a few sites now). The full "http://forums.linuxmint.com/?m=%s" link was acting strangely when i was writing the original post, i was trying to put the [url] brackets around it but it wouldn't show up as a link, i doubt thats affected anything but you never know.
Sorry i can't be of more help.

Re: Searching Mint Forums - A Better Way

Posted: Sat Nov 07, 2009 5:02 pm
by altair4
Fascinating. Well, the important things about your method is the cse and the cx=002683415331144861350 so the folks who run Mint are happy.

It is in fact doing a google "site search" as my method does.

It's a lot simpler.

I still have no idea why it doesn't work for me. In fact I don't even understand how it gets to google since there isn't even a reference to google in the bookmark. :?:

I'll play with this later - must be something I'm overlooking :wink:

Re: Searching Mint Forums - A Better Way

Posted: Sat Jan 30, 2010 7:09 pm
by gravelbay
Has there been a change to the site or to Firefox that would cause this to not work?

I just copied & pasted the text into my /usr/lib/firefox-addons/searchplugins directory along with the icon file and I now have the little icon up there on the toolbar in Firefox (version 3.5.7). When I hover over it, I get a pop-up that says, "This web site does not supply identity information." If I click it, I get the same plus, "Your connection to this web site is not encrypted." Clicking on the "More information" button doesn't yield anything that looks to me like useful information. :?: