"Settings GUI", "version" => "0.1.7", "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, $version, $commit; 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"; if(module_exists("feature-user-table")) $content .= "

Looking to manage $settings->sitename's users? Try the user table instead!

\n"; if(module_exists("feature-theme-gallery")) $content .= "

Want to change $settings->sitename's theme? Try the theme gallery!

"; $content .= "

You're currently running Pepperminty Wiki $version+" . substr($commit, 0, 7) . ".

\n"; $content .= "

Actions

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