"Settings GUI", "version" => "0.1.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 Get a page to change the global wiki settings * @apiName ConfigureSettings * @apiGroup Utility * @apiPermission Moderator */ /* * ██████ ██████ ███ ██ ███████ ██ ██████ ██ ██ ██████ ███████ * ██ ██ ██ ████ ██ ██ ██ ██ ██ ██ ██ ██ ██ * ██ ██ ██ ██ ██ ██ █████ ██ ██ ███ ██ ██ ██████ █████ * ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ * ██████ ██████ ██ ████ ██ ██ ██████ ██████ ██ ██ ███████ */ add_action("configure", function() { global $settings, $env, $guiConfig; if(!$env->is_admin) { $errorMessage = "

You don't have permission to change $settings->sitename's master settings.

\n"; if(!$env->is_logged_in) $errorMessage .= "

You could try logging in.

"; else $errorMessage .= "

You could try logging out and then logging in again with a different account that has the appropriate privileges..

"; exit(page_renderer::render_main("Error - $settings->sitename", $errorMessage)); } $content = "

Master Control Panel

\n"; $content .= "

This page lets you configure $settings->sitename's master settings. Please be careful - you can break things easily on this page if you're not careful!

\n"; $content .= "

Actions

"; $content .= "\n"; $content .= "
\n"; $content .= "
\n"; $invindex_rebuild_script = <<