Example #1
0
 /**
  * Get possible configuration values
  *
  */
 protected function getPossible()
 {
     global $dataDir, $langmessage;
     $possible = $this->variables;
     $langDir = $dataDir . '/include/thirdparty/ckeditor_34/lang';
     //ckeditor
     $possible['langeditor'] = \gp\tool\Files::readDir($langDir, 'js');
     unset($possible['langeditor']['_languages']);
     $possible['langeditor']['inherit'] = ' ' . $langmessage['default'];
     //want it to be the first in the list
     asort($possible['langeditor']);
     //recaptcha language
     $possible['recaptcha_language'] = array();
     $possible['recaptcha_language']['inherit'] = $langmessage['default'];
     $possible['recaptcha_language']['en'] = 'en';
     $possible['recaptcha_language']['nl'] = 'nl';
     $possible['recaptcha_language']['fr'] = 'fr';
     $possible['recaptcha_language']['de'] = 'de';
     $possible['recaptcha_language']['pt'] = 'pt';
     $possible['recaptcha_language']['ru'] = 'ru';
     $possible['recaptcha_language']['es'] = 'es';
     $possible['recaptcha_language']['tr'] = 'tr';
     //website language
     $possible['language'] = $this->GetPossibleLanguages();
     //tidy
     if (function_exists('tidy_parse_string')) {
         $possible['HTML_Tidy'] = array('off' => $langmessage['Off'], '' => $langmessage['On']);
     } else {
         $possible['HTML_Tidy'] = array('' => 'Unavailable');
     }
     //required email fields
     $possible['require_email'] = array('none' => 'None', '' => 'Subject & Message', 'email' => 'Subject, Message & Email');
     //see xoopsmultimailer.php
     $possible['mail_method'] = array('mail' => 'PHP mail()', 'sendmail' => 'sendmail', 'smtp' => 'smtp', 'smtpauth' => 'SMTPAuth');
     //CDN
     foreach (\gp\tool\Output\Combine::$scripts as $key => $script_info) {
         if (!isset($script_info['cdn'])) {
             continue;
         }
         $config_key = 'cdn_' . $key;
         if (!array_key_exists($config_key, $possible)) {
             continue;
         }
         $opts = array_keys($script_info['cdn']);
         $possible[$config_key] = array_combine($opts, $opts);
         array_unshift($possible[$config_key], $langmessage['None']);
     }
     gpSettingsOverride('configuration', $possible);
     return $possible;
 }
Example #2
0
 /**
  * Get a list of theme subfolders that have style.css files
  *
  */
 public function GetThemeColors($dir)
 {
     $subdirs = \gp\tool\Files::readDir($dir, 1);
     $colors = array();
     asort($subdirs);
     foreach ($subdirs as $subdir) {
         if (\gp\tool\Output::StyleType($dir . '/' . $subdir) !== false) {
             $colors[$subdir] = $subdir;
         }
     }
     return $colors;
 }