Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: b6cffb7eda
Fetching contributors…

Cannot retrieve contributors at this time

file 252 lines (224 sloc) 11.354 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252
This version of Lookup allows the use of either YAZ or SRU. And you can swap at
any time via Admin screen settings. But if you want to use YAZ, you will have to
add it to your PHP on the server; SRU does not require any such addition but has
perfrmance issues. (See step #5 below for YAZ installation info.) Be sure to
read through all the steps below. There have been many changes from previous
versions.

##############################################################################
## Open Biblio Modifications #################################################
##############################################################################
The following modifications must be made to your copy of OpenBiblio to support
Lookup and possible future add-ons/plug-ins. These may be only a one time
modification to OpenBiblio. Future versions of OpenBiblio may include them.
 
 .........
  a. Using 'cut & Paste, add the following to the end of file
 .........
'\openbiblio\shared\common.php'.
  ###################################################################
  ## plugin Support
  ###################################################################
  function getPlugIns($wanted) {
clearstatcache();
$lists = array();
   if (is_dir('../plugins')) {
//echo "Plugin Dir found: <br />";
   ## find all plugin directories
if ($dirHndl = opendir('../plugins')) {
# look at all plugin dirs
while (false !== ($plug = readdir($dirHndl))) {
if (($plug == '.') || ($plug == '..')) continue;
   //echo "plugin => $plug<br />";
   $plugPath = "../plugins/$plug";
   if (is_dir($plugPath)) {
if ($filHndl = opendir($plugPath)) {
while (false !== ($file = readdir($filHndl))) {
if (($file == '.') || ($file == '..')) continue;
   //echo "file => $file<br />";
   if ($file == $wanted) $list[] = "../plugins/$plugPath/$file";
   }
   closedir($filHndl);
}
}
   }
   closedir($dirHndl);
}
}
return $list;
}

 .........
 b. Using 'cut & Paste, add the following to the end of files
 .........
'\openbiblio\navbars\admin.php' and '\openbiblio\navbars\cataloging.php'.
(note. Change the 'admin.nav' to 'cataloging.nav' for the second file.)
<?php
$list = getPlugIns('admin.nav');
for ($x=0; $x<count($list); $x++) {
include_once ($list[$x]);
}
?>

 .........
 c. Using 'cut & Paste, modify file "..\classes\Localize.php to read as:
 .........
  function Localize ($locale, $section) {
    $localePath = "../locale/".$locale."/".$section.".php";
    include($localePath);
    ## ##################################
    ## adds suport for plugins - fl, 2009
    ## ##################################
$list = getPlugIns($section.'.tran');
for ($x=0; $x<count($list); $x++) {
include($list[$x]);
}
    ## ##################################
    $this->_trans = $trans;
    return true;
  }

 .........
 d. Go to file ".../shared/header_top.php" and find the line for "</head>". Insert
the following just above it as shown:
 .........
</script>
<?php
## ---------------------------------------------------------------------
## --- added for Fred LaPlante's Lookup Function -----------------------
if (file_exists('customHead.php')) {
include ('customHead.php');
}
## ---------------------------------------------------------------------
?>
</head>

 .........
 e. Go to file ".../shared/common.php" and find the line for
 '# Escaping shorthands', Insert the following just above it as shown below:
 .........
/* Work around PHP's braindead include_path stuff. */
function REL($sf, $if) {
return dirname($sf)."/".$if;
}

  # Escaping shorthands

 .........
 f. Go to file ".../catalog/inputFuncs.php". find the lines containing
    "($cntrlType == OBIB_TEXTAREA_CNTRL)" and change the lines following as shown
    here:
 .........
  if ($cntrlType == OBIB_TEXTAREA_CNTRL) {
    ## lookup mods - June 2009
    //echo "<textarea name=\"values[".H($formIndex)."]\"";
    //echo " cols=\"".H($cols)."\" rows=\"".H($rows)."\">\n";
    //echo H($value)."</textarea>";
    $attrs= array('cols'=>H($cols),'rows'=>H($rows));
    echo inputField('textarea', "values[".H($formIndex)."]", H($value), $attrs);
  } else {
    ## lookup mods - June 2009
    //echo "<input type=\"text\"";
    //echo " name=\"values[".H($formIndex)."]\"";
    //echo " size=\"".H($size)."\" maxlength=\"".H($maxLen)."\" ";
    //echo "value=\"".H($value)."\" >\n";
    $attrs= array('size'=>H($size),'maxlength'=>H($maxLen));
    echo inputField('text', "values[".H($formIndex)."]", H($value), $attrs);
  }

 .........
 g. Go to file ".../functions/inputFuncs.php". find the lines containing
a long complex 'switch' structure. In there you will find 4 or more
references like --> name="'.H($name).'"
Wherever you do, change it to read: id="'.H($name).'" name="'.H($name).'"
 .........

##############################################################################
## Lookup v2 installation ####################################################
##############################################################################

##############################################################################
## Step 1. ###################################################################
##############################################################################
 Extract the following database files files and move them to your openbiblio
   MySQL data directory:

- 'cutter.MYD', 'cutter.frm', and 'cutter.MYI'
- 'lookup_settings.MYD', 'lookup_settings.frm', and 'lookup_settings.MYI'
- 'lookup_hosts.MYD', 'lookup_hosts.frm', and 'lookup_hosts.MYI'

##############################################################################
## Step 2. ###################################################################
##############################################################################
 If it does not already exist, create a new 'lookup2' folder within openbiblio.

 .........
 a.Extract and move all *.php files, *.js and *.txt to the new
  '..\openbiblio\lookup2' directory.
 .........
 b. You may remove any of the old 'lookup' files in '..\openbiblio\catalog' from
   previous versions of Lookup, though they will be ignored if you leave them
there.
 .........

##############################################################################
## Step 3. ###################################################################
##############################################################################
 This step replaces previous Navigation and translation file changes. It has
 been tested with multiple plugins.

 .........
 a. If it does not already exist, create a new 'plugins' folder within openbiblio.
 .........
 b. If it does not already exist, create a new 'lookup2' folder within 'plugins'.
 .........
 c. Copy the *.nav and *.tran files to this 'lookup2' folder.

##############################################################################
## Step 4. ###################################################################
##############################################################################
 If you would like to have the "new copy" form automatically appear when
finished adding new bibliographic data:
 .........
a. locate the line containing "../shared/biblio_view.php" near line 38 of
file "..../catalog/biblio_new.php".
 .........
b. replace it with the following
  #**************************************************************************
  //------following line auto transfers to new copy form (new function)
  header("Location: ../catalog/biblio_copy_new_form.php?bibid=".$bibid."&msg=".$msg);
  exit();
  #**************************************************************************
 
##############################################################################
## Step 5. ###################################################################
##############################################################################
 YAZ instalation (not required if you only wish to use SRU):
The YAZ module provides the MARC Z39.50 protocol support which this
application requires to use the YAZ protocol. YAZ is provided with most
distributions of PHP, but activation varies.

For Windows, things have gotten complicated since PHP5 arrived.
The best process to follow is described at
http://blog.theburrowfamily.net/2008/09/27/php526-apache-22-and-php_yaz/
In effect the process amounts to copying a set of .dll files from a download
into your Apache directory.

For **NIX installations you will probably have to recompile PHP with
appropriate switches.

Additional details can be found at http://www.php.net/manual/en/ref.yaz.php
as well as at http://www.IndexData.com (the PHP-YAZ author). Also there have
been seveal threads on the matter at the OpneBiblio help forum.

After activating YAZ, be sure to stop and restart the Web Server (usually Apache).

Failure to activate YAZ, usually shows up as a blank screen after attempting
a search. To determine if YAZ has been properly activated, look at the
phpinfo.php page with your browser. Bring up the page and search for YAZ.
If not found, its not active.

note: Some PHP distributions make finding the correct version of php.ini dificult,
but its location is shown in phpinfo.

##############################################################################
## Step 6. ##################################################################
##############################################################################
   Configuration is done through the Lookup Opts and Lookup Hosts selections on
the Admin Page. Go there and make appropriate changes and selections. I have
provided data for those hosts that are known to me. Feel free to modify or
add to the list as you wish.
(Thanks to Peter Zweck for the National Library of Australia link).
(Thanks to Christoph Lange of Germany for the GVK link).

##############################################################################
## Step 7. ##################################################################
##############################################################################
  Useage suggestions or comments:
- In the event of problems with first time use, be sure to check your
directory names for correct case and spelling. Email me for help if needed.
- In the event of trouble installing YAZ, I suggest trying the newer SRU protocol
if your Z39.50 server supports it.
- The LC cutter mechanism used may be too crude for all but the smallest libraries.
  Cutter - Sanborn 3-digit table duplicates the standard published texts.
- Author names must be in the form of: surname, given name (i.e. LaPlante, Fred).
- Some title and author searches may result in many seemingly unrelated hits.
  Using the author's full name, rather than last name only, may correct this.
- Remote servers may timeout with no visible information. As suggested on the
'Patience' screen, use of the F5 button usually results in success.

Fred LaPlante
flaplante at flos-inc dot com

Something went wrong with that request. Please try again.