Bugs :  K-Meleon Forum
You can talk about issues with k-meleon here.  
Pages: 12Next
Current Page: 1 of 2
[1.0RC1] Search Engine Configure
Posted by: ndebord
Date: June 04, 2006 03:51AM

Search Engine configuration? This has changed into a setting in Advanced Preferences (may have been there before, but I did not notice the change).

It seems you have 9 search engines in the dropdown menu (Tools/Web Search/Configure)? Can that be changed somwhere?

It also looks like a large number of search engines are available already? But not all. I don't see any place to add search engines from Wiki as you did in the past? Manually?

Help me out here in understanding how this all works now.

Much thanks,

N

Options: ReplyQuote
Re: [1.0RC1] Search Engine Configure
Posted by: kko
Date: June 04, 2006 02:33PM

It seems you have 9 search engines in the dropdown menu (Tools/Web Search/Configure)? Can that be changed somwhere?

Advanced Preferences can configure 10 engines for the Web Search menu. If you want more engines, you can still add new macros and menu entries as before. If you want less than 10, you can comment out some menu entries (macros(SE#)) in menus.cfg.

It also looks like a large number of search engines are available already? But not all. I don't see any place to add search engines from Wiki as you did in the past? Manually?

I've added all engines from the wiki that are applicable. You can manually add new engines in search.cfg. Choose Edit > Configuration > Search Engines.

Options: ReplyQuote
Re: [1.0RC1] Search Engine Configure
Posted by: rmn
Date: June 04, 2006 05:02PM

Wow, thanks, kko. I've been toying around with the idea of configurable search engines for some time (partly for the searchbar plugin). In fact, I've just created a working macros-based prototype yesterday. Had I known this functionality exists in RC1, I wouldn't have bothered. :-)

By the way, I noticed the comment in SearchCfg. This bug has been somewhat fixed. You need to write `while ($n < +10)` instead of `while ($n < 10)`. But using != doesn't hurt, I guess (and a tiny bit faster).

Options: ReplyQuote
Re: [1.0RC1] Search Engine Configure
Posted by: rmn
Date: June 04, 2006 05:13PM

On second thought, I'm not sure $n < +10 works, because Dorian's example shows both operands using + signs. Probably it has to be +$n < +10, but I haven't checked.

Options: ReplyQuote
Re: [1.0RC1] Search Engine Configure
Posted by: ndebord
Date: June 04, 2006 09:43PM

kko,

<<Advanced Preferences can configure 10 engines for the Web Search menu. If you want more engines, you can still add new macros and menu entries as before. If you want less than 10, you can comment out some menu entries (macros(SE#)) in menus.cfg.>>

Thanks. I was getting confused there as I was looking in the wrong place. I looked in Tools/WebSearch/Configure in the expectation that it worked as before where you cut and pasted into MACROS and MENUS whichever search engines you wished to add. This looks far easier, if only you remember to look in the right place!

<g>

N

Options: ReplyQuote
Re: [1.0RC1] Search Engine Configure
Posted by: jsnj
Date: June 05, 2006 12:18AM

kko,

<<Advanced Preferences can configure 10 engines for the Web Search menu. If you want more engines, you can still add new macros and menu entries as before. If you want less than 10, you can comment out some menu entries (macros(SE#)) in menus.cfg.>>

Thanks. I was getting confused there as I was looking in the wrong place. I looked in Tools/WebSearch/Configure in the expectation that it worked as before where you cut and pasted into MACROS and MENUS whichever search engines you wished to add. This looks far easier, if only you remember to look in the right place!

<g>

N


Looks good :-). Seems you also have to add new engines to prefs which is new, but I think 10 is enough for most even though I and I assume ndebord use more.

Options: ReplyQuote
Re: [1.0RC1] Search Engine Configure
Posted by: ndebord
Date: June 05, 2006 06:21AM

jsnj,

Just a tad more...46, not counting some that I've commented out in Menus.Cfg and "may" let back in if I need them.

<g>

N

Options: ReplyQuote
Re: [1.0RC1] Search Engine Configure
Posted by: ndebord
Date: June 05, 2006 10:01PM

kko,

Before I start messing around with the MENUS and MARCROS files to change the search engine behavior, a couple questions. IF I add search engines the way we did with KM 0.9, how will that show up in KM 1.0RC1?

For instance, I'm in KM 0.9 now and if I right click on the search engine icon or if I click on Tools/Web Search, I get a drop down dialog list of all the search engines available and can scroll them to use something other than my default search engine (currently Google). Would I be able to do that with RC1? In addiition to the 10 item menu method?

Tks,

N

Options: ReplyQuote
Re: [1.0RC1] Search Engine Configure
Posted by: kko
Date: June 06, 2006 06:06AM

Probably it has to be +$n < +10 ...

Thank you rmn, for pointing me into that direction! I've assumed something like this, but I haven't known your bug report. I'm currently collecting such issues for the new documentation. If you (or anybody else) know more such macro bugs or strangenesses, feel free to mail me: kkoATfreakmailDOTde


I looked in Tools/WebSearch/Configure in the expectation that it worked as before where you cut and pasted into MACROS and MENUS whichever search engines you wished to add. This looks far easier, ...

I hope it is! I thought, it might be a bit too much wanted from inexperienced users to mess with macros AND menus...

... if only you remember to look in the right place!

I guess, you will quickly get used to it (it works like mouse gestures). But, you're right, we will have to update the user's guide. (more work to do... smiling smiley


Seems you also have to add new engines to prefs which is new, but I think 10 is enough for most even though I and I assume ndebord use more.

The number of ten engines is indeed a compromise. Ten engines out of the box is more than we had before and I also thought it would be enough for most users. But experienced guys like you should easily be able to extend this number:

1) You can add new search engine macros as you did before (with a fixed menu name and the url built into the macro, without need to add new prefs).

2) You can extend my series of SE[number] macros and define new prefs. In this case, you may want to try my config macros (just uncomment the related entries in menus.cfg). These can be used as an alternative to Advanced Preferences (not as convenient but less limited in number).

3) You can combine 1) and 2).


IF I add search engines the way we did with KM 0.9... Would I be able to do that with RC1? In addiition to the 10 item menu method?

Yes, yes, of course! (See above.) In case of problems, post here or mail me...


BTW: When you select a text that is a valid URL and then choose to 'Go to URL', the URL is made invalid by $word=urlencode($word); inside SearchOpen. Macros should look like this:

Search{
$SearchEngineURL==""?$SearchEngineURL=getpref(STRING,$SearchEngine):0;
$SearchEngineName==""?$SearchEngineName=getpref(STRING,$SearchName):0;
$word=$SelectedText; $word==""?$word=$URLBAR:0; $word==""?$word=$URL:0; $word=urlencode($word);
$word==urlencode($URL)?&SearchPrompt:&SearchOpen; $SearchEngineURL=""; $SearchEngineName="";
}
SearchPrompt{
$word=prompt(_("Search term:"),sub("%s",$SearchEngineName,_("Web Search (%s)")));
$word==""?0:$word=urlencode($word); $word==""?0:&SearchOpen;
}
SearchOpen{
#$word=urlencode($word); --> REMOVE
$how=getpref(INT,$so);
$how==0?open($SearchEngineURL.$word):&ResetURL;
$how==1?($layer==true?pluginmsg(layers,"OpenURL",$SearchEngineURL.$word):opennew($SearchEngineURL.$word)):0;
$how==2?($layer==true?pluginmsg(layers,"OpenURLBg",$SearchEngineURL.$word)surprised smileypenBg($SearchEngineURL.$word)):0;
}

Options: ReplyQuote
Re: [1.0RC1] Search Engine Configure
Posted by: jsnj
Date: June 06, 2006 10:33AM

1) You can add new search engine macros as you did before (with a fixed menu name and the url built into the macro, without need to add new prefs).

