#15 Add Browse by Subject

closed-out-of-date
nobody
None
5
2010-02-16
2005-02-08
No

This patch adds a "browse by subject" option to
the cataloging and OPAC pages. When a user
enters a subject to browse by, all matching topics
are displayed. The user can then click the
"search" button by the most appropriate topic and
OpenBiblio will do a standard catalog search on
the narrower topic.

While not quite a table of authorities proper, this
patch brings Open Biblio far closer this sort of
functionality.

Discussion

  • Marcus Bautze
    Marcus Bautze
    2005-02-08

    Logged In: YES
    user_id=1209841

    I tested your patch and it's working fine. Thanks :-)

     
  • Marcus Bautze
    Marcus Bautze
    2005-02-10

    Logged In: YES
    user_id=1209841

    Found a bug in your Patch:
    Take the sample database. Use the "browse by
    subject"-function with nothing inserted in the filed, now it
    shows all subjects on two pages, that's right.
    But if you add one new subject to a bibliography and do that
    again, at the first page now no subject appears (no message
    that there are no subjects, obly the tablehead but no content)
    and at the second page the subjects 11-16 appear correctly.

     
  • Marcus Bautze
    Marcus Bautze
    2005-02-10

    Logged In: YES
    user_id=1209841

    I've found the problem:
    If you edit some bibliography OpenBiblio doesn't write NULL in
    the empty Subject-Fields, but it writes ''! So the sql-browse in
    the patch returns one extra-field with ''. Therefor it display
    nothing on the first page by giving no searchphrase.

    I fixed it by replacing in classes/BiblioBrowseSubjects.php the
    old line (line number 90):

    $sql = $sql . "select distinct topic" . $i . " \"topic\"
    from biblio where topic" . $i . " like '%" . $searchwords . "%' ";

    with

    $sql = $sql . "select distinct topic" . $i . " \"topic\"
    from biblio where topic" . $i . " like '%" . $searchwords . "%'
    and topic" . $i . " != ''";

    And now it's working :)

     
  • Logged In: YES
    user_id=692373

    I've rolled larian's bugfix into the patch file. I've also
    stripped out the carriage returns, since the 0.5.1.
    release no longer has them, and it confuses patch.

     
  • Logged In: NO

    I applied the latest patch to OpenBiblio 0.5.1. It seems to be
    working fine from the OPAC page. Then I tried to browse by
    subject from the Cataloging page. I got logged out and sent
    back to the Staff Login page. Please help. Thanks.

     
  • Micah Stetson
    Micah Stetson
    2010-02-16

    This patch does not work with recent versions of OpenBiblio.

     
  • Micah Stetson
    Micah Stetson
    2010-02-16

    • status: open --> closed-out-of-date