You are not logged in.

#1 2004-09-10 15:13:00

Moo-Crumpus
Member
From: Hessen / Germany
Registered: 2003-12-01
Posts: 1,487

ArchLinux Firefox searchplugins for forum/wiki/pkg

Here is an example how to use google to search in archlinux pages using a url:
·
Arch Wiki

· Arch Forum


Here is the code for a google arch search plugin, usable with mozilla (firefox). Place the file, together with a png icon 16x16 given the same name, inside the mozilla firefox' "searchplugins" folder:

#----------------------------------------------------------------------
# Author: the Pink Chick  <dont dot spam at web dot de>
# Version: 0.1, Last updated: Fri Sept 10 16:24:39 EDT 2004
#----------------------------------------------------------------------
# googleArchForum.src
# 

<search
 version="7.1"
 name="Google Arch Forum"
 description="Search within bbs.archlinux.org"
 method="GET"
 action="http://www.google.com/custom"
 searchForm="http://www.google.com/custom"
>

<input name="sitesearch" value="bbs.archlinux.org">
<input name="hl" value="de">
<input name="ie" value="ISO-8859-1">
<input name="domains" value="bbs.archlinux.org">
<input name="btnG" value="Google-Suche">
<input name="q" user="">
<input name="sourceid" value="Mozilla-search">


<interpret
 browserResultType='result'
 resultListStart='<div>'
 resultListEnd='</div>'
 resultItemStart='<p class=g>'
 resultItemEnd='Similar pages</a></font>'
 charset='UTF-8'
 >

</search>

<browser
 update="http://mycroft.mozdev.org/plugins/googleArchForum.src"
 updateicon="http://mycroft.mozdev.org/plugins/googleArchForum.png"
 updatecheckdays="3"
>

Similar for the wiki:

#----------------------------------------------------------------------
# Author: the Pink Chick  <dont dot spam at web dot de>
# Version: 0.1, Last updated: Fri Sept 10 16:24:39 EDT 2004
#----------------------------------------------------------------------
# googleArchWiki.src
# 


<search
 version="7.1"
 name="Google Arch Wiki"
 description="Search within wiki.archlinux.org"
 method="GET"
 action="http://www.google.com/custom"
 searchForm="http://www.google.com/custom"
>

<input name="sitesearch" value="wiki.archlinux.org">
<input name="hl" value="de">
<input name="ie" value="ISO-8859-1">
<input name="domains" value="wiki.archlinux.org">
<input name="btnG" value="Google-Suche">
<input name="q" user="">
<input name="sourceid" value="Mozilla-search">


<interpret
 browserResultType='result'
 resultListStart='<div>'
 resultListEnd='</div>'
 resultItemStart='<p class=g>'
 resultItemEnd='Similar pages</a></font>'
 charset='UTF-8'
 >

</search>

<browser
 update="http://mycroft.mozdev.org/plugins/googleArchWiki.src"
 updateicon="http://mycroft.mozdev.org/plugins/googleArchWiki.png"
 updatecheckdays="3"
>

Maybe you'll find this usefull. I just send the both scripts, and the png files, to http://mycroft.mozdev.org. In some days, I hope, or weeks you can add them to your firefox' search bar using the "Add search Plugin" menue inside your firefox browser.

Feel free to include it to the firefox package.


