// always set langDir before lang.
Valitron\Validator::lang('en');
//Retrieve basic configuration settings
$settings = fetchConfigParameters();
//Grab plugin settings, used in plugin like so:
//$pvalue = $plugin_settings['variable_name']['config_value'];
/*
$pvalue = $plugin_settings['$pmsystem']['value'];
if ($pvalue != 1){
   // Forward to index page
   addAlert("danger", "Whoops, looks like the private message system is not enabled");
   header("Location: ".SITE_ROOT."account/index.php");
   exit();
}
*/
$plugin_settings = fetchConfigParametersPlugins();
//Set Settings
$emailDate = date('F j, Y');
$emailActivation = $settings['activation'];
$can_register = $settings['can_register'];
$websiteName = $settings['website_name'];
$websiteUrl = $settings['website_url'];
$emailAddress = $settings['email'];
$resend_activation_threshold = $settings['resend_activation_threshold'];
$language = $settings['language'];
$new_user_title = $settings['new_user_title'];
$email_login = $settings['email_login'];
$token_timeout = $settings['token_timeout'];
$version = $settings['version'];
// Check for upgrade, do this hear for access to $version
checkUpgrade($version, $dev_env);
Ejemplo n.º 2
0
/**
 * Retrieve all site plugin settings in a array
 * @return array $results contains all plugin settings
 */
function loadSitePluginSettings()
{
    // This block automatically checks this action against the permissions database before running.
    if (!checkActionPermissionSelf(__FUNCTION__, func_get_args())) {
        addAlert("danger", "Sorry, you do not have permission to access this resource.");
        return false;
    }
    return fetchConfigParametersPlugins();
}