If you alter the script slightly by separating the lock portion from the SEgo macro:

SEgo{
$SearchEngineURL=getpref(STRING,$se.$n.".url"); $SearchEngineName=getpref(STRING,$se.$n.".name"); &SELockChk;
}
SELockChk{
$locked=getpref(BOOL,$sl);
$locked==true?0confused smileyetpref(STRING,$SearchEngine,$SearchEngineURL);
$locked==true?0confused smileyetpref(STRING,$SearchName,$SearchEngineName);
$locked==true?0:&EngineSync; &Search;
}


it'll allow new engines to be added very similarly to v0.9, like this:

Ebay{
$SearchEngineURL = "http://search.ebay.com/";;
$SearchEngineName = "Ebay"; &SELockChk;
}


EngineSync{
setcheck("macros(Ebay)", getpref(STRING, $SearchName) == "Ebay" ? true:false);
}


That's a little easier for users than the SNO+ route plus prefs.js method. Then all that's needed is to update the library.

Options: ReplyQuote
Re: [1.0RC1] Search Engine Configure
Posted by: kko
Date: June 06, 2006 06:48PM

Agreed. I'll update it for the next release.

Options: ReplyQuote
Re: [1.0RC1] Search Engine Configure
Posted by: bst82551
Date: June 07, 2006 03:03AM