Frumpus addict
[mu'.krum.pus], [frum.pus]

Offline

#2 2004-09-10 16:24:40

IceRAM
Member
From: Bucharest, Romania
Registered: 2004-03-04
Posts: 772
Website

Re: ArchLinux Firefox searchplugins for forum/wiki/pkg

How about adding those files to arch-artwork package?

Offline

#3 2005-01-22 16:51:28

hugelmopf
Member
Registered: 2004-08-06
Posts: 71

Re: ArchLinux Firefox searchplugins for forum/wiki/pkg

I am not sure, why you are using google for this, and not the forum search or wiki search directly. I created the following files for direct searching, but as these are my first searchplugins and I didn't read a Howto, they might not be perfect... but they work:

PS: Can anybody tell me, how to make the Forum search return the results as topics (not as posts)? It works when I search "manually", but not with this Firefox searchplugin.

PPS: To change the order of my searchplugins, I created folders A, B, C, D, ... in the /opt/mozilla/lib/firefox-xx/searchplugins folder and put my .src and .png files there.

Forum:

#----------------------------------------------------------------------
# Author: hugelmopf
# Arch_Forum.src
#

<search
 version="7.1"
 name="Arch Forum"
 description="Search within bbs.archlinux.org"
 method="GET"
 action="http://bbs.archlinux.org/search.php"
 searchForm="http://bbs.archlinux.org/search.php"
>

<input name="mode" value="results">
<input name="search_keywords" user="">
<input name="search_terms" value="all">
<input name="search_fields" value="all">
<input name="search_time" value="0">
<input name="sort_by" value="0">
<input name="sort_dir" value="DESC">
<input name="return_chars" value="200">

</search>


Wiki:

#----------------------------------------------------------------------
# Author: hugelmopf
# Arch_Wiki.src
#


<search
 version="7.1"
 name="Arch Wiki"
 description="Search within wiki2.archlinux.org"
 method="GET"
 action="http://wiki2.archlinux.org/index.php/TitleSearch"
 searchForm="http://wiki2.archlinux.org"
>

<input name="auto_redirect" value="1">
<input name="nocache" value="purge">
<input name="s" user="">
<input name="sourceid" value="Mozilla-search">


</search>

Offline

#4 2005-01-22 18:29:16

z4ziggy
Member
From: Israel
Registered: 2004-03-29
Posts: 573
Website

Re: ArchLinux Firefox searchplugins for forum/wiki/pkg

or u can simply put "site:" prefix in the google search, like this :

site:wiki.archlinux.org udev

to search for udev on wiki.archlinux.org

Offline

#5 2005-01-23 09:45:26

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: ArchLinux Firefox searchplugins for forum/wiki/pkg

can you do one to search the pkg repo dbase - that would rule!

Offline

#6 2005-01-23 10:11:35

z4ziggy
Member
From: Israel
Registered: 2004-03-29
Posts: 573
Website

Re: ArchLinux Firefox searchplugins for forum/wiki/pkg

u can use something like this to search for "autoconf" for example :

site:http://cvs.archlinux.org autoconf

the result i got was autoconf PKGBUILD cvs smile

Offline

#7 2005-01-23 10:15:51

hugelmopf
Member
Registered: 2004-08-06
Posts: 71

Re: ArchLinux Firefox searchplugins for forum/wiki/pkg

can you do one to search the pkg repo dbase - that would rule!

Is this what you mean?

<SEARCH
   version = "7.1"
   name="Arch Packages"
   description="ArchLinux package search"
   method="GET"
   action="http://www.archlinux.org/packages.php"
   seachform="http://www.archlinux.org/packages.php"
>

<input name="s_keyword" user>
<input name="s_repo" value="all">
<input name="s_category" value="all">
<input name="s_lastupdate" value="">
<input name="pp" value="50">
<input name="sourceid" value="Mozilla-search">

# Section crippled to prevent spurious parsing
<interpret
    browserResultType="result"
    resultListStart="</body>"
    resultListEnd="</html>"
>

</search>

I think I took this from some other place in this forum.

Offline

#8 2005-01-23 10:26:10

hugelmopf
Member
Registered: 2004-08-06
Posts: 71

Re: ArchLinux Firefox searchplugins for forum/wiki/pkg

Btw... I have put up some small arch logos with a small F (Forum), W (Wiki) and P (Packages) in the left top corner, to be used for the Mozilla search. If you want to use them (or improve them), they are here:

http://www.physik.tu-dresden.de/~s28904 … _Forum.png
http://www.physik.tu-dresden.de/~s2890409/Arch_Wiki.png
http://www.physik.tu-dresden.de/~s28904 … ackage.png

They have to be put in the same folder as the .src files and have the same name.

Offline

#9 2005-01-23 10:36:06

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: ArchLinux Firefox searchplugins for forum/wiki/pkg

hugelmopf wrote:

PS: Can anybody tell me, how to make the Forum search return the results as topics (not as posts)? It works when I search "manually", but not with this Firefox searchplugin.

Forum:

#----------------------------------------------------------------------
# Author: hugelmopf
# Arch_Forum.src
#

<search
 version="7.1"
 name="Arch Forum"
 description="Search within bbs.archlinux.org"
 method="GET"
 action="http://bbs.archlinux.org/search.php"
 searchForm="http://bbs.archlinux.org/search.php"
>

<input name="mode" value="results">
<input name="search_keywords" user="">
<input name="search_terms" value="all">
<input name="search_fields" value="all">
<input name="search_time" value="0">
<input name="sort_by" value="0">
<input name="sort_dir" value="DESC">
<input name="return_chars" value="200">

</search>

try adding
<input name="show_results" value="topics">
you should be able to change value to be posts for the other method..


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#10 2005-01-23 10:40:11

hugelmopf
Member
Registered: 2004-08-06
Posts: 71

Re: ArchLinux Firefox searchplugins for forum/wiki/pkg

Thanks for the input, but it doesn't work. I had tried this before, and although it appears in the URL (show_results=topics), it still displays Posts. It's kind of weird... maybe something to do with the form data not being transferred via "POST"?

Offline

#11 2005-01-23 10:47:01

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: ArchLinux Firefox searchplugins for forum/wiki/pkg

could be how the php script is actually checking vars from the submit.
I have not looked at the code in the var parser, so I can't say for certain. My guess was truly from the hip..


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#12 2005-01-23 10:53:56

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: ArchLinux Firefox searchplugins for forum/wiki/pkg

A little testing, and it proved it. It works with post but not get, at least from a static html page on my box. Try changing your method to post, and adding that line back in.


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#13 2005-01-23 11:26:47

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: ArchLinux Firefox searchplugins for forum/wiki/pkg

can someone add these to the wiki?

Offline

#14 2005-01-23 11:31:12

hugelmopf
Member
Registered: 2004-08-06
Posts: 71

Re: ArchLinux Firefox searchplugins for forum/wiki/pkg

Ok, I will add these to the wiki later. I have to figure out how to use POST first. It doesn't work by just changing GET to POST.

Offline

#15 2005-06-08 23:58:55

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: ArchLinux Firefox searchplugins for forum/wiki/pkg

has anyone fixed these?

Offline

#16 2005-06-09 09:22:03

hugelmopf
Member
Registered: 2004-08-06
Posts: 71

Re: ArchLinux Firefox searchplugins for forum/wiki/pkg

I have not fixed the Forum search, sorry.

It didn't work right away and right now I am working on an AMD64 machine, which I installed Debian-AMD64 on (I loved Archlinux, but I just had to try the AMD64 stuff ;-)). So I won't look into this for some time. But feel free to do yourself and remove my authorship from them.

Have fun,
Frank

Firefox Tips and Tweaks

Offline

#17 2005-07-27 11:19:25

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: ArchLinux Firefox searchplugins for forum/wiki/pkg

OK - can someone else re-write these for the new wiki?

Offline

#18 2005-08-08 08:27:26

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: ArchLinux Firefox searchplugins for forum/wiki/pkg

Well, I did it instead - this will let you search the Arch Wiki Directly:

#----------------------------------------------------------------------
# Author: hugelmopf
# Updated: dtw
# Arch_Wiki.src
#


<search
version="7.1"
name="Arch Wiki"
description="Search within ArchWiki"
method="GET"
action="http://wiki.archlinux.org/index.php"
queryCharset="utf-8"
searchForm="http://wiki.archlinux.org"
routeType="internet"
>

<input name="search" user>
<input name="sourceid" value="Mozilla-search">
<inputnext name="offset" factor="20">
<inputprev name="offset" factor="20">

<interpret
   browserResultType="result"
   charset="utf-8"
   resultListStart="</h2>"
   resultListEnd="<p>"
   resultItemStart="<li>"
   resultItemEnd="</li>"
>
</search>

Offline

Board footer

Powered by FluxBB