I want to surface some (more) admin settings to wiki pages through a recipe, and wanted to kick some ideas around.
Initially, I want to allow admins of my websites to set skins through an admin interface, but I anticipate other uses as well (enabling certain recipes for example). So I'm searching for a fairly generic way of approaching this, that could easily be extended. My current thoughts: Admin settings could be in four types of wiki pages: Site.Config SiteAdmin.Config Group.Config Group.Page-Config ... as appropriate, probably using PTV's in the short run, though possibly using forms. Config values should be written to an executable php file (so that they can be changed at the file level as well). This file I presume would have to be written to wiki.d (to deal with write restrictions). The file when executed would load the config values into a global array $configsettings, from whence the values could be assigned to the appropriate PmWiki variables. There could be a separate executable file for each wiki page, or a combined file for all wiki pages (any thoughts on this?) Probably easiest to have php files with ".php" appended to the wiki page name (much like config files are now handled in the local dir). The format of the file would be: ... $configsettings['variable'] = value; $configsettings['Skin'] = 'MySkin'; ... $configsettings['selector.subselector.subselector'] = value1; $configsettings['selector.subselector.subselector2'] = value2; ... where the dot notation indicates sub-arrays. The values would then be mapped to variables (or arrays). So for instance $configsettings['EnableRelativePageVars'] =1; would be assigned to the $EnableRelativePageVars global variable. On the SiteAdmin.Config wiki page the entry would (in the short run) look like this: EnableRelativePageVars:1 BTW do PTV's support dot notation? So could I do selector.subselector.subselector:2 as a PTV on a wiki page? Also, the PTV values could be parsed with ParseArgs, I presume, for more complex settings. Anyone have any thoughts on any of this? - Henrik -- Henrik Bechmann bechmann.ca _______________________________________________ pmwiki-devel mailing list pmwiki-devel@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-devel