That's quite an extensive library to update. Does anyone know of any tools that could be used to replace only certain parts of the text... so that the update of the Search Library wouldn't take as long?

Brian

Options: ReplyQuote
Re: [1.0RC1] Search Engine Configure
Posted by: rmn
Date: June 07, 2006 05:25AM

Tell me what the differences are specifically. I'll see what I can do with that.

Options: ReplyQuote
Re: [1.0RC1] Search Engine Configure
Posted by: ndebord
Date: June 07, 2006 05:41AM

jsnj,

I'd like to see your modified macro make it into the next RC. I have yet to try it out, but I wonder if the two methods (10 configurable search engines in a menu) and the right click omnibus list could coexist?

N

Options: ReplyQuote
Re: [1.0RC1] Search Engine Configure
Posted by: ndebord
Date: June 09, 2006 01:11PM

jsnj,


O.K. I changed the lock portion from the default to this new code:

SEgo{
$SearchEngineURL=getpref(STRING,$se.$n.".url"); $SearchEngineName=getpref(STRING,$se.$n.".name"); &SELockChk;
}
SELockChk{
$locked=getpref(BOOL,$sl);
$locked==true?0confused smileyetpref(STRING,$SearchEngine,$SearchEngineURL);
$locked==true?0confused smileyetpref(STRING,$SearchName,$SearchEngineName);
$locked==true?0:&EngineSync; &Search;
}

Tried to add in your example of eBay, but got macro redirection errors. Could
you lead me through the steps of where and how that info should be put into the
macro file?

Tks for your patience.

N

Options: ReplyQuote
Re: [1.0RC1] Search Engine Configure
Posted by: jsnj
Date: June 13, 2006 06:38AM

jsnj,

but I wonder if the two methods (10 configurable search engines in a menu) and the right click omnibus list could coexist?



Yes. The slight change allows the two methods to coexist seemlessly.


Tried to add in your example of eBay, but got macro redirection errors.

Redefinition errors mean that you have more than one macro with the same name. In the Ebay example above, make sure you didn't add a duplicate EngineSync macro.

Just add:

setcheck("macros(Ebay)", getpref(STRING, $SearchName) == "Ebay" ? true:false);

within the existing EngineSync macro.

Options: ReplyQuote
Re: [1.0RC1] Search Engine Configure
Posted by: jsnj
Date: June 13, 2006 09:50AM

kko,

