public function updated_config(FormUI $ui) { Session::notice(_t('Settings saved.', 's3siloplugin')); $ui->save(); if (is_null(Options::get('s3_bucket'))) { Session::notice(_t('Please select a bucket from your S3 account.', 's3siloplugin')); } Utils::redirect(); }
public function updated_config(FormUI $ui) { $blacklist = explode("\n", $ui->blacklist->value); $blacklist = array_unique($blacklist); natsort($blacklist); $_POST[$ui->blacklist->field] = implode("\n", $blacklist); Session::notice(_t('Blacklist saved.', 'simpleblacklist')); $ui->save(); }
public function formui_submit(FormUI $form) { $filename = basename($form->pluginurl); //local file path (e.g. habari_installation/system/plugins/plugin.zip) $filePath = $this->downloadplugin_pluginsPath . $filename; // check if the remote file is successfully opened if ($fp = fopen($form->pluginurl, 'r')) { $content = ''; // keep reading until there's nothing left while ($line = fread($fp, 1024)) { $content .= $line; } $fp = fopen($filePath, 'w'); fwrite($fp, $content); fclose($fp); } else { Session::notice(_t("Error during file download", 'plugin_locale')); break; } $zip = new ZipArchive(); $res = $zip->open($filePath); if ($res === TRUE) { $zip->extractTo($this->downloadplugin_pluginsPath); $zip->close(); //SET 775 Permission ? Session::notice(_t('Plugin installed', 'plugin_locale')); } else { Session::notice(_t('Error during plugin installation', 'plugin_locale')); $form->save(); unlink($filePath); break; } unlink($filePath); $form->pluginurl->value = ''; $form->save(); Utils::redirect(URL::get('admin', 'page=plugins')); }
/** * Give the user a session message to confirm options were saved. **/ public function updated_config(FormUI $ui) { Session::notice(_t('Twitter options saved.', 'twitter')); $ui->save(); }
/** * Display a message when the site options are saved, and save those options * * @param FormUI $form The successfully submitted form */ public function form_options_success($form) { Session::notice(_t('Successfully updated options')); $form->save(); Utils::redirect(); }
public function updated_config(FormUI $ui) { Session::notice(_t('Bit.ly options saved.', 'bitly')); $ui->save(); }
public function formui_submit(FormUI $form) { Session::notice(_t('Mollom API Keys saved.', 'mollom')); $form->save(); }
/** * Give the user a session message to confirm options were saved. **/ public function updated_config(FormUI $ui) { Session::notice(_t('Trac options saved.', 'tracdashmodule')); $ui->save(); }
public function updated_config(FormUI $ui) { Session::notice(_t('Trac Feed options saved.', 'tracfeed')); $ui->save(); }
/** * Display a standard success message upon saving the form * * @param FormUI $form The form that will be saved * @return bool Returning false tells the form that the save was handled */ public function save_block(FormUI $form) { $form->save(); return false; }
public function formui_submit(FormUI $form) { Session::notice(_t('Blogroll options saved.', self::DOMAIN)); $form->save(); }
/** * Invoked when the before the plugin configurations are saved * * @param FormUI $form The configuration form being saved * @return true */ public function save_config($form) { $form->save(); Session::notice('Woopra plugin configuration saved!'); return false; }
/** * Perform actions when the admin plugin form is successfully submitted. * * @param FormUI $ui The form that successfully completed * @return boolean True if the normal processing should occur to save plugin options from the form to the database */ public function updated_config($ui) { $ui->save(); // Delete the cached feed data DB::query('TRUNCATE {feedlist}'); // Reset the cronjob so that it runs immediately with the change CronTab::delete_cronjob('feedlist'); CronTab::add_hourly_cron('feedlist', 'load_feeds', 'Load feeds for feedlist plugin.'); return false; }
public function formui_submit(FormUI $form) { Session::notice(_t('HTML code saved', 'htmleverywhere')); $form->save(); }
public function updated_config(FormUI $ui) { Session::notice(_t('Share plugin options saved.', 'share')); $ui->save(); }
/** * Handle the form submition and save options * @param FormUI $form The FormUI that was submitted */ public function save_config(FormUI $form) { Session::notice(_t('Piwik plugin configuration saved', 'piwik')); $form->save(); }
/** * Callback function from choosing the engine. * * @param FormUI $ui * @return string|bool */ public function chosen_engine($ui) { $this->load_backend($ui->engine->value); if (!$this->_backend->check_conditions()) { $ui->set_option('success_message', _t('The engine could not be set up, please check the requirements.')); } else { $ui->save(); return '<p>' . _t('Engine saved - please press close and then select Configure in order to check the details and activate the engine.') . '</p>'; } return false; }