diff options
Diffstat (limited to 'lib/tpl')
-rw-r--r-- | lib/tpl/default/style.ini | 3 | ||||
-rw-r--r-- | lib/tpl/dokuwiki/style.ini | 3 | ||||
-rw-r--r-- | lib/tpl/index.php | 10 |
3 files changed, 14 insertions, 2 deletions
diff --git a/lib/tpl/default/style.ini b/lib/tpl/default/style.ini index 7d27381c9..b9e1e9424 100644 --- a/lib/tpl/default/style.ini +++ b/lib/tpl/default/style.ini @@ -1,6 +1,9 @@ ; Please see http://www.php.net/manual/en/function.parse-ini-file.php ; for limitations of the ini format used here +; Please only make changes in style.local.ini. If it doesn't exist, +; just create it by copying style.ini. + ; Define the stylesheets your template uses here. The second value ; defines for which output media the style should be loaded. Currently ; print, screen and rtl are supported. rtl styles are loaded additionally diff --git a/lib/tpl/dokuwiki/style.ini b/lib/tpl/dokuwiki/style.ini index 242b43080..bcb5a1a2e 100644 --- a/lib/tpl/dokuwiki/style.ini +++ b/lib/tpl/dokuwiki/style.ini @@ -1,6 +1,9 @@ ; Please see http://www.php.net/manual/en/function.parse-ini-file.php ; for limitations of the ini format used here +; Please only make changes in style.local.ini. If it doesn't exist, +; just create it by copying style.ini. + ; Define the stylesheets your template uses here. The second value ; defines for which output media the style should be loaded. Currently ; print, screen and all are supported. diff --git a/lib/tpl/index.php b/lib/tpl/index.php index 357cc1f0d..7cdec9774 100644 --- a/lib/tpl/index.php +++ b/lib/tpl/index.php @@ -43,7 +43,13 @@ require_once(DOKU_INC.'inc/init.php'); </head> <body> <?php -$ini = @parse_ini_file($conf['template'].'/style.ini',true); +$styleini = ''; +if(@file_exists($conf['template'].'/style.local.ini')) + $styleini = $conf['template'].'/style.local.ini'; +else if(@file_exists($conf['template'].'/style.ini')) + $styleini = $conf['template'].'/style.ini'; +$ini = @parse_ini_file($styleini, true); + if ($ini) { echo '<table>'; echo "<caption>".htmlspecialchars($conf['template'])."'s style.ini</caption>"; @@ -60,7 +66,7 @@ if ($ini) { } echo '</table>'; } else { - echo "<p>Non-existent template: <strong>".htmlspecialchars($conf['template'])."</strong></p>"; + echo "<p>Non-existent or invalid template or style.ini: <strong>".htmlspecialchars($conf['template'])."</strong></p>"; } ?> </body> |