lansuite / lansuite

A Content Management System designed especially for the needs of LAN-Parties
https://lansuite.github.io/lansuite/
GNU General Public License v2.0
70 stars 36 forks source link

Extend modules with plugin / hook functionality #810

Open M4LuZ opened 10 months ago

M4LuZ commented 10 months ago

Expected Behavior

In order to increase usability and functionality it would be good if the following two functionalities would exist.

Scheduleable Module functions

Modules define functions to be called as part of automation (in other words: Add selectable options from mdouels to the cron module), e.g.

It may be worth thinking this the other way around and have an interface in the cron module that other modules can use to schedule their actions, so inverse current checks from on-access to on-change.

Hook support

Some of the ideas flying in my head would require to trigger module functions at certain actions in other modules. To keep this coupling optional independent of module selection it would be good to implement function hooks (in a defined format) Points where this could be useful:

Current Behavior

Interactions between modules are in most cases implicit by direct calls with a few if-cases if the module is not active.

Possible Solution

Design approach to be created as wiki page and then linked here

Context

Your Environment

M4LuZ commented 9 months ago

I had a quick loog in regards to available solutions that could be implemented: