aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-03-02 00:24:29 -0800
committerfriendica <info@friendica.com>2014-03-02 00:24:29 -0800
commitbf401a5afaca8f96606b22e219bd595646ac9dab (patch)
tree22c4493a364ec2f90d752464a0d57d2441f9f20e
parent1920873c349f697c7c07f8073a2e72f19453474e (diff)
downloadvolse-hubzilla-bf401a5afaca8f96606b22e219bd595646ac9dab.tar.gz
volse-hubzilla-bf401a5afaca8f96606b22e219bd595646ac9dab.tar.bz2
volse-hubzilla-bf401a5afaca8f96606b22e219bd595646ac9dab.zip
allow templates to have multiple styles - this would be a bit like having a schema for a template file. At first you'll think this is insane and overly complicated, you'll just have to wait and see what I'm up to. Then it will start to make sense.
-rwxr-xr-xboot.php6
-rw-r--r--include/comanche.php10
-rw-r--r--version.inc2
-rw-r--r--view/pdl/mod_network.pdl3
4 files changed, 16 insertions, 5 deletions
diff --git a/boot.php b/boot.php
index d080b7774..1c7e5f147 100755
--- a/boot.php
+++ b/boot.php
@@ -1852,7 +1852,11 @@ function construct_page(&$a) {
require_once('include/js_strings.php');
- head_add_css(((x($a->page,'template')) ? $a->page['template'] : 'default' ) . '.css');
+ if(x($a->page,'template_style'))
+ head_add_css($a->page['template_style'] . '.css');
+ else
+ head_add_css(((x($a->page,'template')) ? $a->page['template'] : 'default' ) . '.css');
+
head_add_css('mod_' . $a->module . '.css');
head_add_css(current_theme_url($installing));
diff --git a/include/comanche.php b/include/comanche.php
index 3cf5e72a5..4af081740 100644
--- a/include/comanche.php
+++ b/include/comanche.php
@@ -57,10 +57,16 @@ function comanche_parser(&$a,$s) {
if($cnt)
$a->page['template'] = trim($matches[1]);
+ $cnt = preg_match("/\[template=(.*?)\](.*?)\[\/template\]/ism", $s, $matches);
+ if($cnt) {
+ $a->page['template'] = trim($matches[2]);
+ $a->page['template_style'] = trim($matches[2]) . '_' . $matches[1];
+ }
+
$cnt = preg_match("/\[template\](.*?)\[\/template\]/ism", $s, $matches);
- if($cnt)
+ if($cnt) {
$a->page['template'] = trim($matches[1]);
-
+ }
$cnt = preg_match("/\[theme=(.*?)\](.*?)\[\/theme\]/ism", $s, $matches);
if($cnt) {
diff --git a/version.inc b/version.inc
index 075d00c35..be1090ad2 100644
--- a/version.inc
+++ b/version.inc
@@ -1 +1 @@
-2014-03-01.603
+2014-03-02.604
diff --git a/view/pdl/mod_network.pdl b/view/pdl/mod_network.pdl
index 7624ace01..11cadb5aa 100644
--- a/view/pdl/mod_network.pdl
+++ b/view/pdl/mod_network.pdl
@@ -12,4 +12,5 @@
[region=content]
[widget=affinity][/widget]
$content
-[/region] \ No newline at end of file
+[/region]
+