Synchronet v3.21e-Win32 (install) has been released (Mar-2026).

You can donate to the Synchronet project using PayPal.

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
dir:modopts [2025/02/13 17:00] – created digital mandir:modopts [2026/02/18 18:57] (current) – [ctrl/modopts directory] Note that the ARS section feature is unique to modopts/*.ini digital man
Line 4: Line 4:
 The base filename of ''.ini'' files in the ''modopts'' directory should be the same as the module name (e.g. ''modname.js'' should ''load()'' ''modopts.js'' and pass ''modname'' as argument which will then return options from ''ctrl/modopts/modname.ini''). The base filename of ''.ini'' files in the ''modopts'' directory should be the same as the module name (e.g. ''modname.js'' should ''load()'' ''modopts.js'' and pass ''modname'' as argument which will then return options from ''ctrl/modopts/modname.ini'').
  
-If the corresponding ''[[dir:ctrl]]/modopts/modname.ini'' file exists, ''[[dir:ctrl]]/modopts.ini'' (or by extension, ''ctrl/[[dir:modopts.d]]/*.ini'') will **not** be opened/parsed by ''[[dir:exec]]/[[dir:load]]/modopts.js''.+If the corresponding ''[[dir:ctrl]]/modopts/modname.ini'' file exists, ''[[dir:ctrl]]/[[config:modopts.ini]]'' (or by extension, ''ctrl/[[dir:modopts.d]]/*.ini'') will **not** be opened/parsed by ''[[dir:exec]]/[[dir:load]]/[[custom:javascript:lib:modopts.js]]''.
  
 Contrasted with ''[[dir:ctrl]]/[[dir:modopts.d]]/*.ini'' files, ''modopts/*.ini'' files **need not** contain their module-specific section heading (i.e. ''[modname]''): Contrasted with ''[[dir:ctrl]]/[[dir:modopts.d]]/*.ini'' files, ''modopts/*.ini'' files **need not** contain their module-specific section heading (i.e. ''[modname]''):
  
   * Any keys from the //root section// of the ''.ini'' file will be properties of the parsed (options) object   * Any keys from the //root section// of the ''.ini'' file will be properties of the parsed (options) object
-  * Keys from one or more ''[sections]'' maybe //added-to// the parsed object if the current user meets the [[access:requirements|Access Requirements]] provided in the section name+  * Keys from one or more ''[sections]'' may be //added-to// the parsed object if the current user meets the [[access:requirements|Access Requirements]] provided in the section name((this feature is unique to the ctrl/modopts/*.ini files))
   * Keys parsed in ''[sections]'' of the ''.ini'' file will override keys parsed previously from the //root section// or any previous-parsed ''[sections]''   * Keys parsed in ''[sections]'' of the ''.ini'' file will override keys parsed previously from the //root section// or any previous-parsed ''[sections]''
  
 ===== See Also ===== ===== See Also =====
   * [[:dir:|dir index]]   * [[:dir:|dir index]]
 +  * [[:dir:modopts.d]]
 +  * [[:config:modopts.ini]]
 +  * [[custom:javascript:lib:modopts.js]]
  
 {{tag>module configuration .ini}} {{tag>module configuration .ini}}