Development :  K-Meleon Web Browser Forum
K-Meleon development related discussions. 
´browser´ ´search´: search-engine add manually
Posted by: visionhelp
Date: May 23, 2015 05:00AM

Hi,

I like to add search-engines manually, in KM:
- ecosia.org (trees ´saving´, with each search)
- benefind.de (charities to self-choyced organisations, ´with every second search´)

Putting it manually to KM would already help.
(In the list: the search-engines, too.)

(Thanks.)



Edited 2 time(s). Last edit at 05/23/2015 05:06AM by visionhelp.

Options: ReplyQuote
Re: ´browser´ ´search´: search-engine add manually
Posted by: rodocop
Date: May 23, 2015 02:18PM

Find the correct links for search and edit the file

browser\defaults\search.xml for your needs.

Then added search engines will be shown in Search preferences.

Options: ReplyQuote
´browser´ ´search´: search-engine add manually [Re1]
Posted by: visionhelp
Date: May 24, 2015 08:02AM

OK. Thanks a lot.

´Sounds´ easily realize-able. Wonderful.

And I can get out these, which I do not like - with -, too, I think.

There are two, in:
- E:\Dokumente und Einstellungen\demo\Anwendungsdaten\K-Meleon\6npdlhc6.default
- E:\Programme\K-Meleon\browser\defaults



Edited 5 time(s). Last edit at 05/24/2015 03:24PM by visionhelp.

Options: ReplyQuote
Re: ´browser´ ´search´: search-engine add manually [Re1]
Posted by: rodocop
Date: May 24, 2015 02:13PM

Second one

Options: ReplyQuote
´browser´ ´search´: search-engine add manually [Re2]
Posted by: visionhelp
Date: May 24, 2015 03:21PM

Wooops: too late . . . - thank You.

(Sorry. Of cause: Programme\K-Meleon\browser\defaults)

At ´Browsing´ ´Finding Websites´ ´Searchengines´ is an ´ADD´.
Because of the lots of search-engines . . . I could not see.

To put it in into the xml-file did not work properly.
But found the ADD, perhaps of because all search-engines were gone.
And the already added ecosia.org did stay, after making all back.

So far so good.



Edited 2 time(s). Last edit at 05/24/2015 03:43PM by visionhelp.

Options: ReplyQuote
Re: ´browser´ ´search´: search-engine add manually [Re2]
Posted by: rodocop
Date: May 24, 2015 04:47PM

You need to retain all the xml-formatting while adding new strings

Options: ReplyQuote
Re: ´browser´ ´search´: search-engine add manually [Re2]
Posted by: guenter
Date: May 24, 2015 06:23PM

Yes adding via interface is partially broken.

Until 1.5.4 % 1.6 it worked but did not save as UTF8.

Then someone (Dorian?) fixed it so that it saves as UTF8 but it saves only new strings now.

Means that You cannot reuse altered search.xml as basis for new in ./browser/...

IMHO the whole is a to do for someone (adaodupan or naruman? Who else can do js?) that can do js. The one from 1.5.4 must IMHO be repaired to save as UTF8. Code can probably be scavanged from Firefox code that handles UTF8.

p.s. My personal wish-list also contains that we use not a single search.xml but use the Firefox format that has them in many files. Probably in a folder is best. Plus a way to add and save the whole lot. :drool:

Options: ReplyQuote
Re: ´browser´ ´search´: search-engine add manually [Re2]
Posted by: rodocop
Date: May 24, 2015 08:11PM

guenter,
sorry - what do you mean by 'adding by interface'. I thought that one can add more engines to the list (not to menu) only by editing the file search.xml. Was I wrong?

How have I managed: edited search.xml to add new russian entries -> save it as UTF-8 with BOM -> restart KM and make 'add' procedure in Preferences.

All works fine.

UPD.: Oh, yes! I see the problem:

kmeleon.general.searchEngineName is being filled with non-UTF string and menu gets buggy until restart if any non-latin engine-name added.



Edited 5 time(s). Last edit at 05/24/2015 09:04PM by rodocop.

