From d67c273583f09d275c06fddd556dd37b56372b83 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Mon, 31 Dec 2012 15:14:55 +0000 Subject: [PATCH 01/20] fixed missing tpl_incdir() leading to error in older DW versions --- tpl_functions.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tpl_functions.php b/tpl_functions.php index 74df26a..6d49f97 100644 --- a/tpl_functions.php +++ b/tpl_functions.php @@ -233,3 +233,13 @@ if (!function_exists('tpl_includeFile')) { } } } + +/** + * copied from core (available since Adora Belle) + */ +if (!function_exists('tpl_incdir')) { + function tpl_incdir() { + global $conf; + return DOKU_INC.'lib/tpl/'.$conf['template'].'/'; + } +} From 288cdb254b5c2df60558ad6348675a02c85ad08c Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 3 Mar 2013 14:32:15 +0000 Subject: [PATCH 02/20] minor fixes (diff, forms, italic) --- css/_diff.css | 12 +++++++++++- css/_forms.css | 17 +++++++++++++++-- css/basic.css | 4 ++++ 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/css/_diff.css b/css/_diff.css index 62f8312..58c24b5 100644 --- a/css/_diff.css +++ b/css/_diff.css @@ -21,7 +21,6 @@ .dokuwiki table.diff th { border-bottom: 1px solid __border__; font-size: 110%; - width: 50%; font-weight: normal; } .dokuwiki table.diff th a { @@ -37,8 +36,19 @@ .dokuwiki table.diff th.minor { color: #999; } +.dokuwiki table.diff_sidebyside th { + width: 50%; +} /* table body */ +.dokuwiki table.diff .diff-lineheader { + width: .7em; + text-align: right; +} +[dir=rtl] .dokuwiki table.diff .diff-lineheader { + text-align: left; +} +.dokuwiki table.diff .diff-lineheader, .dokuwiki table.diff td { font-family: Consolas, "Andale Mono WT", "Andale Mono", "Bitstream Vera Sans Mono", "Nimbus Mono L", Monaco, "Courier New", monospace; } diff --git a/css/_forms.css b/css/_forms.css index 4309f88..6744750 100644 --- a/css/_forms.css +++ b/css/_forms.css @@ -24,7 +24,7 @@ font-weight: bold; } [dir=rtl] .dokuwiki label.block { - text-align: left; + text-align: left; } .dokuwiki label.simple { @@ -33,7 +33,7 @@ font-weight: normal; } [dir=rtl] .dokuwiki label.simple { - text-align: right; + text-align: right; } .dokuwiki label.block select, @@ -67,6 +67,19 @@ .dokuwiki button.button { vertical-align: middle; } +/** + * Styles for auth forms + */ +#dw__login label[for="remember__me"] { + margin-left: 50%; + margin-bottom: 1.4em; +} +#dw__login fieldset, +#dw__resendpwd fieldset, +#dw__register fieldset { + padding-bottom: 0.7em; +} + /** * Styles for the subscription page diff --git a/css/basic.css b/css/basic.css index cd952cc..50c90c1 100644 --- a/css/basic.css +++ b/css/basic.css @@ -263,6 +263,10 @@ abbr { border-bottom: 1px dotted; font-style: normal; } +em acronym, +em abbr { + font-style: italic; +} pre, code, From 866969d221e70c02b14adf51fbf90768c538a402 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Mon, 11 Mar 2013 00:31:58 +0000 Subject: [PATCH 03/20] improved basic and print styles --- css/basic.css | 104 +++++++++++++++++++++++++++++++++++++++----------- css/print.css | 103 +++++++++++++++++++++++++++---------------------- 2 files changed, 140 insertions(+), 67 deletions(-) diff --git a/css/basic.css b/css/basic.css index 50c90c1..f0518a9 100644 --- a/css/basic.css +++ b/css/basic.css @@ -20,8 +20,9 @@ body { padding: 0; } body { - font: normal 100%/1.4 Frutiger, Calibri, Myriad, "Nimbus Sans L", Geneva, "Helvetica Neue", Helvetica, Arial, sans-serif; + font: normal 100%/1.4 Frutiger, Calibri, "Myriad Pro", Myriad, "Nimbus Sans L", Geneva, "Helvetica Neue", Helvetica, Arial, sans-serif; /* default font size: 100% => 16px; 93.75% => 15px; 87.5% => 14px; 81.25% => 13px; 75% => 12px */ + -webkit-text-size-adjust: 100%; } @@ -32,9 +33,7 @@ h2, h3, h4, h5, -h6, -caption, -legend { +h6 { font-family: Constantia, Utopia, Lucidabright, Lucida, Georgia, "Nimbus Roman No9 L", serif; font-weight: bold; color: __text_neu__; @@ -48,9 +47,7 @@ legend { [dir=rtl] h3, [dir=rtl] h4, [dir=rtl] h5, -[dir=rtl] h6, -[dir=rtl] caption, -[dir=rtl] legend { +[dir=rtl] h6 { clear: right; } @@ -80,6 +77,17 @@ h6 { } /* bottom margin = 1 / font-size */ +caption, +figcaption, +summary, +legend { + font-style: italic; + font-weight: normal; + line-height: 1.2; + padding: 0; + margin: 0 0 .35em; +} + /*____________ basic margins and paddings ____________*/ @@ -91,6 +99,8 @@ pre, table, hr, blockquote, +figure, +details, fieldset, address { margin: 0 0 1.4em 0; /* bottom margin = line-height */ @@ -175,7 +185,6 @@ table { caption { caption-side: top; text-align: left; - margin: 0 0 .3em; } [dir=rtl] caption { text-align: right; @@ -187,16 +196,15 @@ td { margin: 0; vertical-align: top; border: 1px solid __border__; - text-align: left; -} -[dir=rtl] td, -[dir=rtl] th { - text-align: right; } th { font-weight: bold; background-color: __background_alt__; color: inherit; + text-align: left; +} +[dir=rtl] th { + text-align: right; } @@ -239,10 +247,19 @@ img { } img, -object { +object, +embed, +iframe, +video, +audio { max-width: 100%; } +iframe { + border-width: 0; + background-color: inherit; +} + /* IE8 and below won't display the images otherwise */ button img { max-width: none; @@ -259,15 +276,23 @@ hr { acronym, abbr { + font-style: normal; +} +acronym[title], +abbr[title] { cursor: help; border-bottom: 1px dotted; - font-style: normal; } em acronym, em abbr { font-style: italic; } +mark { + background: __highlight__; + color: inherit; +} + pre, code, samp, @@ -312,6 +337,10 @@ sup { vertical-align: super; } +small { + font-size: .8em; +} + /*____________ forms ____________*/ form { @@ -321,11 +350,14 @@ form { } fieldset { - padding: 1em 1em 0; - border: 1px solid __text_alt__; + padding: .7em 1em 0; + padding: .7rem 1rem; /* for those browsers understanding :last-child */ + border: 1px solid #999; +} +fieldset > :last-child { + margin-bottom: 0; } legend { - margin: 0; padding: 0 .1em; } @@ -339,30 +371,44 @@ textarea, button, select, optgroup, -option { +option, +keygen, +output, +meter, +progress { font: inherit; color: inherit; /* background-color destroys button look */ - line-height: 1; + line-height: normal; margin: 0; vertical-align: middle; + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; + box-sizing: content-box; } -input[type=text], -input[type=password], +input, +button, +select, +keygen, textarea { padding: .1em; } input[type=radio], input[type=checkbox], +input[type=image], input.check { padding: 0; } input[type=submit], +input[type=button], +input[type=reset], input.button, button { cursor: pointer; + overflow: visible; + padding: .1em .4em; } #IE6 .dokuwiki input.button, #IE6 .dokuwiki button, @@ -378,6 +424,20 @@ button[readonly] { cursor: auto; } +input:focus, +button:focus, +select:focus, +keygen:focus, +textarea:focus { + box-shadow: 0 0 5px #999; + outline: 0; +} +input::-moz-focus-inner, +button::-moz-focus-inner { + border: 0; + padding: 0; +} + optgroup { font-style: italic; font-weight: bold; diff --git a/css/print.css b/css/print.css index 668f7d4..33b5914 100644 --- a/css/print.css +++ b/css/print.css @@ -5,55 +5,64 @@ */ body { - /* - font: normal 12pt/1.2 serif; - color: #000; + font: normal 87.5%/1.3 Garamond, Baskerville, "Hoefler Text", "Nimbus Roman No9 L", serif; background-color: #fff; - */ + color: #000; } /* hide certain sections */ .a11y, -div.notify, div.info, div.success, div.error, -#dokuwiki__header .tools, #dokuwiki__aside, -.dokuwiki .breadcrumbs, .dokuwiki .toc, #dw__toc, .dokuwiki .secedit, -#dokuwiki__pagetools, #dokuwiki__footer { +audio, +video, +div.notify, +div.info, +div.success, +div.error, +#dokuwiki__header .tools, +#dokuwiki__aside, +.dokuwiki .breadcrumbs, +.dokuwiki .toc, +#dw__toc, +.dokuwiki .secedit, +#dokuwiki__pagetools, +#dokuwiki__footer { display: none; } -.dokuwiki h1, -.dokuwiki h2, -.dokuwiki h3, -.dokuwiki h4, -.dokuwiki h5, -.dokuwiki caption, -.dokuwiki legend { +h1, +h2, +h3, +h4, +h5, +caption, +legend { clear: both; } -.dokuwiki ul { +ul { list-style: disc outside; } -.dokuwiki ol { +ol { list-style: decimal outside; } -.dokuwiki ol ol { +ol ol { list-style-type: lower-alpha; } -.dokuwiki ol ol ol { +ol ol ol { list-style-type: upper-roman; } -.dokuwiki ol ol ol ol { +ol ol ol ol { list-style-type: upper-alpha; } -.dokuwiki ol ol ol ol ol { +ol ol ol ol ol { list-style-type: lower-roman; } /* undo icons */ -.dokuwiki a:link, -.dokuwiki a:visited { - text-decoration: underline; +a:link, +a:visited { + text-decoration: none; + border-bottom: 1pt dotted; color: #333; background-color: inherit; background-image: none; @@ -69,52 +78,56 @@ a.mail:after { } /* code blocks */ -.dokuwiki pre { +pre { font-family: monospace; } -.dokuwiki dl.code dt, -.dokuwiki dl.file dt { +dl.code dt, +dl.file dt { font-weight: bold; } /* images */ -.dokuwiki img { +img { border-width: 0; vertical-align: middle; } -.dokuwiki img.media { +img.media { margin: .2em 0; } -.dokuwiki img.medialeft { +img.medialeft { margin: .2em 1.5em .2em 0; } -.dokuwiki img.mediaright { +img.mediaright { margin: .2em 0 .2em 1.5em; } -.dokuwiki img.mediacenter { +img.mediacenter { margin: .2em auto; } /* align table cells */ -.dokuwiki .leftalign { +.leftalign { text-align: left; } -.dokuwiki .centeralign { +.centeralign { text-align: center; } -.dokuwiki .rightalign { +.rightalign { text-align: right; } /* underline */ -.dokuwiki em.u { +em.u { font-style: normal; text-decoration: underline; } -.dokuwiki em em.u { +em em.u { font-style: italic; } +mark { + font-weight: bold; +} + div.clearer { clear: both; line-height: 0; @@ -122,36 +135,36 @@ div.clearer { overflow: hidden; } -.dokuwiki blockquote { +blockquote { padding: 0 10pt; margin: 0; border: solid #ccc; border-width: 0 0 0 2pt; } -[dir=rtl] .dokuwiki blockquote { +[dir=rtl] blockquote { border-width: 0 2pt 0 0; } /* tables */ -.dokuwiki table { +table { border-collapse: collapse; empty-cells: show; border-spacing: 0; border: 1pt solid #ccc; } -.dokuwiki th, -.dokuwiki td { +th, +td { padding: 3pt 5pt; margin: 0; vertical-align: top; border: 1pt solid #666; text-align: left; } -[dir=rtl] .dokuwiki th, -[dir=rtl] .dokuwiki td { +[dir=rtl] th, +[dir=rtl] td { text-align: right; } -.dokuwiki th { +th { font-weight: bold; } From 494e7710479453b298eb4858db4a4cd48a93b6ff Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Mon, 11 Mar 2013 00:58:15 +0000 Subject: [PATCH 04/20] marked deprecated parts in print styles --- css/print.css | 73 ++++++++++++++++++++++++++++----------------------- 1 file changed, 40 insertions(+), 33 deletions(-) diff --git a/css/print.css b/css/print.css index 33b5914..001d1a0 100644 --- a/css/print.css +++ b/css/print.css @@ -11,19 +11,13 @@ body { } /* hide certain sections */ -.a11y, audio, video, -div.notify, -div.info, -div.success, -div.error, #dokuwiki__header .tools, #dokuwiki__aside, .dokuwiki .breadcrumbs, .dokuwiki .toc, #dw__toc, -.dokuwiki .secedit, #dokuwiki__pagetools, #dokuwiki__footer { display: none; @@ -104,37 +98,10 @@ img.mediacenter { margin: .2em auto; } -/* align table cells */ -.leftalign { - text-align: left; -} -.centeralign { - text-align: center; -} -.rightalign { - text-align: right; -} - -/* underline */ -em.u { - font-style: normal; - text-decoration: underline; -} -em em.u { - font-style: italic; -} - mark { font-weight: bold; } -div.clearer { - clear: both; - line-height: 0; - height: 0; - overflow: hidden; -} - blockquote { padding: 0 10pt; margin: 0; @@ -185,3 +152,43 @@ th { border-top: 1pt solid #000; margin-top: 10pt; } + + +/*____________ @deprecated ____________*/ +/* unnecessary, has been in lib/styles/all|print.css since Rincewind */ + +.a11y, +div.notify, +div.info, +div.success, +div.error, +.dokuwiki .secedit { + display: none; +} + +/* align table cells */ +.leftalign { + text-align: left; +} +.centeralign { + text-align: center; +} +.rightalign { + text-align: right; +} + +/* underline */ +em.u { + font-style: normal; + text-decoration: underline; +} +em em.u { + font-style: italic; +} + +div.clearer { + clear: both; + line-height: 0; + height: 0; + overflow: hidden; +} From c73a278835f15f52ac4c3cc79b57c5a3590a1c4b Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Mon, 11 Mar 2013 01:01:02 +0000 Subject: [PATCH 05/20] added possibility to disable sidebar (closes #4) --- css/structure.css | 8 ++++---- main.php | 16 +++++++++------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/css/structure.css b/css/structure.css index 220fca0..61e4679 100644 --- a/css/structure.css +++ b/css/structure.css @@ -71,20 +71,20 @@ body { } /* make content wider when there's no sidebar */ - .mode_show #dokuwiki__content { + .hasSidebar.mode_show #dokuwiki__content { float: right; margin-left: -__sidebar_width__; width: 100%; } - [dir=rtl] .mode_show #dokuwiki__content { + [dir=rtl] .hasSidebar.mode_show #dokuwiki__content { float: left; margin-left: 0; margin-right: -__sidebar_width__; } - .mode_show #dokuwiki__content > .pad { + .hasSidebar.mode_show #dokuwiki__content > .pad { margin-left: __sidebar_width__; } - [dir=rtl] .mode_show #dokuwiki__content > .pad { + [dir=rtl] .hasSidebar.mode_show #dokuwiki__content > .pad { margin-left: 0; margin-right: __sidebar_width__; } diff --git a/main.php b/main.php index 0b04d81..7171383 100644 --- a/main.php +++ b/main.php @@ -35,7 +35,7 @@ $showTools = !tpl_getConf('hideTools') || ( tpl_getConf('hideTools') && $_SERVER see http://www.dokuwiki.org/devel:action_modes for a list of action modes */ ?>
+ class="dokuwiki site mode_ "> @@ -112,12 +112,14 @@ $showTools = !tpl_getConf('hideTools') || ( tpl_getConf('hideTools') && $_SERVER
-
- - - -
-
+ +
+ + + +
+
+
From 9946700f9ceb8e8f5139b0f10aafdd08ca886ed3 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Mon, 11 Mar 2013 01:03:23 +0000 Subject: [PATCH 06/20] version 2013-03-11 --- template.info.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template.info.txt b/template.info.txt index 42eac50..83c6f19 100644 --- a/template.info.txt +++ b/template.info.txt @@ -1,7 +1,7 @@ base starter author Anika Henke email anika@selfthinker.org -date 2012-10-13 +date 2013-03-11 name Starter Template desc The template that gets you started url http://www.dokuwiki.org/template:starter From 76cda855755d9cb9326adb9c766e54f77e85fe8b Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 31 Mar 2013 20:00:52 +0100 Subject: [PATCH 07/20] made sidebar inclusion more similar to core (hide it under more circumstances) --- css/mobile.css | 8 ++++---- css/structure.css | 14 +++++--------- main.php | 5 +++-- 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/css/mobile.css b/css/mobile.css index a86fffd..264bbf6 100644 --- a/css/mobile.css +++ b/css/mobile.css @@ -6,7 +6,7 @@ @media only screen and (max-width: 42em) { -.mode_show #dokuwiki__aside { +#dokuwiki__aside { width: 100%; float: none; margin-bottom: 1.4em; @@ -15,15 +15,15 @@ margin: 0; } -.mode_show #dokuwiki__content { +.hasSidebar #dokuwiki__content { float: none; margin-left: 0; margin-right: 0; } -.mode_show #dokuwiki__content > .pad { +.hasSidebar #dokuwiki__content > .pad { margin-left: 0; } -[dir=rtl] .mode_show #dokuwiki__content > .pad { +[dir=rtl] .hasSidebar #dokuwiki__content > .pad { margin-right: 0; } diff --git a/css/structure.css b/css/structure.css index 61e4679..468a9d9 100644 --- a/css/structure.css +++ b/css/structure.css @@ -50,17 +50,13 @@ body { height: 1%; } - /* show sidebar only in show mode */ #dokuwiki__aside { - display: none; - } - .mode_show #dokuwiki__aside { width: __sidebar_width__; float: left; position: relative; display: block; } - [dir=rtl] .mode_show #dokuwiki__aside { + [dir=rtl] #dokuwiki__aside { float: right; } #dokuwiki__aside > .pad { @@ -71,20 +67,20 @@ body { } /* make content wider when there's no sidebar */ - .hasSidebar.mode_show #dokuwiki__content { + .hasSidebar #dokuwiki__content { float: right; margin-left: -__sidebar_width__; width: 100%; } - [dir=rtl] .hasSidebar.mode_show #dokuwiki__content { + [dir=rtl] .hasSidebar #dokuwiki__content { float: left; margin-left: 0; margin-right: -__sidebar_width__; } - .hasSidebar.mode_show #dokuwiki__content > .pad { + .hasSidebar #dokuwiki__content > .pad { margin-left: __sidebar_width__; } - [dir=rtl] .hasSidebar.mode_show #dokuwiki__content > .pad { + [dir=rtl] .hasSidebar #dokuwiki__content > .pad { margin-left: 0; margin-right: __sidebar_width__; } diff --git a/main.php b/main.php index 7171383..4e68073 100644 --- a/main.php +++ b/main.php @@ -11,6 +11,7 @@ if (!defined('DOKU_INC')) die(); /* must be run from within DokuWiki */ @require_once(dirname(__FILE__).'/tpl_functions.php'); /* include hook for template functions */ $showTools = !tpl_getConf('hideTools') || ( tpl_getConf('hideTools') && $_SERVER['REMOTE_USER'] ); +$showSidebar = page_findnearest($conf['sidebar']) && ($ACT=='show'); ?> @@ -35,7 +36,7 @@ $showTools = !tpl_getConf('hideTools') || ( tpl_getConf('hideTools') && $_SERVER see http://www.dokuwiki.org/devel:action_modes for a list of action modes */ ?>
+ class="dokuwiki site mode_ "> @@ -112,7 +113,7 @@ $showTools = !tpl_getConf('hideTools') || ( tpl_getConf('hideTools') && $_SERVER
- +
From 49a8b9b2b54f2b019fbd8a4553f03f3762c5c758 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Mon, 1 Apr 2013 21:42:19 +0100 Subject: [PATCH 08/20] version 2013-04-01 --- template.info.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template.info.txt b/template.info.txt index 83c6f19..0c4f02c 100644 --- a/template.info.txt +++ b/template.info.txt @@ -1,7 +1,7 @@ base starter author Anika Henke email anika@selfthinker.org -date 2013-03-11 +date 2013-04-01 name Starter Template desc The template that gets you started url http://www.dokuwiki.org/template:starter From 245aab3112ae8e1409b2741d64841a76dae1423c Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 1 Jun 2013 23:44:00 +0100 Subject: [PATCH 09/20] moved X-UA-Compatible from meta tag to be sent by http header instead --- detail.php | 2 +- main.php | 2 +- mediamanager.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/detail.php b/detail.php index 8c2c844..296d4b6 100644 --- a/detail.php +++ b/detail.php @@ -10,13 +10,13 @@ // must be run from within DokuWiki if (!defined('DOKU_INC')) die(); @require_once(dirname(__FILE__).'/tpl_functions.php'); /* include hook for template functions */ +header('X-UA-Compatible: IE=edge,chrome=1'); ?> - <?php echo hsc(tpl_img_getTag('IPTC.Headline',$IMG))?> [<?php echo strip_tags($conf['title'])?>] diff --git a/main.php b/main.php index 4e68073..ffef2e6 100644 --- a/main.php +++ b/main.php @@ -9,6 +9,7 @@ if (!defined('DOKU_INC')) die(); /* must be run from within DokuWiki */ @require_once(dirname(__FILE__).'/tpl_functions.php'); /* include hook for template functions */ +header('X-UA-Compatible: IE=edge,chrome=1'); $showTools = !tpl_getConf('hideTools') || ( tpl_getConf('hideTools') && $_SERVER['REMOTE_USER'] ); $showSidebar = page_findnearest($conf['sidebar']) && ($ACT=='show'); @@ -17,7 +18,6 @@ $showSidebar = page_findnearest($conf['sidebar']) && ($ACT=='show'); lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>" class="no-js"> <head> <meta charset="UTF-8" /> - <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /><![endif]--> <title><?php tpl_pagetitle() ?> [<?php echo strip_tags($conf['title']) ?>] diff --git a/mediamanager.php b/mediamanager.php index eb62515..42a0740 100644 --- a/mediamanager.php +++ b/mediamanager.php @@ -8,13 +8,13 @@ // must be run from within DokuWiki if (!defined('DOKU_INC')) die(); @require_once(dirname(__FILE__).'/tpl_functions.php'); /* include hook for template functions */ +header('X-UA-Compatible: IE=edge,chrome=1'); ?> - <?php echo hsc($lang['mediaselect'])?> [<?php echo strip_tags($conf['title'])?>] From aae6252e1595ff4f337abd5cd1a68ad4c5ca4a63 Mon Sep 17 00:00:00 2001 From: Anika Henke <anika@selfthinker.org> Date: Tue, 16 Jul 2013 09:54:03 +0100 Subject: [PATCH 10/20] removed IE6-specific code --- css/basic.css | 4 ++-- css/design.css | 13 ------------- css/structure.css | 8 -------- detail.php | 4 ++-- main.php | 6 +++--- mediamanager.php | 4 ++-- 6 files changed, 9 insertions(+), 30 deletions(-) diff --git a/css/basic.css b/css/basic.css index f0518a9..89449ea 100644 --- a/css/basic.css +++ b/css/basic.css @@ -261,6 +261,8 @@ iframe { } /* IE8 and below won't display the images otherwise */ +#IE7 img, +#IE8 img, button img { max-width: none; } @@ -410,8 +412,6 @@ button { overflow: visible; padding: .1em .4em; } -#IE6 .dokuwiki input.button, -#IE6 .dokuwiki button, #IE7 .dokuwiki input.button, #IE7 .dokuwiki button { line-height: 1.4; diff --git a/css/design.css b/css/design.css index 7619034..4d7dff3 100644 --- a/css/design.css +++ b/css/design.css @@ -120,9 +120,6 @@ max-width: __site_width__; padding: 0 1em; } -#IE6 #dokuwiki__usertools ul { - width: 100%; -} #dokuwiki__usertools ul li.user { float: left; margin-left: 0; @@ -143,9 +140,6 @@ width: 100%; z-index: 10; } -#IE6 #dokuwiki__content { - margin-bottom: 1.4em; -} #dokuwiki__pagetools ul li { display: inline; margin: 0 1.5em 0 0; @@ -156,17 +150,14 @@ [dir=rtl] #dokuwiki__pagetools ul li a.action.top { float: left; } -#IE6 #dokuwiki__pagetools ul, #IE7 #dokuwiki__pagetools ul { position: relative; } -#IE6 #dokuwiki__pagetools ul li a.action.top, #IE7 #dokuwiki__pagetools ul li a.action.top { position: absolute; top: 0; right: 0; } -[dir=rtl] #IE6 #dokuwiki__pagetools ul li a.action.top, [dir=rtl] #IE7 #dokuwiki__pagetools ul li a.action.top { right: auto; left: 0; @@ -251,14 +242,10 @@ .dokuwiki .wrapper { margin-bottom: 2.8em; } -#IE6 .dokuwiki .wrapper { - margin-bottom: 1.4em; -} #dokuwiki__footer { margin-bottom: 1em; } -#IE6 #dokuwiki__footer, #IE7 #dokuwiki__footer { height: 1%; } diff --git a/css/structure.css b/css/structure.css index 468a9d9..c2907cd 100644 --- a/css/structure.css +++ b/css/structure.css @@ -26,9 +26,6 @@ body { float: right; } - #IE6 #dokuwiki__header .headings { - width: 50%; - } #dokuwiki__header .tools { float: right; text-align: right; @@ -38,14 +35,9 @@ body { text-align: left; } - #IE6 #dokuwiki__header .tools { - width: 50%; - } - #dokuwiki__site .wrapper { position: relative; } -#IE6 #dokuwiki__site .wrapper, #IE7 #dokuwiki__site .wrapper { height: 1%; } diff --git a/detail.php b/detail.php index 296d4b6..48a8fe6 100644 --- a/detail.php +++ b/detail.php @@ -29,7 +29,7 @@ header('X-UA-Compatible: IE=edge,chrome=1'); </head> <body> - <!--[if IE 6 ]><div id="IE6"><![endif]--><!--[if IE 7 ]><div id="IE7"><![endif]--><!--[if IE 8 ]><div id="IE8"><![endif]--> + <!--[if lte IE 7 ]><div id="IE7"><![endif]--><!--[if IE 8 ]><div id="IE8"><![endif]--> <div id="dokuwiki__detail" class="dokuwiki"> <?php html_msgarea() ?> @@ -92,7 +92,7 @@ header('X-UA-Compatible: IE=edge,chrome=1'); <?php } ?> </div> - <!--[if ( IE 6 | IE 7 | IE 8 ) ]></div><![endif]--> + <!--[if ( lte IE 7 | IE 8 ) ]></div><![endif]--> </body> </html> diff --git a/main.php b/main.php index ffef2e6..807057d 100644 --- a/main.php +++ b/main.php @@ -28,8 +28,8 @@ $showSidebar = page_findnearest($conf['sidebar']) && ($ACT=='show'); <body> <?php /* with these Conditional Comments you can better address IE issues in CSS files, - precede CSS rules by #IE6 for IE6, #IE7 for IE7 and #IE8 for IE8 (div closes at the bottom) */ ?> - <!--[if IE 6 ]><div id="IE6"><![endif]--><!--[if IE 7 ]><div id="IE7"><![endif]--><!--[if IE 8 ]><div id="IE8"><![endif]--> + precede CSS rules by #IE7 for IE7 and #IE8 for IE8 (div closes at the bottom) */ ?> + <!--[if lte IE 7 ]><div id="IE7"><![endif]--><!--[if IE 8 ]><div id="IE8"><![endif]--> <?php /* the "dokuwiki__top" id is needed somewhere at the top, because that's where the "back to top" button/link links to */ ?> <?php /* classes mode_<action> are added to make it possible to e.g. style a page differently if it's in edit mode, @@ -170,6 +170,6 @@ $showSidebar = page_findnearest($conf['sidebar']) && ($ACT=='show'); </div></div><!-- /site --> <div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div> - <!--[if ( IE 6 | IE 7 | IE 8 ) ]></div><![endif]--> + <!--[if ( lte IE 7 | IE 8 ) ]></div><![endif]--> </body> </html> diff --git a/mediamanager.php b/mediamanager.php index 42a0740..c4e68f1 100644 --- a/mediamanager.php +++ b/mediamanager.php @@ -27,7 +27,7 @@ header('X-UA-Compatible: IE=edge,chrome=1'); </head> <body> - <!--[if IE 6 ]><div id="IE6"><![endif]--><!--[if IE 7 ]><div id="IE7"><![endif]--><!--[if IE 8 ]><div id="IE8"><![endif]--> + <!--[if lte IE 7 ]><div id="IE7"><![endif]--><!--[if IE 8 ]><div id="IE8"><![endif]--> <div id="media__manager" class="dokuwiki"> <?php html_msgarea() ?> <div id="mediamgr__aside"><div class="pad"> @@ -43,6 +43,6 @@ header('X-UA-Compatible: IE=edge,chrome=1'); <?php tpl_mediaContent() ?> </div></div> </div> - <!--[if ( IE 6 | IE 7 | IE 8 ) ]></div><![endif]--> + <!--[if ( lte IE 7 | IE 8 ) ]></div><![endif]--> </body> </html> From 6bbe2c80c5ae297e822455a64318f4dbc5cadd7c Mon Sep 17 00:00:00 2001 From: Anika Henke <anika@selfthinker.org> Date: Sun, 28 Jul 2013 13:49:51 +0100 Subject: [PATCH 11/20] fixed typo in commented section indenting css --- css/content.css | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/css/content.css b/css/content.css index cd23b62..70b8ba3 100644 --- a/css/content.css +++ b/css/content.css @@ -8,16 +8,16 @@ /*____________ section indenting ____________ -.dokuwiki.page h1 {margin-left: 0;} -.dokuwiki.page h2 {margin-left: .666em;} -.dokuwiki.page h3 {margin-left: 1.776em;} -.dokuwiki.page h4 {margin-left: 3em;} -.dokuwiki.page h5 {margin-left: 4.5712em;} -.dokuwiki.page div.level1 {margin-left: 0;} -.dokuwiki.page div.level2 {margin-left: 1em;} -.dokuwiki.page div.level3 {margin-left: 2em;} -.dokuwiki.page div.level4 {margin-left: 3em;} -.dokuwiki.page div.level5 {margin-left: 4em;} +.dokuwiki .page h1 {margin-left: 0;} +.dokuwiki .page h2 {margin-left: .666em;} +.dokuwiki .page h3 {margin-left: 1.776em;} +.dokuwiki .page h4 {margin-left: 3em;} +.dokuwiki .page h5 {margin-left: 4.5712em;} +.dokuwiki .page div.level1 {margin-left: 0;} +.dokuwiki .page div.level2 {margin-left: 1em;} +.dokuwiki .page div.level3 {margin-left: 2em;} +.dokuwiki .page div.level4 {margin-left: 3em;} +.dokuwiki .page div.level5 {margin-left: 4em;} [dir=rtl] .dokuwiki .page h1 {margin-left: 0; margin-right: 0;} [dir=rtl] .dokuwiki .page h2 {margin-left: 0; margin-right: .666em;} From 54b7d19a6b379aa1093fa28ea2570754666776a5 Mon Sep 17 00:00:00 2001 From: Anika Henke <anika@selfthinker.org> Date: Sun, 11 Aug 2013 21:21:18 +0100 Subject: [PATCH 12/20] made sidebar inclusion backwards compatible (fixes #6) --- tpl_functions.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tpl_functions.php b/tpl_functions.php index 6d49f97..dcbcfaf 100644 --- a/tpl_functions.php +++ b/tpl_functions.php @@ -243,3 +243,13 @@ if (!function_exists('tpl_incdir')) { return DOKU_INC.'lib/tpl/'.$conf['template'].'/'; } } + +/** + * does *not* emulate the core function, but returns only + * if sidebar is set to make it roughly backwards compatible + */ +if (!function_exists('page_findnearest')) { + function page_findnearest($sidebar){ + return $sidebar; + } +} From b93aee0b422e4d2d3689c6be206d5ed983be36fe Mon Sep 17 00:00:00 2001 From: Anika Henke <anika@selfthinker.org> Date: Sun, 11 Aug 2013 22:16:24 +0100 Subject: [PATCH 13/20] synced small CSS changes from core --- css/_forms.css | 4 ++++ css/basic.css | 3 +++ 2 files changed, 7 insertions(+) diff --git a/css/_forms.css b/css/_forms.css index 6744750..e73601c 100644 --- a/css/_forms.css +++ b/css/_forms.css @@ -79,6 +79,10 @@ #dw__register fieldset { padding-bottom: 0.7em; } +#dw__profiledelete { + display: block; + margin-top: 2.8em; +} /** diff --git a/css/basic.css b/css/basic.css index 89449ea..6554cb6 100644 --- a/css/basic.css +++ b/css/basic.css @@ -438,6 +438,9 @@ button::-moz-focus-inner { padding: 0; } +select { + max-width: 100%; +} optgroup { font-style: italic; font-weight: bold; From 9082afe90a921cf9ae048569413a42e605fb99dc Mon Sep 17 00:00:00 2001 From: Anika Henke <anika@selfthinker.org> Date: Sun, 11 Aug 2013 22:19:55 +0100 Subject: [PATCH 14/20] added tpl_classes() function --- detail.php | 2 +- main.php | 9 ++++----- mediamanager.php | 2 +- tpl_functions.php | 19 +++++++++++++++++++ 4 files changed, 25 insertions(+), 7 deletions(-) diff --git a/detail.php b/detail.php index 48a8fe6..1b73057 100644 --- a/detail.php +++ b/detail.php @@ -30,7 +30,7 @@ header('X-UA-Compatible: IE=edge,chrome=1'); <body> <!--[if lte IE 7 ]><div id="IE7"><![endif]--><!--[if IE 8 ]><div id="IE8"><![endif]--> - <div id="dokuwiki__detail" class="dokuwiki"> + <div id="dokuwiki__detail" class="<?php echo tpl_classes(); ?>"> <?php html_msgarea() ?> <?php if($ERROR){ print $ERROR; }else{ ?> diff --git a/main.php b/main.php index 807057d..909f701 100644 --- a/main.php +++ b/main.php @@ -32,11 +32,10 @@ $showSidebar = page_findnearest($conf['sidebar']) && ($ACT=='show'); <!--[if lte IE 7 ]><div id="IE7"><![endif]--><!--[if IE 8 ]><div id="IE8"><![endif]--> <?php /* the "dokuwiki__top" id is needed somewhere at the top, because that's where the "back to top" button/link links to */ ?> - <?php /* classes mode_<action> are added to make it possible to e.g. style a page differently if it's in edit mode, - see http://www.dokuwiki.org/devel:action_modes for a list of action modes */ ?> - <?php /* .dokuwiki should always be in one of the surrounding elements (e.g. plugins and templates depend on it) */ ?> - <div id="dokuwiki__site"><div id="dokuwiki__top" - class="dokuwiki site mode_<?php echo $ACT ?> <?php echo ($showSidebar) ? 'hasSidebar' : '' ?>"> + <?php /* tpl_classes() provides useful CSS classes; if you choose not to use it, the 'dokuwiki' class at least + should always be in one of the surrounding elements (e.g. plugins and templates depend on it) */ ?> + <div id="dokuwiki__site"><div id="dokuwiki__top" class="site <?php echo tpl_classes(); ?> <?php + echo ($showSidebar) ? 'hasSidebar' : ''; ?>"> <?php html_msgarea() /* occasional error and info messages on top of the page */ ?> <?php tpl_includeFile('header.html') ?> diff --git a/mediamanager.php b/mediamanager.php index c4e68f1..5af6205 100644 --- a/mediamanager.php +++ b/mediamanager.php @@ -28,7 +28,7 @@ header('X-UA-Compatible: IE=edge,chrome=1'); <body> <!--[if lte IE 7 ]><div id="IE7"><![endif]--><!--[if IE 8 ]><div id="IE8"><![endif]--> - <div id="media__manager" class="dokuwiki"> + <div id="media__manager" class="<?php echo tpl_classes(); ?>"> <?php html_msgarea() ?> <div id="mediamgr__aside"><div class="pad"> <h1><?php echo hsc($lang['mediaselect'])?></h1> diff --git a/tpl_functions.php b/tpl_functions.php index dcbcfaf..2869e47 100644 --- a/tpl_functions.php +++ b/tpl_functions.php @@ -247,9 +247,28 @@ if (!function_exists('tpl_incdir')) { /** * does *not* emulate the core function, but returns only * if sidebar is set to make it roughly backwards compatible + * (available since Adora Belle) */ if (!function_exists('page_findnearest')) { function page_findnearest($sidebar){ return $sidebar; } } + +/** + * copied from core (will be available in autumn 2013 release) + */ +if (!function_exists('tpl_classes')) { + function tpl_classes() { + global $ACT, $conf, $ID, $INFO; + $classes = array( + 'dokuwiki', + 'mode_'.$ACT, + 'tpl_'.$conf['template'], + $_SERVER['REMOTE_USER'] ? 'loggedIn' : '', + $INFO['exists'] ? '' : 'notFound', + ($ID == $conf['start']) ? 'home' : '', + ); + return join(' ', $classes); + } +} From f43ba7f15c824429d89704919c3c58095910fb77 Mon Sep 17 00:00:00 2001 From: Anika Henke <anika@selfthinker.org> Date: Mon, 11 Nov 2013 11:58:51 +0000 Subject: [PATCH 15/20] updated documentation in style.ini --- style.ini | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/style.ini b/style.ini index 5fa6ce7..e6dc2ca 100644 --- a/style.ini +++ b/style.ini @@ -2,13 +2,17 @@ ; for limitations of the ini format used here ; To extend this file or make changes to it, it is recommended to create -; a style.local.ini file to prevent losing any changes after an upgrade. +; a local conf/tpl/<template-folder-name>/style.ini file to prevent losing +; any changes after an upgrade. ; Please don't forget to copy the section your changes should be under ; (i.e. [stylesheets] or [replacements]) into that file as well. ; 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. +; You can reference CSS and LESS files here. Files referenced here will +; be checked for updates when considering a cache rebuild while files +; included through LESS' @import statements are not [stylesheets] @@ -40,6 +44,8 @@ css/print.css = print ; This section is used to configure some placeholder values used in ; the stylesheets. Changing this file is the simplest method to ; give your wiki a new look. +; Placeholders defined here will also be made available as LESS variables +; (with surrounding underscores removed, and the prefix @ini_ added) [replacements] @@ -47,26 +53,26 @@ css/print.css = print ;------ guaranteed dokuwiki color placeholders that every plugin can use ; main text and background colors -__text__ = "#333" -__background__ = "#fff" +__text__ = "#333" ; @ini_text +__background__ = "#fff" ; @ini_background ; alternative text and background colors -__text_alt__ = "#999" -__background_alt__ = "#eee" +__text_alt__ = "#999" ; @ini_text_alt +__background_alt__ = "#eee" ; @ini_background_alt ; neutral text and background colors -__text_neu__ = "#666" -__background_neu__ = "#ddd" +__text_neu__ = "#666" ; @ini_text_neu +__background_neu__ = "#ddd" ; @ini_background_neu ; border color -__border__ = "#ccc" +__border__ = "#ccc" ; @ini_border ; highlighted text (e.g. search snippets) -__highlight__ = "#ff9" +__highlight__ = "#ff9" ; @ini_highlight ;-------------------------------------------------------------------------- ; these are used for links -__existing__ = "#090" -__missing__ = "#f30" +__existing__ = "#090" ; @ini_existing +__missing__ = "#f30" ; @ini_missing ; widths -__site_width__ = "64em" -__sidebar_width__ = "16em" +__site_width__ = "64em" ; @ini_site_width +__sidebar_width__ = "16em" ; @ini_sidebar_width From cdfbeeb1d26dd948b880ad72f8842dab9cd8e8de Mon Sep 17 00:00:00 2001 From: Anika Henke <anika@selfthinker.org> Date: Mon, 11 Nov 2013 12:03:35 +0000 Subject: [PATCH 16/20] prevent php errors for potentially uninitialised var --- main.php | 4 ++-- tpl_functions.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/main.php b/main.php index 909f701..36a5ce2 100644 --- a/main.php +++ b/main.php @@ -11,7 +11,7 @@ if (!defined('DOKU_INC')) die(); /* must be run from within DokuWiki */ @require_once(dirname(__FILE__).'/tpl_functions.php'); /* include hook for template functions */ header('X-UA-Compatible: IE=edge,chrome=1'); -$showTools = !tpl_getConf('hideTools') || ( tpl_getConf('hideTools') && $_SERVER['REMOTE_USER'] ); +$showTools = !tpl_getConf('hideTools') || ( tpl_getConf('hideTools') && !empty($_SERVER['REMOTE_USER']) ); $showSidebar = page_findnearest($conf['sidebar']) && ($ACT=='show'); ?><!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $conf['lang'] ?>" @@ -65,7 +65,7 @@ $showSidebar = page_findnearest($conf['sidebar']) && ($ACT=='show'); <ul> <?php /* the optional second parameter of tpl_action() switches between a link and a button, e.g. a button inside a <li> would be: tpl_action('edit', 0, 'li') */ - if ($_SERVER['REMOTE_USER']) { + if (!empty($_SERVER['REMOTE_USER'])) { echo '<li class="user">'; tpl_userinfo(); /* 'Logged in as ...' */ echo '</li>'; diff --git a/tpl_functions.php b/tpl_functions.php index 2869e47..49f96fe 100644 --- a/tpl_functions.php +++ b/tpl_functions.php @@ -47,7 +47,7 @@ function _tpl_discussion($discussionPage, $title, $backTitle, $link=0, $wrapper= * @author Anika Henke <anika@selfthinker.org> */ function _tpl_userpage($userPage, $title, $link=0, $wrapper=0) { - if (!$_SERVER['REMOTE_USER']) return; + if (empty($_SERVER['REMOTE_USER'])) return; global $conf; $userPage = str_replace('@USER@', $_SERVER['REMOTE_USER'], $userPage); @@ -74,7 +74,7 @@ function _tpl_register($link=0, $wrapper=0) { global $ID; $lang_register = !empty($lang['btn_register']) ? $lang['btn_register'] : $lang['register']; - if ($_SERVER['REMOTE_USER'] || !$conf['useacl'] || !actionOK('register')) return; + if (!empty($_SERVER['REMOTE_USER']) || !$conf['useacl'] || !actionOK('register')) return; if ($wrapper) echo "<$wrapper>"; @@ -265,7 +265,7 @@ if (!function_exists('tpl_classes')) { 'dokuwiki', 'mode_'.$ACT, 'tpl_'.$conf['template'], - $_SERVER['REMOTE_USER'] ? 'loggedIn' : '', + !empty($_SERVER['REMOTE_USER']) ? 'loggedIn' : '', $INFO['exists'] ? '' : 'notFound', ($ID == $conf['start']) ? 'home' : '', ); From e60786350912efd9296de433bfc8aeb409cb6f3a Mon Sep 17 00:00:00 2001 From: Anika Henke <anika@selfthinker.org> Date: Thu, 14 Nov 2013 11:03:50 +0000 Subject: [PATCH 17/20] changed style of `file` slightly to help tell it apart from `code` --- css/_media_popup.css | 1 + css/content.css | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/css/_media_popup.css b/css/_media_popup.css index c776e6b..715fdb8 100644 --- a/css/_media_popup.css +++ b/css/_media_popup.css @@ -154,6 +154,7 @@ html.popup { #media__content a.mediafile { margin-right: 1.5em; font-weight: bold; + cursor: pointer; } [dir=rtl] #media__content a.mediafile { margin-right: 0; diff --git a/css/content.css b/css/content.css index 70b8ba3..be4401b 100644 --- a/css/content.css +++ b/css/content.css @@ -88,10 +88,6 @@ text-decoration: underline; } -/* for code in <file> */ -.dokuwiki pre.file { -} - /* filenames for downloadable file and code blocks */ .dokuwiki dl.code, .dokuwiki dl.file { @@ -121,6 +117,13 @@ margin: 0; } +/* for code in <file> */ +.dokuwiki pre.file, +.dokuwiki dl.file pre, +.dokuwiki dl.file dt { + border-color: __text_neu__; +} + /*____________ media manager ____________*/ From 554591bef7a1c67c1a1e21404670758e527cd57d Mon Sep 17 00:00:00 2001 From: Anika Henke <anika@selfthinker.org> Date: Mon, 18 Nov 2013 00:05:54 +0000 Subject: [PATCH 18/20] added tpl_basedir() function for backwards compatibility --- tpl_functions.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tpl_functions.php b/tpl_functions.php index 49f96fe..a698def 100644 --- a/tpl_functions.php +++ b/tpl_functions.php @@ -244,6 +244,16 @@ if (!function_exists('tpl_incdir')) { } } +/** + * copied from core (available since Adora Belle) + */ +if (!function_exists('tpl_basedir')) { + function tpl_basedir() { + global $conf; + return DOKU_BASE.'lib/tpl/'.$conf['template'].'/'; + } +} + /** * does *not* emulate the core function, but returns only * if sidebar is set to make it roughly backwards compatible From 157cb5bae66760ded60a206bf2353ac2f9f86d4f Mon Sep 17 00:00:00 2001 From: Anika Henke <anika@selfthinker.org> Date: Mon, 18 Nov 2013 00:42:02 +0000 Subject: [PATCH 19/20] added event to all tools menues --- main.php | 46 ++++++++++++++++++--------------- tpl_functions.php | 66 ++++++++++++++++++++++++++++++----------------- 2 files changed, 67 insertions(+), 45 deletions(-) diff --git a/main.php b/main.php index 36a5ce2..e46b9fc 100644 --- a/main.php +++ b/main.php @@ -63,19 +63,23 @@ $showSidebar = page_findnearest($conf['sidebar']) && ($ACT=='show'); <div id="dokuwiki__usertools"> <h3 class="a11y"><?php echo $lang['user_tools'] ?></h3> <ul> - <?php /* the optional second parameter of tpl_action() switches between a link and a button, - e.g. a button inside a <li> would be: tpl_action('edit', 0, 'li') */ + <?php if (!empty($_SERVER['REMOTE_USER'])) { echo '<li class="user">'; tpl_userinfo(); /* 'Logged in as ...' */ echo '</li>'; } - tpl_action('admin', 1, 'li'); - _tpl_action('userpage', 1, 'li'); - tpl_action('profile', 1, 'li'); - tpl_action('register', 1, 'li'); /* DW versions < 2011-02-20 need to use _tpl_action('register', 1, 'li') */ - tpl_action('login', 1, 'li'); ?> + <?php /* the optional second parameter of tpl_action() switches between a link and a button, + e.g. a button inside a <li> would be: tpl_action('edit', 0, 'li') */ + ?> + <?php _tpl_toolsevent('usertools', array( + 'admin' => tpl_action('admin', 1, 'li', 1), + 'userpage' => _tpl_action('userpage', 1, 'li', 1), + 'profile' => tpl_action('profile', 1, 'li', 1), + 'register' => tpl_action('register', 1, 'li', 1), /* DW versions < 2011-02-20 need to use _tpl_action('register', 1, 'li') */ + 'login' => tpl_action('login', 1, 'li', 1), + )); ?> </ul> </div> <?php endif ?> @@ -85,11 +89,11 @@ $showSidebar = page_findnearest($conf['sidebar']) && ($ACT=='show'); <h3 class="a11y"><?php echo $lang['site_tools'] ?></h3> <?php tpl_searchform() ?> <ul> - <?php - tpl_action('recent', 1, 'li'); - tpl_action('media', 1, 'li'); - tpl_action('index', 1, 'li'); - ?> + <?php _tpl_toolsevent('sitetools', array( + 'recent' => tpl_action('recent', 1, 'li', 1), + 'media' => tpl_action('media', 1, 'li', 1), + 'index' => tpl_action('index', 1, 'li', 1), + )); ?> </ul> </div> @@ -145,15 +149,15 @@ $showSidebar = page_findnearest($conf['sidebar']) && ($ACT=='show'); <div id="dokuwiki__pagetools"> <h3 class="a11y"><?php echo $lang['page_tools'] ?></h3> <ul> - <?php - tpl_action('edit', 1, 'li'); - _tpl_action('discussion', 1, 'li'); - tpl_action('revisions', 1, 'li'); - tpl_action('backlink', 1, 'li'); - tpl_action('subscribe', 1, 'li'); - tpl_action('revert', 1, 'li'); - tpl_action('top', 1, 'li'); - ?> + <?php _tpl_toolsevent('pagetools', array( + 'edit' => tpl_action('edit', 1, 'li', 1), + 'discussion'=> _tpl_action('discussion', 1, 'li', 1), + 'revisions' => tpl_action('revisions', 1, 'li', 1), + 'backlink' => tpl_action('backlink', 1, 'li', 1), + 'subscribe' => tpl_action('subscribe', 1, 'li', 1), + 'revert' => tpl_action('revert', 1, 'li', 1), + 'top' => tpl_action('top', 1, 'li', 1), + )); ?> </ul> </div> <?php endif; ?> diff --git a/tpl_functions.php b/tpl_functions.php index a698def..3b13aa5 100644 --- a/tpl_functions.php +++ b/tpl_functions.php @@ -62,30 +62,6 @@ function _tpl_userpage($userPage, $title, $link=0, $wrapper=0) { if ($wrapper) echo "</$wrapper>"; } -/** - * Create link/button to register page - * @deprecated DW versions > 2011-02-20 can use the core function tpl_action('register') - * - * @author Anika Henke <anika@selfthinker.org> - */ -function _tpl_register($link=0, $wrapper=0) { - global $conf; - global $lang; - global $ID; - $lang_register = !empty($lang['btn_register']) ? $lang['btn_register'] : $lang['register']; - - if (!empty($_SERVER['REMOTE_USER']) || !$conf['useacl'] || !actionOK('register')) return; - - if ($wrapper) echo "<$wrapper>"; - - if ($link) - tpl_link(wl($ID, 'do=register'), $lang_register, 'class="action register" rel="nofollow"'); - else - echo html_btn('register', $ID, '', array('do'=>'register'), 'get', 0, $lang_register); - - if ($wrapper) echo "</$wrapper>"; -} - /** * Wrapper around custom template actions * @@ -109,6 +85,24 @@ function _tpl_action($type, $link=0, $wrapper=0) { } } +/** + * Create event for tools menues + * + * @author Anika Henke <anika@selfthinker.org> + */ +function _tpl_toolsevent($toolsname, $items, $view='main') { + $data = array( + 'view' => $view, + 'items' => $items + ); + + $hook = 'TEMPLATE_'.strtoupper($toolsname).'_DISPLAY'; + $evt = new Doku_Event($hook, $data); + if($evt->advise_before()){ + foreach($evt->data['items'] as $k => $html) echo $html; + } + $evt->advise_after(); +} /* fallbacks for things missing in older DokuWiki versions @@ -282,3 +276,27 @@ if (!function_exists('tpl_classes')) { return join(' ', $classes); } } + +/** + * Create link/button to register page + * @deprecated DW versions > 2011-02-20 can use the core function tpl_action('register') + * + * @author Anika Henke <anika@selfthinker.org> + */ +function _tpl_register($link=0, $wrapper=0) { + global $conf; + global $lang; + global $ID; + $lang_register = !empty($lang['btn_register']) ? $lang['btn_register'] : $lang['register']; + + if (!empty($_SERVER['REMOTE_USER']) || !$conf['useacl'] || !actionOK('register')) return; + + if ($wrapper) echo "<$wrapper>"; + + if ($link) + tpl_link(wl($ID, 'do=register'), $lang_register, 'class="action register" rel="nofollow"'); + else + echo html_btn('register', $ID, '', array('do'=>'register'), 'get', 0, $lang_register); + + if ($wrapper) echo "</$wrapper>"; +} From 9bbdd9f8247aaaa5cee910b19066231aa5002af9 Mon Sep 17 00:00:00 2001 From: Anika Henke <anika@selfthinker.org> Date: Mon, 18 Nov 2013 01:15:25 +0000 Subject: [PATCH 20/20] version 2013-11-18 --- template.info.txt | 2 +- tpl_functions.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/template.info.txt b/template.info.txt index 0c4f02c..d766995 100644 --- a/template.info.txt +++ b/template.info.txt @@ -1,7 +1,7 @@ base starter author Anika Henke email anika@selfthinker.org -date 2013-04-01 +date 2013-11-18 name Starter Template desc The template that gets you started url http://www.dokuwiki.org/template:starter diff --git a/tpl_functions.php b/tpl_functions.php index 3b13aa5..d88c958 100644 --- a/tpl_functions.php +++ b/tpl_functions.php @@ -260,7 +260,7 @@ if (!function_exists('page_findnearest')) { } /** - * copied from core (will be available in autumn 2013 release) + * copied from core (available since Binky) */ if (!function_exists('tpl_classes')) { function tpl_classes() {