Menu

#38 Keywords field + search options

open
nobody
None
5
2012-11-15
2005-12-03
Jim Meyer
No

Hello!

It'd be lovely to be able to provide for each item
keywords suitable for a search engine (e.g. +ratchet
+"box-end" +"wrench set" +craftsman) which then are
used to provide search links for Froogle, Google,
Yahoo, or whatever else might be handy.

Cheers!

--j

Discussion

  • Jim Meyer

    Jim Meyer - 2005-12-03

    Logged In: YES
    user_id=66093

    Adding the db field and putting it into the item.php UI was
    straightforward; you can source the attached
    add_item_keywords.sql file, then apply the attached
    add_keywords_to_item_ui.patch.

    Next, I'll have to figure out how best to mutate these
    keywords into search URLs and how to show those search
    options in the item list.

    Cheers!

    --j

     
  • Jim Meyer

    Jim Meyer - 2005-12-03

    Patchfile for item.php: patch < add_keywords_to_item_ui.patch to apply

     
  • Jim Meyer

    Jim Meyer - 2005-12-03

    Adds keywords column to the items table; run mysql, connect to phpgiftreg db, and source this file

     
  • Jim Meyer

    Jim Meyer - 2005-12-03

    Patchfile for shop.php: patch < add_keywords_to_shop_ui.patch to apply

     
  • Jim Meyer

    Jim Meyer - 2005-12-03

    Logged In: YES
    user_id=66093

    Okay, the attached files will:
    * Add a keywords field to your items table
    * Expose that field in the item editing UI (item.php)
    * Add a couple of search engine URIs to your config.php
    * Display one link per engine when you're choosing items
    from someone's list (shop.php)

    Still to do:

    * Search URIs should include %s for replacement by keywords
    * index.php needs the same treatment *or* shop.php and
    index.php should be refactored to call some common code
    which displays item lists (and shoplist.php?)
    * Add more search engines!

    Cheers!

    --j

     
  • Jim Meyer

    Jim Meyer - 2005-12-03

    Adds search URIs to the bottom of your config.

     
  • Jim Meyer

    Jim Meyer - 2005-12-04

    Logged In: YES
    user_id=66093

    Hello!

    I've added a patch to show the links in the index.php item
    list. I'll tackle the refactor separately if it seems
    interesting enough to others (e.g. generalpf =)

    Still to do:
    * Enable "%s" replacement in config-listed search URIs
    * More elegant UI with visually distinct link icons
    (favicon.ico?)
    * Add more search engines!

    Maybe someday:
    * Add per-item search base URI enable toggle and storage.
    This would allow the user to turn off searches that don't
    work; storing the URIs local to the item would keep them
    from changing later (e.g. I had them as Froogle and
    PriceGrabber; you disabled search URI 2; I rearranged things
    and now PriceGrabber is enabled and Froogle is disabled).

    Cheers!

    --j

    Cheers!

    --j

     
  • Jim Meyer

    Jim Meyer - 2005-12-04

    Patchfile for index.php: patch < add_keywords_to_index_ui.patch to apply

     

Log in to post a comment.

MongoDB Logo MongoDB