From cf550188cfceb418f03dda442b3674e49bc7b321 Mon Sep 17 00:00:00 2001 From: Amanda French Date: Mon, 13 May 2024 13:49:36 -0500 Subject: [PATCH 1/2] Updates gemfiles --- Gemfile | 2 ++ Gemfile.lock | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 4609b002e163..114cae18208c 100644 --- a/Gemfile +++ b/Gemfile @@ -8,3 +8,5 @@ group :jekyll_plugins do gem 'jekyll-readme-index' gem 'jekyll-sitemap' end + +gem "webrick", "~> 1.8" diff --git a/Gemfile.lock b/Gemfile.lock index b62839875b80..1304532fb345 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -68,6 +68,7 @@ GEM terminal-table (1.8.0) unicode-display_width (~> 1.1, >= 1.1.1) unicode-display_width (1.8.0) + webrick (1.8.1) PLATFORMS ruby @@ -80,6 +81,7 @@ DEPENDENCIES jekyll-seo-tag jekyll-sitemap jekyll-titles-from-headings + webrick (~> 1.8) BUNDLED WITH - 2.1.4 + 2.5.10 From 54f9231fb34b78d7f191fc2b973e4bfc4b919e92 Mon Sep 17 00:00:00 2001 From: Amanda French Date: Mon, 13 May 2024 13:50:07 -0500 Subject: [PATCH 2/2] Adds warnings and links to hook lists --- dev/documentation/3.3/en/utilities-hooks.md | 3 ++- dev/documentation/en/utilities-hooks.md | 3 ++- ojs-2-technical-reference/en/hook_list.md | 6 ++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/dev/documentation/3.3/en/utilities-hooks.md b/dev/documentation/3.3/en/utilities-hooks.md index ec5d7774f24d..92cc096d0ef4 100644 --- a/dev/documentation/3.3/en/utilities-hooks.md +++ b/dev/documentation/3.3/en/utilities-hooks.md @@ -1,6 +1,7 @@ --- book: dev-documentation version: 3.3 +showPageTOC: true title: Hooks - Technical Documentation - OJS|OMP|OPS 3.3 --- @@ -102,7 +103,7 @@ Hooks are most commonly used in generic plugins. Calling hooks from other types The following is a list of the most common hooks that can be used. -> This is an incomplete list. Search the application code for `HookRegistry::call` to get a complete list. +> This is an incomplete list. Search the [application code](https://github.com/pkp/ojs/tree/stable-3_3_0) for `HookRegistry::call` to get a complete list of hooks available in OJS 3.3. {:.warning} ### Request, Routing and Templating diff --git a/dev/documentation/en/utilities-hooks.md b/dev/documentation/en/utilities-hooks.md index 90b57a7ed4fa..256164d8171b 100644 --- a/dev/documentation/en/utilities-hooks.md +++ b/dev/documentation/en/utilities-hooks.md @@ -1,6 +1,7 @@ --- book: dev-documentation version: 3.4 +showPageTOC: true title: Hooks - Technical Documentation - OJS|OMP|OPS --- @@ -106,7 +107,7 @@ Hooks are most commonly used in generic plugins. Calling hooks from other types ## Common Hooks -The following is a list of the most common hooks that can be used. Find all of the hooks in the application by searching for `Hook::call` in the code. +> This is an incomplete list. Search the [application code](https://github.com/pkp/ojs) for `HookRegistry::call` to get a complete list of hooks available in OJS 3.4. {:.warning} ### Request, Routing and Templating diff --git a/ojs-2-technical-reference/en/hook_list.md b/ojs-2-technical-reference/en/hook_list.md index ee81fccb8e57..25d60d9ec571 100644 --- a/ojs-2-technical-reference/en/hook_list.md +++ b/ojs-2-technical-reference/en/hook_list.md @@ -1,9 +1,15 @@ # Hook List +> This hook list is out of date. Some hooks may not work with newer versions of OJS. Please consult [v3.3 Common Hooks](/dev/documentation/3.3/en/utilities-hooks#common-hooks) and [v3.4 Common Hooks](/dev/documentation/en/utilities-hooks#common-hooks) for currently supported hooks. +{:.warning} + The following list describes all the hooks built into OJS as of release 2.1. Ampersands before variable names (e.g. ``&$sourceFile``) indicate that the parameter has been passed to the hook callback in the parameters array by reference and can be modified by the hook callback. The effect of the hook callback's return value is specified where applicable; in addition to this, the hook callback return value will always determine whether or not further callbacks registered on the same hook will be skipped. **Table 5.2. Hook List** +> This hook list is out of date. Some hooks may not work with newer versions of OJS. Please consult [v3.3 Common Hooks](/dev/documentation/3.3/en/utilities-hooks#common-hooks) and [v3.4 Common Hooks](/dev/documentation/en/utilities-hooks#common-hooks) for currently supported hooks. +{:.warning} + | Name | Parameters | Description | | ----- | ----- | ----- | | `LoadHandler` | `&$page`, `&$op`, `&$sourceFile` | Called by OJS's main `index.php`{.filename} script after the page (`&$page`), operation (`&$op`), and handler code file (`&$sourceFile`) names have been determined, but before `$sourceFile` is loaded. Can be used to intercept browser requests for handling by the plugin. Returning `true` from the callback will prevent OJS from loading the handler stub in `$sourceFile`.