diff options
author | Sem <sembrestels@riseup.net> | 2013-11-09 16:13:46 +0100 |
---|---|---|
committer | Sem <sembrestels@riseup.net> | 2013-11-09 16:13:46 +0100 |
commit | e2a2fbdccaf0f48878903f448428cab5852d0870 (patch) | |
tree | 9cbe6b74c8e2e191ec65fba78d7435af35506f82 /mod/dokuwiki/vendors/dokuwiki/lib/tpl/index.php | |
parent | 59448d8a9864573c05477a63a6dda404c455fdb6 (diff) | |
parent | b603da53e13005c67d05efac67b70023dfffc450 (diff) | |
download | elgg-e2a2fbdccaf0f48878903f448428cab5852d0870.tar.gz elgg-e2a2fbdccaf0f48878903f448428cab5852d0870.tar.bz2 |
Add 'mod/dokuwiki/' from commit 'b603da53e13005c67d05efac67b70023dfffc450'
git-subtree-dir: mod/dokuwiki
git-subtree-mainline: 59448d8a9864573c05477a63a6dda404c455fdb6
git-subtree-split: b603da53e13005c67d05efac67b70023dfffc450
Diffstat (limited to 'mod/dokuwiki/vendors/dokuwiki/lib/tpl/index.php')
-rw-r--r-- | mod/dokuwiki/vendors/dokuwiki/lib/tpl/index.php | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/mod/dokuwiki/vendors/dokuwiki/lib/tpl/index.php b/mod/dokuwiki/vendors/dokuwiki/lib/tpl/index.php new file mode 100644 index 000000000..a55081738 --- /dev/null +++ b/mod/dokuwiki/vendors/dokuwiki/lib/tpl/index.php @@ -0,0 +1,68 @@ +<?php +/** + * This file reads the style.ini of the used template and displays the + * replacements defined in it. Color replacements will be displayed + * visually. This should help with adjusting and using the styles + * specified in the style.ini + * + * @author Andreas Gohr <andi@splitbrain.org> + * @author Anika Henke <anika@selfthinker.org> + */ +?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr"> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <title>Template Replacements</title> + <style type="text/css"> + body { + background-color: #fff; + color: #000; + } + caption { + font-weight: bold; + } + td { + margin: 0; + padding: 0.5em 2em; + font-family: monospace; + font-size: 120%; + border: 1px solid #fff; + } + tr:hover td { + border: 1px solid #ccc; + } + .color { + padding: 0.25em 1em; + border: 1px #000 solid; + } + </style> +</head> +<body> +<?php +if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/../../'); +require_once(DOKU_INC.'inc/init.php'); + +$ini = @parse_ini_file($conf['template'].'/style.ini',true); +if ($ini) { + echo '<table>'; + echo "<caption>".htmlspecialchars($conf['template'])."'s style.ini</caption>"; + foreach($ini['replacements'] as $key => $val){ + echo '<tr>'; + echo '<td>'.htmlspecialchars($key).'</td>'; + echo '<td>'.htmlspecialchars($val).'</td>'; + echo '<td>'; + if(preg_match('/^#[0-f]{3,6}$/i',$val)){ + echo '<div class="color" style="background-color:'.$val.';"> </div>'; + } + echo '</td>'; + echo '</tr>'; + } + echo '</table>'; +} else { + echo "<p>Non-existent template: <strong>".htmlspecialchars($conf['template'])."</strong></p>"; +} +?> +</body> +</html> |