On second thought, it'll be easier for all involved if a dummy macro was added and a few variable & macro names were changed. This way users can copy & paste their engines directly from their v0.9 macro file over to v1.0. No laborious updating of the library would be needed. Two separate libraries won't have to be maintained for KMv0.9(Mozilla) and KMv1.0(SM). And the SN0 method remains intact. Also, since the variable names are smaller, the macro file size decreases a smidgeon :-)

1.Add

OldSearch{
}




2.Change the following variable names:

$SearchName becomes $sen

$SearchEngineURL becomes $eng

$SearchEngineName becomes $search



3.Change the SEgo macro to:

SEgo{
$eng=getpref(STRING,$se.$n.".url"); $search=getpref(STRING,$se.$n.".name"); &SetSearch;
}
SetSearch{
$locked=getpref(BOOL,$sl);
$locked==true?0confused smileyetpref(STRING,$SearchEngine,$eng);
$locked==true?0confused smileyetpref(STRING,$sen,$search);
$locked==true?0:&EngineSync; &Search;
}


Options: ReplyQuote
Re: [1.0RC1] Search Engine Configure
Posted by: ndebord
Date: July 11, 2006 01:40AM

kko U jsnj,

Looking at RC2, I don't see your revise of the Ego macro, so I wonder if it will make it into the final or IF we will have to deal with the new menu system and its limitations?

N

Options: ReplyQuote
Re: [1.0RC1] Search Engine Configure
Posted by: kko
Date: July 11, 2006 09:07AM

RC2 has all you need, N.

See macros.cfg line # 1374 and following. Just copy your old engine macros from 0.9 over to 1.0, replace the dummy macro EngineSync by your old one (don't touch EnginesSync), add your menu entries and go play...

Report any problems.

Options: ReplyQuote
Re: [1.0RC1] Search Engine Configure
Posted by: ndebord
Date: July 11, 2006 03:23PM

kko,

Didn't work. Created an open error that I've never seen before. Had to CAD to close that down and then copy over the old macros.cfg file I had backed up to rerun the browser.

N
W98se

Options: ReplyQuote
Re: [1.0RC1] Search Engine Configure
Posted by: kko
Date: July 11, 2006 05:24PM

Well, N, "Didn't work" doesn't help me to help you. As long as I don't know what you actually did, I can't tell you what's wrong. Consider to try it again. It works for me. If you fail again, consider to send me your modified macros.cfg (kkoATfreakmailDOTde). Out of the distance I can't do much...

Options: ReplyQuote
Re: [1.0RC1] Search Engine Configure
Posted by: ndebord
Date: July 12, 2006 12:21AM

kko,

If I knew what the open error meant, I'd tell you. As it was, suffice to say that I had to Ctrl Alt Delete to end it. As for the rest, put what you said, where you said to. If you'd care to cut and paste a complete sample into the message board here, that may help me decipher if I managed to put stuff in the wrong place.

N

Options: ReplyQuote
Re: [1.0RC1] Search Engine Configure
Posted by: jsnj
Date: July 12, 2006 06:25AM

ndebord,

Worked when I tried. If you want, post what you added here and maybe we can see where the problem is.


kko,

Advanced users & would-be developers will appreciate the Table of Contents inclusion, but it might be more helpful for new and less "techie" users to move the engines sections in macros & menus back to the top, right below the table of contents. Other than emailing, searching is the most important internet feature for most users. Copy & pasting into config files is already an ask for most. Having to sift through the file to a specific area is even more of an ask. A bit too much of one IMO.

Options: ReplyQuote
Re: [1.0RC1] Search Engine Configure
Posted by: ndebord
Date: July 12, 2006 02:55PM

kko and jsnj,

Didn't work again and I don't have the time to figure out where I went wrong, so I'll not be doing a fresh install. The line number location idea didn't work because I had already made earlier changes to the macro file. My suggestion is a simple one, a complete sample so others can see exactly where all the stuff goes. (Either here or in the next release.)

