This is an old revision of the document!
modopts.ini
This configuration file is used for the configuration of various Synchronet JavaScript modules.
This file allows modules to be configured in a common place rather than requiring a separate configuration file for each module that has configurable behavior. That said, it is only appropriate for simple enable/disable or option=value type configuration; modules requiring more complex configuration may still necessitate their configuration files.
Format
Each named section identifies the module which is being configured and the key=value
pairs in that section are used to set configuration options for that module.
Use
JavaScript module authors use the modopts.ini
file by adding a single line to their .js
file:
options=load("modopts.js", "mymodule");
where “mymodule” is replaced with the JavaScript's module name (typically the module script filename, without the .js
extension).
As a result of this line being executed, the options
object is created with each key in the module's named section becoming a property of the options
object with a String value containing the value portion of the key=value
line.