Searching Mint Forums - A Better Way

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
altair4
Level 20
Level 20
Posts: 11419
Joined: Tue Feb 03, 2009 10:27 am

Searching Mint Forums - A Better Way

Post 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
Restart Firefox if you have it open and see if Mint Forums is listed in the combo box.
Last edited by altair4 on Sat Dec 06, 2014 11:37 am, edited 11 times in total.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
dlkreations

Re: Searching Mint Forums - A Better Way

Post by dlkreations »

Nicely done. Works rather well too. Thanks!
exploder
Level 15
Level 15
Posts: 5623
Joined: Tue Feb 13, 2007 10:50 am
Location: HartfordCity, Indiana USA

Re: Searching Mint Forums - A Better Way

Post by exploder »

Thanks altair4! I asked if this could be added to mint 7. This is a very nice little feature! :D
emorrp1

Re: Searching Mint Forums - A Better Way

Post 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.
Husse

Re: Searching Mint Forums - A Better Way

Post by Husse »

I use this and it goes to the Mint search and thanks emorrp1 for reminding
markcynt

Re: Searching Mint Forums - A Better Way

Post by markcynt »

It doesn't use Mint's Google for me either.
altair4
Level 20
Level 20
Posts: 11419
Joined: Tue Feb 03, 2009 10:27 am

Re: Searching Mint Forums - A Better Way

Post 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"
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
markcynt

Re: Searching Mint Forums - A Better Way

Post by markcynt »

Yes, that solved it for me. Thanks altair4.
smokeymtn_ron
Level 3
Level 3
Posts: 192
Joined: Mon May 18, 2009 8:03 pm
Location: Southeast Asia

Re: Searching Mint Forums - A Better Way

Post 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
emorrp1

Re: Searching Mint Forums - A Better Way

Post by emorrp1 »

altair4 wrote:In Mint: /usr/lib/firefox-addons/searchplugins
smokeymtn_ron
Level 3
Level 3
Posts: 192
Joined: Mon May 18, 2009 8:03 pm
Location: Southeast Asia

Re: Searching Mint Forums - A Better Way

Post 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
markcynt

Re: Searching Mint Forums - A Better Way

Post 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
smokeymtn_ron
Level 3
Level 3
Posts: 192
Joined: Mon May 18, 2009 8:03 pm
Location: Southeast Asia

Re: Searching Mint Forums - A Better Way

Post 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
markcynt

Re: Searching Mint Forums - A Better Way

Post by markcynt »

Glad I could help.

Mark
sausageandeggs

Re: Searching Mint Forums - A Better Way

Post 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!!
altair4
Level 20
Level 20
Posts: 11419
Joined: Tue Feb 03, 2009 10:27 am

Re: Searching Mint Forums - A Better Way

Post 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?
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
sausageandeggs

Re: Searching Mint Forums - A Better Way

Post 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.
altair4
Level 20
Level 20
Posts: 11419
Joined: Tue Feb 03, 2009 10:27 am

Re: Searching Mint Forums - A Better Way

Post 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:
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
gravelbay

Re: Searching Mint Forums - A Better Way

Post 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. :?:
Husse

Re: Searching Mint Forums - A Better Way

Post by Husse »

This is for FF 3.0 not 3.5
I don't know how to correct for the new version
Post Reply

Return to “Tutorials”