Personally, I do not like the new menu search engines. Too few and I liked right clicking on any of my many search engines to temporarily use them instead of my default engine (Google).

N

Options: ReplyQuote
Re: [1.0RC1] Search Engine Configure
Posted by: ndebord
Date: July 12, 2006 04:31PM

As I look at the search engine macro issue, the one good thing "can be" the ability to have it both ways. Although I'm not in love with the new menu system, the idea that you can have your search menus so easily configurable is not a bad one. However, I think it will be an even better idea if you have both systems up and running, which is possible if you expand the rudimentary notation for KM 0.9 search macros into a complete example. Kind of like having your cake and eating it too, a long-standing K-Meleon tradition!

N

Options: ReplyQuote
Re: [1.0RC1] Search Engine Configure
Posted by: ndebord
Date: July 12, 2006 04:58PM

jsnj,

Yes, the search engine reference should be at the top of the Menu where you can easily use it to change default engine info.

N

Options: ReplyQuote
Re: [1.0RC1] Search Engine Configure
Posted by: kko
Date: July 12, 2006 05:36PM

@ndebord:

1) Open your 1.0 macros.cfg and search the file for "EngineSync{". You will find these two lines:
EngineSync{
}
Comment them out or simply delete them.

2) Open your 0.9 macros.cfg and copy your engine macros and the macro named "EngineSync" over to your 1.0 macros.cfg (you can paste them wherever you like).

3) Save your modified 1.0 macros.cfg and restart K-Meleon 1.0.

That's all!



@jsnj:

We already know that the macros file is by far too large to be user-friendly. Dorian plans to split this file in the future. And this is one of the reasons, why it is structured as it is.

Can you imagine what a new and less "techie" user who is aked to mess with menus and macros in order to add a new search engine will think by himself? "Forget about it!" At least, that's what I once thought. And that's why we have the new system. Those who want to migrate their engine macros from 0.9 over to 1.0 cannot be called new users, obviously. With our help they should be able to make it. Besides that, look who posted to this thread. This doesn't seem to be a very popular topic...

Options: ReplyQuote
Re: [1.0RC1] Search Engine Configure
Posted by: ndebord
Date: July 13, 2006 12:32AM

kko,

Ah, perhaps the reason why there is so little discussion about the new search menu system is because there was no debate about it before it just showed up one day as a fait accompli or done deal as we say in the states.

I'm not against the system, I just think both systems complement each other. As for the size of the macro file, that is an issue that should be addressed and I see Dorian's doing it by moving some entries out of macros altogether, a good idea. Implmentation, however, is another question.



.

Options: ReplyQuote
Re: [1.0RC1] Search Engine Configure
Posted by: ndebord
Date: July 13, 2006 12:45AM

kko,

<<1) Open your 1.0 macros.cfg and search the file for "EngineSync{". You will find these two lines:
EngineSync{
}
Comment them out or simply delete them.

2) Open your 0.9 macros.cfg and copy your engine macros and the macro named "EngineSync" over to your 1.0 macros.cfg (you can paste them wherever you like).

3) Save your modified 1.0 macros.cfg and restart K-Meleon 1.0.

That's all!>>


I see two such lines:

# Support for K-Meleon 0.9 engine macros: &EngineSync;
}

&

EngineSync{
}

Located in different portions of the macros file. I assume the relevant line is the second one and the first is just a comment line. Is the location important?

Tks,


N

Options: ReplyQuote
Re: [1.0RC1] Search Engine Configure
Posted by: ndebord
Date: July 13, 2006 12:52AM

kko,

Finally, I managed to load up all the search engines as you mentioned properly this time, but none of them show up when I right click on the search engine icon. So I'm still doing something wrong. Any help much appreciated.

N

Options: ReplyQuote
Pages: 12Next
Current Page: 1 of 2


K-Meleon forum is powered by Phorum.