"Settings GUI", "version" => "0.1", "author" => "Starbeamrainbowlabs", "description" => "The module everyone has been waiting for! Adds a web based gui that lets mods change the wiki settings.", "id" => "feature-guiconfig", "code" => function() { global $settings; /** * @api {get} ?action=configure Change the global wiki settings * @apiName ConfigureSettings * @apiGroup Utility * @apiPermission Moderator */ /* * ██████ ██████ ███ ██ ███████ ██ ██████ ██ ██ ██████ ███████ * ██ ██ ██ ████ ██ ██ ██ ██ ██ ██ ██ ██ ██ * ██ ██ ██ ██ ██ ██ █████ ██ ██ ███ ██ ██ ██████ █████ * ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ * ██████ ██████ ██ ████ ██ ██ ██████ ██████ ██ ██ ███████ */ add_action("configure", function() { global $settings, $guiConfig; $content = ""; foreach($guiConfig as $configKey => $configData) { $reverse = false; $inputControl = ""; $label = ""; switch($configData->type) { case "url": case "number": case "text": $inputControl = ""; break; case "textarea": $inputControl = ""; case "checkbox": $reverse = true; $inputControl = "$configKey ? " checked" : "") . " />"; default: $label = ""; $inputControl = "
Sorry! The $configKey
setting isn't editable yet through the gui. Please try editing peppermint.json
for the time being.
Although you can use the edit page to view a page's source, you can also ask $settings->sitename to send you the raw page source and nothing else. This feature is intented for those who want to automate their interaction with $settings->sitename.
To use this feature, navigate to the page for which you want to see the source, and then alter the action
parameter in the url's query string to be raw
. If the action
parameter doesn't exist, add it. Note that when used on an file's page this action will return the source of the description and not the file itself.