summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2009-05-21 07:14:05 +0000
committeralecpl <alec@alec.pl>2009-05-21 07:14:05 +0000
commit969f6b4c8b490f57f4b1befb587eae35041cc332 (patch)
tree6d51c8f030f29a94be2a2e1e35c71b79dec8fb2f /program
parent0772a7dee2f4af60e5977b5f133f46d1b24b3eae (diff)
- support plugin templates
Diffstat (limited to 'program')
-rwxr-xr-xprogram/include/rcube_template.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/program/include/rcube_template.php b/program/include/rcube_template.php
index 6ceb9ce2d..a9de54d76 100755
--- a/program/include/rcube_template.php
+++ b/program/include/rcube_template.php
@@ -332,7 +332,12 @@ class rcube_template extends rcube_html_page
private function parse($name = 'main', $exit = true)
{
$skin_path = $this->config['skin_path'];
- $path = "$skin_path/templates/$name.html";
+
+ $temp = explode(".", $name, 2);
+ if (count($temp) > 1) {
+ $path = $this->config['plugins_dir'] . '/' . $temp[0] . '/skins/' . $this->config['skin'] . '/templates/' . $temp[1] . '.html';
+ } else
+ $path = "$skin_path/templates/$name.html";
// read template file
if (($templ = @file_get_contents($path)) === false) {