Subversion Repositories connectors

Compare Revisions

Ignore whitespace Rev 119 → Rev 120

/iii/trunk/locum_iii_2007/config/locum_iii_2007.ini.sample
4,18 → 4,18
; your environment needs them.
 
[connector_info]
description = "Locum connector for III's Millennium 2007"
description = "Locum connector for III's Millennium 2007"
 
; Locum uses this section to determine which server and which port to use
; server_select can either be "live" or "staging", depending on what set of
; screens and wwwoptions you're using with locum.
[ils_config]
ils_server = "pince.darienlibrary.org"
server_select = "staging"
ils_live_port = "80"
ils_live_port_ssl = "443"
ils_staging_port = "2082"
ils_staging_port_ssl = "446"
ils_server = "pince.darienlibrary.org"
server_select = "staging"
ils_live_port = "80"
ils_live_port_ssl = "443"
ils_staging_port = "2082"
ils_staging_port_ssl = "446"
 
; This is where developers define what is supported by their connector and what
; is not. Locum will use this to determine which features to enable or disable.
28,9 → 28,10
 
; General configuration parameters used by the connector
[iii_custom_config]
iii_available_token = "ON SHELF, Recent Return"
suppress_codes = "d,n,v,w,x"
default_age = "all"
iii_available_token = "ON SHELF, Recent Return"
suppress_codes = "d,n,v,w,x"
default_age = "all"
default_branch = "dl"
 
; Manages config options to allow the connector to determine age for the
; record. Age location definitions can either be comma-separated values, or
39,9 → 40,9
; The variable names here must match the names in the [ages] group of your
; locum.ini file.
[iii_record_ages]
adult = "/^[afms]/"
teen = "/^[ty]/"
child = "/^[kjp]/"
adult = "/^[afms]/"
teen = "/^[ty]/"
child = "/^[kjp]/"
 
; This is where you assign item location codes to branches. You will pair the
; branch codes you designated in the [branches] section of locum.ini with item
50,13 → 51,15
; expression match (enclosed in slashes - //) or a comma-separated list of all the
; ITEM LEVEL location codes associated with that branch. A regex will be less
; tedious, but your location codes may not be consistent enough to do so.
; branch_code = "/[regex]/" or "code1,code2,code3,..."
; branchcode = "/[regex]/" or "code1,code2,code3,..."
[branch_assignments]
main = "/(^ma|^dt)/"
dl = "/^((?!\b(hs|nc)\b).)*$/"
hs = "hs"
nc = "nc"
 
; This needs to be the exact output from iii_loc_parse.php
[iii_location_codes]
a = "Adult Collection"
a = "Adult Collection"
adabi = "Adult Playaway Biographies"
adadm = "Adult Playaway Detective Mysteries"
adaf = "Adult Playaway Fiction"
158,7 → 161,7
f1pbr = "First Floor Paperbacks"
glanr = "glanr"
hs = "Darien Historical Society"
j = "Children's Collection"
j = "Children's Collection"
jsbpc = "Children's Picture Books"
jsr = "Children's CD-ROM"
jwbpc = "Children's New Picture Books"
213,7 → 216,7
mapca = "Map Case"
mezza = "mezza"
mp3 = "mp3"
n = "New Books"
n = "New Books"
na = "Darien Nature Center"
order = "Library"
p1err = "First 5 Years - Learn to Read"
230,7 → 233,7
p1ptr = "First 5 Years - Transportation"
pam = "pam"
paper = "paper"
r = "Reference Collection"
r = "Reference Collection"
rack = "rack"
refer = "refer"
refof = "refof"
257,7 → 260,7
s2ttr = "2nd Floor Places"
s2wln = "2nd Floor Work Reference"
s2wlr = "2nd Floor Work"
t = "Technology Center"
t = "Technology Center"
tax = "tax"
techs = "techs"
tlbtr = "Teen Body and Soul"
287,7 → 290,7
txcdr = "txcdr"
video = "video"
vstor = "vstor"
y = "Young Adult Collection"
y = "Young Adult Collection"
ydbsr = "Teen Summer Reading"
ysamp = "Teen's Playaway"
ysas = "ysas"
/iii/trunk/locum_iii_2007/locum_iii_2007.php
260,6 → 260,7
$iii_server_info = self::iii_server_info();
$avail_token = locum::csv_parser($this->locum_config['ils_custom_config']['iii_available_token']);
$default_age = $this->locum_config['iii_custom_config']['default_age'];
$default_branch = $this->locum_config['iii_custom_config']['default_branch'];
$loc_codes_flipped = array_flip($this->locum_config['iii_location_codes']);
$bnum = trim($bnum);
 
297,6 → 298,7
$call = str_replace("'", "'", trim($matches[3][$i]));
$status = trim($matches[5][$i]);
$age = $default_age;
$branch = $default_branch;
if (in_array($status, $avail_token)) {
$avail = 1;
311,13 → 313,29
$due_date = 0;
}
}
foreach ($this->locum_config['iii_record_ages'] as $item_age => $match_crit) {
if (preg_match('/^\//', $match_crit)) {
if (preg_match($match_crit, $loc_code)) { $age = $item_age; }
} else {
if (in_array($loc_code, locum::csv_parser($match_crit))) { $age = $item_age; }
// Determine age from location
if (count($this->locum_config['iii_record_ages'])) {
foreach ($this->locum_config['iii_record_ages'] as $item_age => $match_crit) {
if (preg_match('/^\//', $match_crit)) {
if (preg_match($match_crit, $loc_code)) { $age = $item_age; }
} else {
if (in_array($loc_code, locum::csv_parser($match_crit))) { $age = $item_age; }
}
}
}
// Determine branch from location
if (count($this->locum_config['branch_assignments'])) {
foreach ($this->locum_config['branch_assignments'] as $branch_code => $match_crit) {
if (preg_match('/^\//', $match_crit)) {
if (preg_match($match_crit, $loc_code)) { $branch = $branch_code; }
} else {
if (in_array($loc_code, locum::csv_parser($match_crit))) { $branch = $branch_code; }
}
}
}
$avail_array['items'][] = array(
'location' => $location,
'loc_code' => $loc_code,
326,6 → 344,7
'due' => $due_date,
'avail' => $avail,
'age' => $age,
'branch' => $branch,
);
}