summaryrefslogtreecommitdiff
path: root/lib/tpl/dokuwiki/tpl_functions.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2012-02-06 18:16:54 +0100
committerAndreas Gohr <andi@splitbrain.org>2012-02-06 18:16:54 +0100
commit8e86529b279209dd94a08d6c300e3c8c219d7095 (patch)
tree5dbc9663bdd74231b468f91a6aed08f1f41fffe2 /lib/tpl/dokuwiki/tpl_functions.php
parentc7b28ffda48d3e6e225940a74b00ee5011f45b4b (diff)
parent0e336ca8d49c813f535e69d9e727aa58356d5197 (diff)
downloadrpg-8e86529b279209dd94a08d6c300e3c8c219d7095.tar.gz
rpg-8e86529b279209dd94a08d6c300e3c8c219d7095.tar.bz2
Merge remote-tracking branch 'localtemplate/initial_commit_from_starter' into new-template
* localtemplate/initial_commit_from_starter: (159 commits) moved files to template hierarchy for merging with core deleted obsolete files added styles for screen resolutions between 480 and 768px (#26) minor improvements improved minor edits in recent changes increased site width a bit (#45) fixed search input issue caused by previous commit improved search box and action dropdown spacing in mobile view made large tables scrollable (fixes #40) typo added includes for sidebar header and footer (closes #41) and moved page header and footer inside .page div toned down active colour of pagetools a bit (#22) changed link colours (#22) removed outline from links (focus and active states are set differently anyway) added license for pagetool icons remove bold from link to current page inside the main content (closes #31) removed needless relative position on content (fixes #35) initialize variable first attempt to fix media queries on modern smartphones fixed logo size setting. closes #36 ...
Diffstat (limited to 'lib/tpl/dokuwiki/tpl_functions.php')
-rw-r--r--lib/tpl/dokuwiki/tpl_functions.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/lib/tpl/dokuwiki/tpl_functions.php b/lib/tpl/dokuwiki/tpl_functions.php
new file mode 100644
index 000000000..c024f33e7
--- /dev/null
+++ b/lib/tpl/dokuwiki/tpl_functions.php
@@ -0,0 +1,30 @@
+<?php
+/**
+ * Template Functions
+ *
+ * This file provides template specific custom functions that are
+ * not provided by the DokuWiki core.
+ * It is common practice to start each function with an underscore
+ * to make sure it won't interfere with future core functions.
+ */
+
+// must be run from within DokuWiki
+if (!defined('DOKU_INC')) die();
+
+/* @todo: add this function to the core and delete this file */
+
+/**
+ * Include additional html file from conf directory if it exists, otherwise use
+ * file in the template's root directory.
+ *
+ * @author Anika Henke <anika@selfthinker.org>
+ */
+function _tpl_include($fn) {
+ $confFile = DOKU_CONF.$fn;
+ $tplFile = dirname(__FILE__).'/'.$fn;
+
+ if (file_exists($confFile))
+ include($confFile);
+ else if (file_exists($tplFile))
+ include($tplFile);
+}