This is the old SliTaz forum - Please use the main forum.slitaz.org

Slitaz packages firefox mozdev search bookmark
  • krusader23krusader23 August 2010
    There is a site that allows firefox users to create search-bookmarks of various sites: http://mycroft.mozdev.org/ .
    There is also a SliTaz packages site which could be added there: http://www.slitaz.org/en/packages/index.html
    I've tried to create a "search bookmark" in firefox with a following url:
    http://pkgs.slitaz.org/search.cgi?lang=en&object=Package&query=%s&version=cooking&search=Search
    (firefox exchanges the %s chars for the actual search string when you type sth like "slitazp <package_name> in the url input field)
    but unfortunately it doesn't work.
    The source of the SliTaz packages site is:
    <form method="post" action="http://pkgs.slitaz.org/search.cgi">
        <input type="hidden" name="lang" value="en" />
        <select name="object">
            <option value="Package">Package</option>
            <option value="Desc">Description</option>
            <option value="Tags">Tags</option>
            <option value="Depends">Depends</option>
            <option value="File">File</option>
            <option value="File_list">File list</option>
        </select> <strong>:</strong>
        <input type="text" name="query" size="32" />
        <select name="version">
            <option value="cooking">cooking</option>
            <option value="stable">stable</option>
            <option value="1.0">1.0</option>
        </select>
        <input type="submit" name="search" value="Search" />
    </form>
    What I could have been doing wrong?
  • LexeiiLexeii August 2010
    1. Exit your Firefox
    2. Go to /home/tux/.mozilla/firefox/********.default/searchplugins
    3. Create new text file named, i.e., slitaz-packages.xml, open it in text editor and copy&paste next content to it:
      <SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/" xmlns:os="http://a9.com/-/spec/opensearch/1.1/">
      <os:ShortName>SliTaz Packages</os:ShortName>
      <os:Description>SliTaz Packages</os:Description>
      <os:InputEncoding>UTF-8</os:InputEncoding>
      <os:Image width="16" height="16">data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACqklEQVQ4ja2SX0haYRjGH5Mao4tgzaTcDPXCti40MewfjW5kbQjSIvFiw3RjVzEGGexiRgpdKIxgEFvrbg7kBE1IzZsuwj9BKQpHj+BBC0yj7IR5iGJ0YDcV1upuD3w3z/s+v/fj/T7gf+vk5KQVACiKelEqlVQXNo9hmKckSY4A4F32/KN4PK4rFot9y8vLH5PJpLamxAOApaWlT4lEQh+NRs37+/vSa+Ht7W2l3W7/GQwGX8/NzX25bQDLsoKxsbFkLpfrnp6e/nFVOD4+fmA2m9dWV1ffKxSKg3K5fHlFHkVR7bWQ/v7+/NbWlrGvr694ZZIkOSKXy9lwOGwQCoVnoVBIRxAE32g0rgPgHA7HNwDw+/0mmUx2tLGxYRAKhRzDMI8AACsrKx9EItHp6OhodHJyMioWi89mZ2fdPB6PA8BptdrMxMSER6VScVardXlwcDCjVqt3ru2hUqlInE7nr7a2Ng7AraexsZEzm83JeDyuu1wsWJYVDAwM5KVS6R+lUnkgEAjuBLS0tHByubwqEonOe3t7d8rlcitomu7p6Og4IklSq9frI0NDQymLxRKuDfL5fG5hYeGrWCxmp6amPKlU6pVMJqvGYrF6ZDKZZ0ajcU2tVhdsNttiOp1uGB4eTtwE7O3tdebzeUVTU9O50+kkTCaTHwCwu7ursNvt38fHxwNer/ctAHR1dRVqARKJpELT9L1cLtet0WjyHo/HGggE3gAAYrFYvc/n++zz+Szz8/MOADAYDOu1AJfL5QKAmZmZxVAopPN6vTaCIPhXL8AwTGc6nW5wOBy/AWBzc/N5c3PzaV1dHWcymYKFQuE+RVE9brfbRhAE//Dw8MltPxXZbFaTzWZfAkCpVGqnaVp1MeBxJBJ5d2vopqrV6sObHsuygrv6/wJHt0xs/qqmQwAAAABJRU5ErkJggg==</os:Image>
      <SearchForm>http://pkgs.slitaz.org/</SearchForm>
      <os:Url type="text/html" method="POST" template="http://pkgs.slitaz.org/search.cgi">
      <os:Param name="object" value="Package"/>
      <os:Param name="query" value="{searchTerms}"/>
      <os:Param name="version" value="cooking"/>
      <os:Param name="search" value="Search"/>
      </os:Url>
      </SearchPlugin>
    4. Start Firefox—you have new search plugin!
    5. You can add a short name slitazp to it in search plugin`s management
    6. Have Fun!
  • seawolfseawolf August 2010
    Not meaning to start a flame-war, but I totally forgot to do this when I first saw the pkgs site, so just made one in Opera (as this comes as standard).
    Worked just by right-clicking it. Thanks for reminding me!
  • krusader23krusader23 August 2010
    Thanks too, I didn't know the search plugin would allow defining custom keywords that can be used in the url field.
    Is there a chance that this will work as a simple bookmark also? I tend to synchronize all my bookmarks using Mozilla Sync, so creating a seach like this as a bookmark is actually more useful to me.
  • LexeiiLexeii August 2010
    Hi, @seawolf --
    There is Add to Search Bar add-on that makes new Search engine by right-clicking on search form's input field.

    Using this add-on I add search engine for packages and post finished file above.

    Say No to holywar, you use Opera, krusader23 use Firefox, I use IceCat, but functionality the same and everybody choose is what ones like.

    @krusader23:
    Do you need just a link to pkgs.slitaz.org instead?
  • krusader23krusader23 August 2010
    Lexeii
    I need to add a bookmark in Firefox that will have the same functionaity, that your xml file for the search engine.
    In firefox it is possible to add a single bookmark and define it's properties in a way that it (the bookmark) will behave exacly like the search engine entry, that you've provided.
    My problem/concern is: why is the bookmark not working? Is it because the .cgi script passes some mysterious parameters that I haven't specified in the url above? I've created many bookmarks of many pages search engines before and they all work, but the Slitaz link just doesn't want to.
    It's probably because of my lack of knowledge, how the php/cgi/javascript scripts work. So my question is: could anyone tell me, why if I paste that link:
    http://pkgs.slitaz.org/search.cgi?lang=en&object=Package&query=usb&version=cooking&search=Search
    (which I think has all the parameters the form passes to the .cgi script) into firefox, the SliTaz search engine doesn't display any results ;)
  • LexeiiLexeii August 2010
    @bellard: Yes, it works for me.
    1. I follow this link
    2. Right-click on text field and add short name (sp for SliTaz packages) to this bookmark. Bookmark is saved.
    3. Then, in address bar I write sp midori [Enter]
    4. Next page displays search results for midori
    Thanks!
  • krusader23krusader23 August 2010
    @bellard

    Haha! ;)
This discussion has been closed.
← All Discussions

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership

SliTaz Social