Bug 27527

Summary: Plugin hooks to create additional contents
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Plugin architectureAssignee: Jonathan Druart <jonathan.druart>
Status: In Discussion --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: dcook, fridolin.somers, hagud
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15326
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27033
Change sponsored?: Sponsored Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 27527: Additional content plugin
Bug 27527: Add new page to integrate the content to Koha correctly

Description Jonathan Druart 2021-01-22 14:19:14 UTC
It would be useful to let plugin create contents that we will integrate into Koha.

The idea is to have a hook (on the main page for instance) that will retrieve a list of URL that will be displayed at the end of the page.

The URL could be:
- A link to an external website
- A link to an existing view of Koha
- A link to a specific content

The specific content would be returned by the plugin and displayed nicely integrated into Koha.
Comment 1 Jonathan Druart 2021-01-22 15:22:45 UTC
Created attachment 115698 [details] [review]
Bug 27527: Additional content plugin

Sponsored-by: Orex Digital
Comment 2 Jonathan Druart 2021-01-22 15:22:48 UTC
Created attachment 115699 [details] [review]
Bug 27527: Add new page to integrate the content to Koha correctly

Sponsored-by: Orex Digital
Comment 3 Jonathan Druart 2021-01-22 15:24:23 UTC
Test plan:
1. Apply the patches
2. Download the "additional contents" plugin at https://gitlab.com/joubu/koha-plugin-additional-contents/-/releases
3. Install it
4. Configure it
Example:
Create an internal link: https://snipboard.io/vsQadW.jpg
Create an external link: https://snipboard.io/IPsjlz.jpg
Create a content: https://snipboard.io/HT1kxi.jpg
Note that if the URL is filled the content will be ignored.
Note that you can choose "mainpage" or "tools-home" for the "page" input.

The table lists the different contents you created: https://snipboard.io/YAdKzC.jpg

The appears on the main page: https://snipboard.io/N2IRsK.jpg

Click the links.
You should be redirected correctly.

For the link that point to a specific content you will see: https://snipboard.io/91ezAG.jpg
Comment 4 Jonathan Druart 2021-01-22 15:24:45 UTC
This has been developed for a very specific need and I don't know if it has to be part of Koha core. If people are interested, both the plugin and the code here will have to be improved (it's not ready yet).

Also we will think how it could be extended for other uses.
Comment 5 Fridolin Somers 2022-01-08 01:09:05 UTC
*** Bug 27033 has been marked as a duplicate of this bug. ***