/**
  * Init configuration
  */
 protected function initConfiguration()
 {
     $Configuration = new PluginConfiguration($this->id());
     $Configuration->addValue(new PluginConfigurationValueBool('for_weather', __('Show statistics about weather conditions'), '', true));
     $Configuration->addValue(new PluginConfigurationValueBool('for_clothes', __('Show statistics about your clothing'), '', true));
     $this->setConfiguration($Configuration);
 }
 /**
  * Init configuration
  */
 protected function initConfiguration()
 {
     $Configuration = new PluginConfiguration($this->id());
     $Configuration->addValue(new PluginConfigurationValueArray('pace_distances', __('Distances'), '', array(0.2, 0.4, 1, 3, 5, 10, 21.1, 42.2, 50)));
     $Configuration->addValue(new PluginConfigurationValueArray('vdot_range', __('VDOT from ... to ...'), __('two values, comma seperated'), array(30, 80)));
     $Configuration->addValue(new PluginConfigurationValueArray('pace_range', __('Pace table: 400m from  ...s to ...s'), __('two values, comma seperated'), array(60, 180)));
     $this->setConfiguration($Configuration);
 }
 /**
  * Init configuration
  */
 protected function initConfiguration()
 {
     $Configuration = new PluginConfiguration($this->id());
     $Configuration->addValue(new PluginConfigurationValueFloat('main_distance', __('Main distance'), '', 10));
     $Configuration->addValue(new PluginConfigurationValueArray('pb_distances', __('Distances for yearly comparison'), '', array(1, 3, 5, 10, 21.1, 42.2)));
     $Configuration->addValue(new PluginConfigurationValueHiddenArray('fun_ids', '', '', array()));
     $this->setConfiguration($Configuration);
 }
 /**
  * Init configuration
  */
 protected function initConfiguration()
 {
     $OldTableView = new PluginConfigurationValueBool('show_as_table', __('Old table view'));
     $OldTableView->setDefaultValue(false);
     $Configuration = new PluginConfiguration($this->id());
     $Configuration->addValue($OldTableView);
     $this->setConfiguration($Configuration);
 }
 /**
  * Init configuration
  */
 protected function initConfiguration()
 {
     $Configuration = new PluginConfiguration($this->id());
     $Configuration->addValue(new PluginConfigurationValueBool('use_type', __('Analyze types'), '', true));
     $Configuration->addValue(new PluginConfigurationValueBool('use_pace', __('Analyze pace zones'), '', true));
     $Configuration->addValue(new PluginConfigurationValueBool('use_pulse', __('Analyze heart rate zones'), '', true));
     $Configuration->addValue(new PluginConfigurationValueInt('lowest_pulsegroup', __('Lowest heart rate zone'), __('[%HFmax]'), 65));
     $Configuration->addValue(new PluginConfigurationValueInt('pulsegroup_step', __('Heart rate zone: Increment'), __('[%HFmax]'), 5));
     $Configuration->addValue(new PluginConfigurationValueInt('lowest_pacegroup', __('Lowest pace zone'), __('[s/km]'), 450));
     $Configuration->addValue(new PluginConfigurationValueInt('highest_pacegroup', __('Highest pace zone'), __('[s/km]'), 240));
     $Configuration->addValue(new PluginConfigurationValueInt('pacegroup_step', __('Pace zone: Increment'), __('[s/km]'), 15));
     $this->setConfiguration($Configuration);
 }
 /**
  * Init configuration
  */
 protected function initConfiguration()
 {
     $ShowPaces = new PluginConfigurationValueBool('show_trainingpaces', __('Show: Paces'));
     $ShowPaces->setTooltip(__('Paces based on your curent VDOT'));
     $ShowPaces->setDefaultValue(true);
     $ShowTrimp = new PluginConfigurationValueBool('show_trimpvalues', __('Show: ATL/CTL/TSB'));
     $ShowTrimp->setTooltip(__('Show actual/chronical training load and stress balance (based on TRIMP)'));
     $ShowTrimp->setDefaultValue(true);
     $ShowTrimpExtra = new PluginConfigurationValueBool('show_trimpvalues_extra', __('Show: Monotony/TS'));
     $ShowTrimpExtra->setTooltip(__('Show monotony and training strain (based on TRIMP)'));
     $ShowTrimpExtra->setDefaultValue(true);
     $ShowVDOT = new PluginConfigurationValueBool('show_vdot', __('Show: VDOT'));
     $ShowVDOT->setTooltip(__('Predict current VDOT value'));
     $ShowVDOT->setDefaultValue(true);
     $ShowBE = new PluginConfigurationValueBool('show_basicendurance', __('Show: Basic endurance'));
     $ShowBE->setTooltip(__('Guess current basic endurance'));
     $ShowBE->setDefaultValue(true);
     $ShowJD = new PluginConfigurationValueBool('show_jd_intensity', __('Show: Training points'));
     $ShowJD->setTooltip(__('Training intensity by Jack Daniels'));
     $ShowJD->setDefaultValue(true);
     $Configuration = new PluginConfiguration($this->id());
     $Configuration->addValue($ShowPaces);
     $Configuration->addValue($ShowTrimp);
     $Configuration->addValue($ShowTrimpExtra);
     $Configuration->addValue($ShowVDOT);
     $Configuration->addValue($ShowBE);
     $Configuration->addValue($ShowJD);
     $this->setConfiguration($Configuration);
 }
 /**
  * Init configuration
  */
 protected function initConfiguration()
 {
     $Distances = new PluginConfigurationValueArray('distances', __('Distances to predict'));
     $Distances->setDefaultValue(array(1, 3, 5, 10, 21.1, 42.2));
     $Model = new PluginConfigurationValueSelect('model', __('Prediction model'));
     $Model->setOptions(array('jd' => 'Jack Daniels', 'cpp' => 'Robert Bock (CPP)', 'steffny' => 'Herbert Steffny', 'cameron' => 'David Cameron'));
     $Model->setDefaultValue('jd');
     $BasicEndurance = new PluginConfigurationValueBool('use_be', __('Use basic endurance'), __('Use basic endurance factor to adapt prognosis for long distances (Jack Daniels only).'));
     $BasicEndurance->setDefaultValue(true);
     $Configuration = new PluginConfiguration($this->id());
     $Configuration->addValue($Distances);
     $Configuration->addValue($Model);
     $Configuration->addValue($BasicEndurance);
     $this->setConfiguration($Configuration);
 }
 /**
  * Init configuration
  */
 protected function initConfiguration()
 {
     $Configuration = new PluginConfiguration($this->id());
     $Configuration->addValue(new PluginConfigurationValueBool('use_old_design', __('Use old design'), '', false));
     $Configuration->addValue(new PluginConfigurationValueBool('use_weight', __('Record body weight'), '', true));
     $Configuration->addValue(new PluginConfigurationValueBool('use_body_fat', __('Record body fat'), '', true));
     $Configuration->addValue(new PluginConfigurationValueBool('use_pulse', __('Record resting heart rate'), '', true));
     $Configuration->addValue(new PluginConfigurationValueInt('wunschgewicht', __('Desired body weight'), '', 0));
     $Configuration->addValue(new PluginConfigurationValueInt('plot_points', __('Plot: number of points'), '', 20));
     $Configuration->addValue(new PluginConfigurationValueInt('plot_timerange', __('<small>or</small> fixed number of days'), __('Enter a value &ge; 0 to show a fixed time range.'), 0));
     $this->setConfiguration($Configuration);
 }
 /**
  * Init configuration
  */
 protected function initConfiguration()
 {
     $this->AllTypes = DB::getInstance()->query('SELECT * FROM `' . PREFIX . 'equipment_type` WHERE `accountid`="' . SessionAccountHandler::getId() . '" ORDER BY `name` ASC')->fetchAll();
     $Options = array();
     foreach ($this->AllTypes as $data) {
         $Options[$data['id']] = $data['name'];
     }
     $Types = new PluginConfigurationValueSelect('type', __('Equipment type to display'));
     $Types->setOptions($Options);
     $Configuration = new PluginConfiguration($this->id());
     $Configuration->addValue($Types);
     if (isset($_GET['type']) && isset($Options[$_GET['type']])) {
         $Configuration->object('type')->setValue($_GET['type']);
         $Configuration->update('type');
         Cache::delete(PluginConfiguration::CACHE_KEY);
     }
     $this->setConfiguration($Configuration);
 }
 /**
  * Init configuration
  */
 protected function initConfiguration()
 {
     $Configuration = new PluginConfiguration($this->id());
     foreach ($this->getTimeset() as $i => $timeset) {
         $ShowHint = sprintf(__('Show a prognosis for the current %s'), $timeset['name']);
         $GoalHint = sprintf(__('Current time range: %s to %s'), $timeset['start']->format("d.m.Y"), $timeset['end']->format("d.m.Y"));
         if (isset($timeset['note'])) {
             $ShowHint .= '<br>' . $timeset['note'];
             $GoalHint .= '<br>' . $timeset['note'];
         }
         $ShowGoal = new PluginConfigurationValueBool('ziel_show_' . $i, sprintf(__('%s: show'), $timeset['name']), $ShowHint, true);
         $Goal = new PluginConfigurationValueInt('ziel_' . $i, sprintf(__('%s: goal'), $timeset['name']), $GoalHint, 0);
         $Configuration->addValue($ShowGoal);
         $Configuration->addValue($Goal);
     }
     $showDetails = new PluginConfigurationValueBool('details', __('Show details'), '', true);
     $Configuration->addValue($showDetails);
     $this->setConfiguration($Configuration);
 }
 /**
  * Init configuration
  */
 protected function initConfiguration()
 {
     $this->AllTags = array();
     $AllTags = DB::getInstance()->query('SELECT `id`, `tag` FROM `' . PREFIX . 'tag` WHERE `accountid`="' . SessionAccountHandler::getId() . '" ORDER BY `tag` ASC')->fetchAll();
     foreach ($AllTags as $data) {
         $this->AllTags[$data['id']] = $data['tag'];
     }
     $Tags = new PluginConfigurationValueSelect('tag', __('Tag to analyze'));
     $Tags->setOptions($this->AllTags);
     $Configuration = new PluginConfiguration($this->id());
     $Configuration->addValue($Tags);
     if (isset($_GET['dat']) && isset($this->AllTags[$_GET['dat']])) {
         $Configuration->object('tag')->setValue($_GET['dat']);
         $Configuration->update('tag');
         Cache::delete(PluginConfiguration::CACHE_KEY);
     }
     $this->setConfiguration($Configuration);
     $this->TagId = (int) $this->Configuration()->value('tag');
 }
 /**
  * Init configuration
  */
 protected function initConfiguration()
 {
     $Configuration = new PluginConfiguration($this->id());
     $Configuration->addValue(new PluginConfigurationValueBool('compare_weeks', __('Compare kilometers per week'), '', true));
     $Configuration->addValue(new PluginConfigurationValueBool('show_streak', __('Show streak'), '', true));
     $Configuration->addValue(new PluginConfigurationValueInt('show_streak_days', __('Minimum number of days to show a streak (0 for always)'), '', 10));
     $this->setConfiguration($Configuration);
 }
Пример #13
0
 /**
  * Configuration
  * 
  * This method call will force the configuration object to catch its values
  * from the database if not already done.
  * @return PluginConfiguration
  */
 public final function &Configuration()
 {
     $this->Configuration->catchValuesFromDatabaseIfNotDoneYet();
     return $this->Configuration;
 }
 /**
  * Init configuration
  */
 protected function initConfiguration()
 {
     $Configuration = new PluginConfiguration($this->id());
     $Configuration->addValue(new PluginConfigurationValueBool('analyze_cities', __('Show visited cities'), '', true));
     $this->setConfiguration($Configuration);
 }
 /**
  * Init configuration
  */
 protected function initConfiguration()
 {
     $Configuration = new PluginConfiguration($this->id());
     $Configuration->addValue(new PluginConfigurationValueBool('show_extreme_times', __('Show nightly activities'), '', true));
     $this->setConfiguration($Configuration);
 }