Lines Matching +full:style +full:. +full:local +full:. +full:ini

9  * @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html
10 * @author Andreas Gohr <andi@splitbrain.org>
41 $run = 'run' . ucfirst($run);
46 * Render HTML output, e.g. helpful text and a form
53 echo '<div id="plugin__styling" class="' . $class . '">';
54 echo '<h1>' . $this->getLang('menu') . '</h1>';
72 $target = DOKU_BASE . 'lib/plugins/styling/popup.php';
78 echo '<p class="error">' . $this->getLang('error') . '</p>';
82 echo '<form class="styling" method="post" action="' . $target . '">';
92 echo '<td><label for="tpl__' . hsc($key) . '">' . $name . '</label></td>';
93 echo '<td><input type="' . $this->colorType($value) . '" name="tpl[' . hsc($key) . ']" ' .
94 'id="tpl__' . hsc($key) . '" value="' . hsc($this->colorValue($value)) . '" ' .
101 echo '<button type="submit" name="run[preview]" class="btn_preview primary">' .
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') . '</button>';
112 #FIXME only if local.ini exists:
113 echo '<button type="submit" name="run[revert]">' . $this->getLang('btn_revert') . '</button>';
118 echo tpl_locale_xhtml('style');
131 return '#' . $match[1] . $match[1] . $match[2] . $match[2] . $match[3] . $match[3];
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
181 * save the local style.ini replacements
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";
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);
219 $old = preg_replace('/\[replacements\]\n.*?(\n\[.*]|$)/s', '\\1', $old);
225 io_makeFileDir($ini);
226 io_saveFile($ini, "$old\n\n$new");