Skip to content

Commit eda2d10

Browse files
authored
Merge pull request #2 from ABCD-DEVCOM/update-opac-docs
Expand documentation in more detail about OPAC
2 parents c8f3564 + 9fb2121 commit eda2d10

36 files changed

+1697
-734
lines changed

docs/abcd-administration/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Regular maintenance is crucial for the health of the ISIS technology behind ABCD
3333
### 4. Technical Reference
3434
Deep dive into the internal structures of ABCD.
3535
* **[System Databases](system-databases/index.md)**: Technical documentation of internal databases like `users`, `trans`, `copies`, etc.
36-
* **[CISIS Utilities](../abcd-advanced/cisis-utilities/cisis-utilities.md)**: Command-line reference for `mx`, `retag`, etc.
36+
* **[CISIS Utilities](../abcd-advanced/cisis-utilities/index.md)**: Command-line reference for `mx`, `retag`, etc.
3737

3838
:::tip Best Practice
3939
We recommend that all administrators schedule a weekly **Full Inverted File Generation** for active databases to ensure search results remain accurate.
Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,53 @@
1-
---
2-
sidebar_position: 3
3-
title: Search & Retrieval Scripts
4-
description: Analysis of scripts used for searching and browsing indices.
5-
---
6-
7-
# Search & Retrieval Scripts
8-
9-
These scripts handle the interaction with the Inverted File (Search) and the Master File (Retrieval).
10-
11-
## 1. Boolean Search (`buscar.xis`)
12-
13-
This script processes the search expressions typed by the user in the search bar.
14-
15-
* **File:** `wxis/buscar.xis`
16-
* **Primary Task:** `<do task="search">`
17-
* **Key Parameters:**
18-
* `expression`: The search query (e.g., `WATER * SOIL`).
19-
* `count`: Number of results per page.
20-
* `from`: Result cursor (for pagination).
21-
* **Logic:**
22-
1. Accepts the search string from PHP.
23-
2. Executes the search against the inverted file.
24-
3. Loops through the results (`<loop>`).
25-
4. Displays the results using a predefined PFT (often `@prologo`, display format, `@epilogo`).
26-
27-
**Relation to IsisScript Reference:**
28-
* Uses [`<do task="search">`](../reference/do#do-task-search)
29-
* Uses [`<parm name="expression">`](../reference/parm)
30-
31-
## 2. Dictionary/Index Browser (`indice.xis` / `alfabetico.xis`)
32-
33-
Used when the user clicks on the "A-Z" buttons or "Index" helper to browse terms.
34-
35-
* **File:** `wxis/indice.xis` (and `alfabetico.xis`)
36-
* **Primary Task:** `<do task="keyrange">`
37-
* **Key Operations:**
38-
* Scans the inverted file keys without accessing the master records.
39-
* Returns a list of terms and their hit counts (postings).
40-
* **Key Parameters:**
41-
* `from`: The starting term (e.g., "A").
42-
* `to`: The ending term (optional boundary).
43-
44-
**Relation to IsisScript Reference:**
45-
* Uses [`<do task="keyrange">`](../reference/do#do-task-keyrange)
46-
47-
## 3. Postings Retrieval (`postings.xis`)
48-
49-
Retrieves the specific MFNs associated with a term.
50-
51-
* **File:** `wxis/postings.xis`
52-
* **Primary Task:** `<do task="keyrange">` with `posting="All"` (or specific parameter).
1+
---
2+
sidebar_position: 3
3+
title: Search & Retrieval Scripts
4+
description: Analysis of scripts used for searching and browsing indices.
5+
---
6+
7+
# Search & Retrieval Scripts
8+
9+
These scripts handle the interaction with the Inverted File (Search) and the Master File (Retrieval).
10+
11+
## 1. Boolean Search (`buscar.xis`)
12+
13+
This script processes the search expressions typed by the user in the search bar.
14+
15+
* **File:** `wxis/buscar.xis`
16+
* **Primary Task:** `<do task="search">`
17+
* **Key Parameters:**
18+
* `expression`: The search query (e.g., `WATER * SOIL`).
19+
* `count`: Number of results per page.
20+
* `from`: Result cursor (for pagination).
21+
* **Logic:**
22+
1. Accepts the search string from PHP.
23+
2. Executes the search against the inverted file.
24+
3. Loops through the results (`<loop>`).
25+
4. Displays the results using a predefined PFT (often `@prologo`, display format, `@epilogo`).
26+
27+
**Relation to IsisScript Reference:**
28+
* Uses [`<do task="search">`](../reference/do#do-task-search)
29+
* Uses [`<parm name="expression">`](../reference/parm)
30+
31+
## 2. Dictionary/Index Browser (`indice.xis` / `alfabetico.xis`)
32+
33+
Used when the user clicks on the "A-Z" buttons or "Index" helper to browse terms.
34+
35+
* **File:** `wxis/indice.xis` (and `alfabetico.xis`)
36+
* **Primary Task:** `<do task="keyrange">`
37+
* **Key Operations:**
38+
* Scans the inverted file keys without accessing the master records.
39+
* Returns a list of terms and their hit counts (postings).
40+
* **Key Parameters:**
41+
* `from`: The starting term (e.g., "A").
42+
* `to`: The ending term (optional boundary).
43+
44+
**Relation to IsisScript Reference:**
45+
* Uses [`<do task="keyrange">`](../reference/do#do-task-keyrange)
46+
47+
## 3. Postings Retrieval (`postings.xis`)
48+
49+
Retrieves the specific MFNs associated with a term.
50+
51+
* **File:** `wxis/postings.xis`
52+
* **Primary Task:** `<do task="keyrange">` with `posting="All"` (or specific parameter).
5353
* **Usage:** Used to show which records contain a specific term clicked in the dictionary browser.

docs/abcd-install/initial-setup.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,5 @@ Avoid using the generic `abcd` superuser for daily tasks. Create individual acco
7676
## 5. Next Steps
7777

7878
Now that your system is secure and personalized, you are ready to start:
79-
80-
* **[Creating your first Catalog](../quickstart/creating-first-catalog.md)**
81-
* **[Configuring the OPAC](/docs/3.1/category/opac-public-catalog)**
79+
* **[Creating your first Catalog](../abcd-quickstart/create-from-model.md)**
80+
* **[Configuring the OPAC](/docs/category/opac-public-catalog)**
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"label": "1. Global Settings",
3+
"position": 1,
4+
"collapsible": true
5+
}

docs/abcd-modules/opac-abcd/opac-admin/advanced-access.md renamed to docs/abcd-modules/opac-abcd/opac-admin/1-global/advanced-access.md

Lines changed: 101 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -1,102 +1,102 @@
1-
---
2-
title: Access Control & Contexts
3-
sidebar_label: Access Control
4-
sidebar_position: 6
5-
---
6-
7-
# Multi-Context System Documentation
8-
9-
The **Multi-Context System** allows a single ABCD OPAC installation to serve multiple libraries, institutions, or database collections independently. By using a simple URL parameter (`?ctx=...`), the system switches the physical directory where it looks for databases (`bases`), effectively creating separate environments.
10-
11-
### 1\. How it Works
12-
13-
Instead of having a hardcoded path to the databases (e.g., `/var/www/bases/`), the system uses a **Mapping Logic**:
14-
15-
1. **The User Request:** The user accesses a URL like `http://myserver/opac/?ctx=law`.
16-
2. **The Lookup:** The system checks the `config_opac.php` file for a "map" that links the alias `law` to a specific physical folder on the server (e.g., `C:/abcd/bases-law/`).
17-
3. **The Switch:** If the context is valid, the system sets the internal `$db_path` variable to that specific folder. All subsequent operations (searching, displaying records, loading configuration files) will happen inside that folder.
18-
4. **Session Persistence:** The system remembers the current context in the user's session. This ensures that if the user clicks a link that accidentally omits the `?ctx=` parameter, they remain in the correct library.
19-
20-
### 2\. How to Enable It
21-
22-
To enable this feature, you must edit the `config_opac.php` file located in the `opac/` directory (or the central configuration directory, depending on your setup).
23-
24-
**Step 1: Activate the Feature**
25-
Locate the `$opac_multi_context` variable and set it to `true`.
26-
27-
```php
28-
$opac_multi_context = true;
29-
```
30-
31-
**Step 2: Configure Strict Mode (Optional but Recommended)**
32-
Strict mode prevents users from accessing the OPAC without specifying a context (which would otherwise load the default/root databases).
33-
34-
```php
35-
$opac_strict_mode = true; // Blocks access if ?ctx= is missing
36-
```
37-
38-
**Step 3: Define the Context Map**
39-
This is the most important step. You define an array where the **key** is the URL alias and the **value** is the full physical path to the `bases` folder for that client.
40-
41-
```php
42-
$opac_context_map = array(
43-
// 'URL_ALIAS' => 'PHYSICAL_PATH_ON_SERVER'
44-
'demo' => 'C:/xampp/htdocs/ABCD2/www/bases-examples_Windows/',
45-
'medicine' => 'C:/xampp/htdocs/ABCD2/www/bases-medicina/',
46-
'law_library' => '/var/www/abcd/bases-law/',
47-
);
48-
```
49-
50-
-----
51-
52-
# ⚙️ Important Points of `config_opac.php`
53-
54-
The `config_opac.php` file is the brain of the OPAC. It is structured into logical blocks to separate user configuration from system logic.
55-
56-
### Block 1: Initialization
57-
58-
This section handles PHP settings and loads the core ABCD configurations.
59-
60-
* **Session Start:** It ensures a PHP session is active to store the user's current context and language.
61-
* **Central Config:** It includes `central/config.php` to get system-wide defaults.
62-
63-
### Block 2: User Configuration (Edit Here)
64-
65-
This is where administrators make changes.
66-
67-
* **Multi-Context Switches:** As explained above (`$opac_multi_context`, `$opac_strict_mode`).
68-
* **Context Map:** The list of available libraries (`$opac_context_map`).
69-
70-
### Block 3: Context Resolution Logic
71-
72-
This section contains the logic that determines which database path (`$db_path`) to use. **You generally do not need to edit this.**
73-
74-
* **URL Detection:** Checks if `$_REQUEST['ctx']` exists and matches an entry in the map.
75-
* **Session Fallback:** If the URL has no context, it checks `$_SESSION` to see if the user was already browsing a specific library.
76-
* **Security Check:** If `Strict Mode` is on and no context is found, it kills the process with an "Access Denied" message (unless running in the Administrative module).
77-
* **Sanitization:** Ensures paths end with a correct directory separator (`/`).
78-
79-
### Block 4: Mode Logic (Integrated vs. Single Base)
80-
81-
Controls the search behavior:
82-
83-
* **Integrated Mode:** Searches across all databases defined in `bases.dat`. Active by default on the home page.
84-
* **Single Base Mode:** If the URL contains `&base=marc`, this logic automatically disables Integrated Mode so the search is restricted to that specific database.
85-
86-
### Block 5: Language Detection
87-
88-
A robust logic to determine the interface language, prioritized as follows:
89-
90-
1. **Session (Admin):** If an administrator is logged in, their language preference wins.
91-
2. **URL Request:** If the user clicks a flag (`?lang=pt`), that choice takes precedence and is saved.
92-
3. **Session (Visitor):** Remembers the visitor's choice during navigation.
93-
4. **Browser:** Tries to detect the browser's default language.
94-
5. **Default:** Falls back to the system default.
95-
96-
### Block 6: Visual and Functional Settings
97-
98-
Loads specific visual settings for the active base.
99-
100-
* **`opac.def`:** Reads the specific configuration file for the current language/base (colors, texts).
101-
* **`$restricted_opac`:** Defines if the OPAC requires login (`Y` or `N`).
1+
---
2+
title: Access Control & Contexts
3+
sidebar_label: Access Control
4+
sidebar_position: 6
5+
---
6+
7+
# Multi-Context System Documentation
8+
9+
The **Multi-Context System** allows a single ABCD OPAC installation to serve multiple libraries, institutions, or database collections independently. By using a simple URL parameter (`?ctx=...`), the system switches the physical directory where it looks for databases (`bases`), effectively creating separate environments.
10+
11+
### 1\. How it Works
12+
13+
Instead of having a hardcoded path to the databases (e.g., `/var/www/bases/`), the system uses a **Mapping Logic**:
14+
15+
1. **The User Request:** The user accesses a URL like `http://myserver/opac/?ctx=law`.
16+
2. **The Lookup:** The system checks the `config_opac.php` file for a "map" that links the alias `law` to a specific physical folder on the server (e.g., `C:/abcd/bases-law/`).
17+
3. **The Switch:** If the context is valid, the system sets the internal `$db_path` variable to that specific folder. All subsequent operations (searching, displaying records, loading configuration files) will happen inside that folder.
18+
4. **Session Persistence:** The system remembers the current context in the user's session. This ensures that if the user clicks a link that accidentally omits the `?ctx=` parameter, they remain in the correct library.
19+
20+
### 2\. How to Enable It
21+
22+
To enable this feature, you must edit the `config_opac.php` file located in the `opac/` directory (or the central configuration directory, depending on your setup).
23+
24+
**Step 1: Activate the Feature**
25+
Locate the `$opac_multi_context` variable and set it to `true`.
26+
27+
```php
28+
$opac_multi_context = true;
29+
```
30+
31+
**Step 2: Configure Strict Mode (Optional but Recommended)**
32+
Strict mode prevents users from accessing the OPAC without specifying a context (which would otherwise load the default/root databases).
33+
34+
```php
35+
$opac_strict_mode = true; // Blocks access if ?ctx= is missing
36+
```
37+
38+
**Step 3: Define the Context Map**
39+
This is the most important step. You define an array where the **key** is the URL alias and the **value** is the full physical path to the `bases` folder for that client.
40+
41+
```php
42+
$opac_context_map = array(
43+
// 'URL_ALIAS' => 'PHYSICAL_PATH_ON_SERVER'
44+
'demo' => 'C:/xampp/htdocs/ABCD2/www/bases-examples_Windows/',
45+
'medicine' => 'C:/xampp/htdocs/ABCD2/www/bases-medicina/',
46+
'law_library' => '/var/www/abcd/bases-law/',
47+
);
48+
```
49+
50+
-----
51+
52+
# ⚙️ Important Points of `config_opac.php`
53+
54+
The `config_opac.php` file is the brain of the OPAC. It is structured into logical blocks to separate user configuration from system logic.
55+
56+
### Block 1: Initialization
57+
58+
This section handles PHP settings and loads the core ABCD configurations.
59+
60+
* **Session Start:** It ensures a PHP session is active to store the user's current context and language.
61+
* **Central Config:** It includes `central/config.php` to get system-wide defaults.
62+
63+
### Block 2: User Configuration (Edit Here)
64+
65+
This is where administrators make changes.
66+
67+
* **Multi-Context Switches:** As explained above (`$opac_multi_context`, `$opac_strict_mode`).
68+
* **Context Map:** The list of available libraries (`$opac_context_map`).
69+
70+
### Block 3: Context Resolution Logic
71+
72+
This section contains the logic that determines which database path (`$db_path`) to use. **You generally do not need to edit this.**
73+
74+
* **URL Detection:** Checks if `$_REQUEST['ctx']` exists and matches an entry in the map.
75+
* **Session Fallback:** If the URL has no context, it checks `$_SESSION` to see if the user was already browsing a specific library.
76+
* **Security Check:** If `Strict Mode` is on and no context is found, it kills the process with an "Access Denied" message (unless running in the Administrative module).
77+
* **Sanitization:** Ensures paths end with a correct directory separator (`/`).
78+
79+
### Block 4: Mode Logic (Integrated vs. Single Base)
80+
81+
Controls the search behavior:
82+
83+
* **Integrated Mode:** Searches across all databases defined in `bases.dat`. Active by default on the home page.
84+
* **Single Base Mode:** If the URL contains `&base=marc`, this logic automatically disables Integrated Mode so the search is restricted to that specific database.
85+
86+
### Block 5: Language Detection
87+
88+
A robust logic to determine the interface language, prioritized as follows:
89+
90+
1. **Session (Admin):** If an administrator is logged in, their language preference wins.
91+
2. **URL Request:** If the user clicks a flag (`?lang=pt`), that choice takes precedence and is saved.
92+
3. **Session (Visitor):** Remembers the visitor's choice during navigation.
93+
4. **Browser:** Tries to detect the browser's default language.
94+
5. **Default:** Falls back to the system default.
95+
96+
### Block 6: Visual and Functional Settings
97+
98+
Loads specific visual settings for the active base.
99+
100+
* **`opac.def`:** Reads the specific configuration file for the current language/base (colors, texts).
101+
* **`$restricted_opac`:** Defines if the OPAC requires login (`Y` or `N`).
102102
* **Global Styles:** Checks for `global_style.def` to apply custom CSS overrides per context.

0 commit comments

Comments
 (0)