Options: ReplyQuote
´browser´ ´search´: search-engine add manually [Re3]
Posted by: visionhelp
Date: May 25, 2015 04:24AM

Quote
rodocop
You need to retain all the xml-formatting while adding new strings

I did.

Isn´t
Quote
rodocop
make 'add' procedure in Preferences.
that enough ?
When ADD works ?

I did not try there more.



Edited 1 time(s). Last edit at 05/25/2015 08:04AM by visionhelp.

Options: ReplyQuote
Re: ´browser´ ´search´: search-engine add manually [Re3]
Posted by: guenter
Date: May 25, 2015 10:28AM

Quote
visionhelp

Quote
rodocop
make 'add' procedure in Preferences.
that enough ?
When ADD works ?

I did not try there more.

Yes it works via Preferences menu (sort of) but You cannot create country specific or personalized lists there and use them as a new master list in ../browser/...

That procedure is needed (sometimes) when You create a new translation or when You need to transfer a heavily changed list to a new version.

That is how we found the original bug in 1.5.4 f at the first place. We tried to create adapted lists or entries for German, French, etc. that needed UTF8 we found it did not write UTF8.

When You opened such a file with an UTF8 capable editor it messed up completely.

p.s. Guess the old bug was better than the new ones that came with the fix.sad smiley
We should not have complained about it. grinning smiley



Edited 1 time(s). Last edit at 05/25/2015 10:30AM by guenter.

Options: ReplyQuote
Re: ´browser´ ´search´: search-engine add manually [Re3]
Posted by: rodocop
Date: May 25, 2015 02:38PM

guenter,

I've got it. You speak about 'Search Engines' tab - and I was never using it, editing main search.xml directly in text editor.

Well, I tried to add russian Yandex search through Search Engines GUI - and get small 'user' search.xml in profile folder which contains the only one record (Yandex) and isn't messed up in UTF-capable editor (I use AkelPad).
When I add 3 new engines - they stay ordered and file is UTF-encoded (but without BOM).
The only thing is the lack of 'end of lines'.

Default search.xml looks like this:
<?xml version="1.0"?>
<engines version="1.1" caption="Search Engines for K-Meleon Search Macros">
<engine caption="Acronym Finder"
	url="http://www.acronymfinder.com/af-query.asp?String=exact&amp;Find=Find&amp;Acronym="/>;
<engine caption="AlltheWeb.com"
	url="http://www.alltheweb.com/search?q="/>;
<engine caption="AltaVista"
	url="http://www.altavista.com/web/results?itag=wrx&amp;q="/>;
...
</engines>
and 'user' one like that:
<engines><engine caption="Яндекс" url="http://www.yandex.ru/yandsearch?stype=www&amp;amp;nl=0&amp;amp;text="/><engine caption="Яндекс-словари" url="http://lingvo.yandex.ru/"/><engine caption="Yandex translate" url="https://translate.yandex.ru/?text="/></engines>;


The only glitch is that menu item for new search engine, written in russian, is going unreadable with some strange encoding (it looks rather like wrong key mapping, not transcoding):
'Яндекс' is shown in menu like '/=45:A'

But it gets correct after KM restart.


And sure - there are no option to create new master list, merging 'default' and 'user' files search.xml into one.



Edited 4 time(s). Last edit at 05/25/2015 02:45PM by rodocop.

Options: ReplyQuote
´browser´ ´search´: search-engine add manually [Re4]
Posted by: visionhelp
Date: May 25, 2015 06:30PM

I like it You find answers.

I understand: translations make troubles.
Quote
guenter
heavily changed list to a new version
, too.

For me as wanting to work as easy as possible - I, as ´easy´ user in that case, am working in the main at the ´end´ - should already work the ´Add, Remove, Edit´-functions.

I think to remember: I did not SEE it because of that big list of search-engines.
(Or tried it but did not work. There was something, but I cannot remember exactly.)

I tried the ADD now only once and it worked so far.
(With Delete and Edit, ev´rything is there, I think.)
This for me is all right, for now.



Edited 1 time(s). Last edit at 08/18/2015 04:12PM by visionhelp.

Options: ReplyQuote


K-Meleon forum is powered by Phorum.