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.

This commit is contained in:
friendica
2014-03-02 00:24:29 -08:00
parent 1920873c34
commit bf401a5afa
4 changed files with 17 additions and 6 deletions

View File

@@ -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[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) {
$a->page['template'] = trim($matches[1]);
}
$cnt = preg_match("/\[theme=(.*?)\](.*?)\[\/theme\]/ism", $s, $matches);
if($cnt) {