Extensions :  K-Meleon Web Browser Forum
All about K-Meleon extensions. 
multiple group multisearch
Posted by: kmeleon_user
Date: July 16, 2010 10:52PM

i would like to see the multisearch feature extended to allow multiple groups of search engines so i could have a multisearch for torrents and one for videos and one for web search. also, maybe have an option to make multisearch (or the top multisearch group) the default search when clicking the search button.

Options: ReplyQuote
Re: multiple group multisearch
Posted by: jsnj
Date: July 17, 2010 07:23PM

Quote
kmeleon_user
...also, maybe have an option to make multisearch (or the top multisearch group) the default search when clicking the search button.

That feature is available in the Search+ extension.

Options: ReplyQuote
Re: multiple group multisearch
Posted by: JamesD
Date: July 18, 2010 05:28PM

I have some code which will allow the user to store groups of search URLs and use the groups to replace the URLs in multisearch. This is a beta version as I have not yet gotten all the text set up for translation.

@ jsnj
I could not find this function in Search+, but that could just be my lack of knowledge of the extension. I did get Grp_M_Search.kmm to work with Search+.

Attachments: Grp_M_Search.kmm (6.5 KB)  
Options: ReplyQuote
Re: multiple group multisearch
Posted by: jsnj
Date: July 18, 2010 08:16PM

Quote
JamesD
I have some code which will allow the user to store groups of search URLs and use the groups to replace the URLs in multisearch. This is a beta version as I have not yet gotten all the text set up for translation.

@ jsnj
I could not find this function in Search+, but that could just be my lack of knowledge of the extension.

The multiple group multisearch function isn't in Search+, but kmeleon_user's second request of making multisearch the default search is a feature of Search+.

Quote
JamesD
I did get Grp_M_Search.kmm to work with Search+.
Cool, I'll check it out.

Options: ReplyQuote
Re: multiple group multisearch
Posted by: JamesD
Date: July 20, 2010 12:05AM

@ jsnj

I have made many changes to Grp_M_Search.kmm for catching errors. I now catch the following:
User cancel from both add group and delete group
User empty field from both add group and delete group
Duplicate name from add group
Name containing the delimiter % from add group
Name not a group from delete group

I still need to fix the help message. The place where a user sets up the search engines is different depending on whether Search+ is installed. I have checked $macroModules, but that only identifies 'Search' no matter which system is running.

Have you an idea about what I can check so that I can present the correct instructions?

Options: ReplyQuote
Re: multiple group multisearch
Posted by: jsnj
Date: July 20, 2010 03:02AM

Quote
JamesD
@ jsnj

...
The place where a user sets up the search engines is different depending on whether Search+ is installed.

No. It's the same. So no issue there.

*Edit: I know what you mean now. It's ultimately the same place, but slightly different getting there. I couldn't change the module name from Search to Search+ because it would lose sync with configuration in Preferences. So it's only identifiable by viewing the kmm file itself and of course for those who enable the separate Search+Icon module. A checking method can be to use a pref that's automatically set by Search+ as of v1.0.4. Since features are automatically activated once installed in the latest version, the default max amount of previous searches is set to 50. You can check for Search+ by checking the existence of that pref. Something like:


$_ConfigPath="Configure";
getpref(INT, $macroPrefBranch."search.previous.max")>0 ? $_ConfigPath="Search Options - Configure Search Engines":0;



Edited 2 time(s). Last edit at 07/20/2010 04:00AM by jsnj.

Options: ReplyQuote
Re: multiple group multisearch
Posted by: JamesD
Date: July 20, 2010 09:42AM

Quote
jsnj

$_ConfigPath="Configure";
getpref(INT, $macroPrefBranch."search.previous.max")>0 ? $_ConfigPath="Search Options - Configure Search Engines":0;

I will give that a try. Might be a few day, as I must be away from home to visit relatives now. Thanks.

I will attach the code as it stands now. It is not fully tested yet.

Attachments: Grp_M_Search.7z (2.4 KB)  
Options: ReplyQuote
Re: multiple group multisearch
Posted by: kmeleon_user
Date: July 21, 2010 10:35PM

Thanks for posting this. I will try it out and post back here. Sometime... I'm fairly busy right now.

Options: ReplyQuote
Re: multiple group multisearch
Posted by: JamesD
Date: July 22, 2010 12:25AM

Last version posted has a bug with delete. Don't use. I hope to have a fully tested version soon.

Options: ReplyQuote
Re: multiple group multisearch
Posted by: JamesD
Date: July 23, 2010 01:11AM

First let me apologize for the code in the 7z file that I posted on July 20. It was not nearly as complete as it should have been. I hope I have not inconvienced any of you too much.

Now I have a question about multisearch. Is there a mimimun number of search URLs for multisearch. In my testing I have created some groups with just two URLs and it seem that KM adds my default engine to that list. I cannot find why this happens. Groups with three or more URLs do not have the problem.

Except for the item mentioned above, I think the code in the link below works.
http://dl.dropbox.com/u/1522294/Grp_M_Search_1point8.7z

Options: ReplyQuote
Re: multiple group multisearch
Posted by: jsnj
Date: July 23, 2010 06:21PM

Quote
JamesD
First let me apologize for the code in the 7z file that I posted on July 20. It was not nearly as complete as it should have been. I hope I have not inconvienced any of you too much.

Now I have a question about multisearch. Is there a mimimun number of search URLs for multisearch. In my testing I have created some groups with just two URLs and it seem that KM adds my default engine to that list. I cannot find why this happens. Groups with three or more URLs do not have the problem.

Except for the item mentioned above, I think the code in the link below works.
http://dl.dropbox.com/u/1522294/Grp_M_Search_1point8.7z

I haven't yet tested your macro, but regarding your question, only one url is required for Multisearch to be visible & usable in the search menu.

Options: ReplyQuote
Re: multiple group multisearch
Posted by: JamesD
Date: July 26, 2010 06:25PM

I think this code is stable and covers all open issues.
http://dl.dropbox.com/u/1522294/Grp_M_Search1point9.7z

The problem with groups containing less than 3 URL's is solved. KM keeps a pref(s) with the value set to missing for any group that has less than three search engines.

Options: ReplyQuote


K-Meleon forum is powered by Phorum.