Lines Matching +full:ini +full:- +full:values
9 * @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html
38 $run = $INPUT->extract('run')->str('run');
42 $this->$run();
51 if ($this->ispopup) $class = 'ispopup page';
54 echo '<h1>' . $this->getLang('menu') . '</h1>';
55 $this->form();
68 $styleini = $styleUtil->cssStyleini();
71 if ($this->ispopup) {
78 echo '<p class="error">' . $this->getLang('error') . '</p>';
80 echo $this->locale_xhtml('intro');
88 if (empty($name)) $name = $this->getLang($key);
93 … echo '<td><input type="' . $this->colorType($value) . '" name="tpl[' . hsc($key) . ']" ' .
94 'id="tpl__' . hsc($key) . '" value="' . hsc($this->colorValue($value)) . '" ' .
102 $this->getLang('btn_preview') . '</button> ';
103 #FIXME only if preview.ini exists:
104 … echo '<button type="submit" name="run[reset]">' . $this->getLang('btn_reset') . '</button>';
108 …echo '<button type="submit" name="run[save]" class="primary">' . $this->getLang('btn_save') . '</b…
112 #FIXME only if local.ini exists:
113 … echo '<button type="submit" name="run[revert]">' . $this->getLang('btn_revert') . '</button>';
130 if (preg_match('/^#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])$/', $value, $match)) {
144 if (preg_match('/^#([0-9a-fA-F]{3}){1,2}$/', $value)) {
152 * saves the preview.ini (alos called from ajax directly)
157 $ini = $conf['cachedir'] . '/preview.ini';
158 io_saveFile($ini, $this->makeini());
162 * deletes the preview.ini
167 $ini = $conf['cachedir'] . '/preview.ini';
168 io_saveFile($ini, '');
172 * deletes the local style.ini replacements
176 $this->replaceIni('');
177 $this->runReset();
181 * save the local style.ini replacements
185 $this->replaceIni($this->makeini());
186 $this->runReset();
190 * create the replacement part of a style.ini from submitted data
198 $ini = "[replacements]\n";
199 $ini .= ";These overwrites have been generated from the Template styling Admin interface\n";
200 $ini .= ";Any values in this section will be overwritten by that tool again\n";
201 foreach ($INPUT->arr('tpl') as $key => $val) {
202 $ini .= $key . ' = "' . addslashes($val) . '"' . "\n";
205 return $ini;
209 * replaces the replacement parts in the local ini
211 * @param string $new the new ini contents
216 $ini = DOKU_CONF . "tpl/" . $conf['template'] . "/style.ini";
217 if (file_exists($ini)) {
218 $old = io_readFile($ini);
225 io_makeFileDir($ini);
226 io_saveFile($ini, "$old\n\n$new");