Help save net neutrality! Learn more.

Possible to play sound in page for alert?

  • Newtron35

    Newtron35 - 2005-10-05

    Apparently several volunteer librarians don't really "look" at the screen and just "grocery store" the books through the scanner.  When under the Circulation tab to check out or check back in a book and the barcode isn't found (due to several different reasons), in red comes up: "No bibliography was found with that barcode number."   Since they're not paying attention to the screen, they just keep scanning.  I'm not a PHP person, but is there a way to play either a .aiff, .mid (MIDI) file or a way to generate a "sound" when that  "No Barcode" page loads?  Does anyone know the php code to amend into the original code to do this?

    Thanks so much in advance,
    Nate Shaffer

    • Micah Stetson

      Micah Stetson - 2005-10-05

      One easy way to do this might be to have OpenBiblio beep whenever there are any error messages.  Because of some bugs that still exist, it may actually beep more often than that, though.  Edit shared/header.php and add code like this after the include("../shared/header_top.php") line:

      if (isset($_SESSION['pageErrors']) and !empty($_SESSION['pageErrors'])) {

      Then the HTML you put in there will be added to the top of the page (after the header) when there are errors.  You'll need to work out for yourself what HTML to put there, but these pages may help:

      As usual, this idea is utterly untested.  Let me know how it works.



Log in to post a comment.