diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-05-27 19:27:38 -0700 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-05-27 19:27:38 -0700 |
commit | b381ec57346a6d7724b2317c120ce2e6e70edc37 (patch) | |
tree | e2cf66e01a87e438241e5bfac5daf6e7d3046b71 /include/comanche.php | |
parent | 675aa96f222877a5aa543b8409a2c580cf10d3aa (diff) | |
parent | 11301d51a58d04843ba3056b4c9e92d59ced1334 (diff) | |
download | volse-hubzilla-b381ec57346a6d7724b2317c120ce2e6e70edc37.tar.gz volse-hubzilla-b381ec57346a6d7724b2317c120ce2e6e70edc37.tar.bz2 volse-hubzilla-b381ec57346a6d7724b2317c120ce2e6e70edc37.zip |
Merge branch 'master' of https://github.com/redmatrix/redmatrix
Conflicts:
mod/impel.php
Diffstat (limited to 'include/comanche.php')
-rw-r--r-- | include/comanche.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/comanche.php b/include/comanche.php index 826948fa6..57056ae2a 100644 --- a/include/comanche.php +++ b/include/comanche.php @@ -168,6 +168,21 @@ function comanche_block($s, $class = '') { ); if($r) { + //check for eventual menus in the block and parse them + $cnt = preg_match_all("/\[menu\](.*?)\[\/menu\]/ism", $r[0]['body'], $matches, PREG_SET_ORDER); + if($cnt) { + foreach($matches as $mtch) { + $r[0]['body'] = str_replace($mtch[0], comanche_menu(trim($mtch[1])), $r[0]['body']); + } + } + $cnt = preg_match_all("/\[menu=(.*?)\](.*?)\[\/menu\]/ism", $r[0]['body'], $matches, PREG_SET_ORDER); + if($cnt) { + foreach($matches as $mtch) { + $r[0]['body'] = str_replace($mtch[0],comanche_menu(trim($mtch[2]),$mtch[1]),$r[0]['body']); + } + } + + //emit the block $o .= (($var['wrap'] == 'none') ? '' : '<div class="' . $class . '">'); if($r[0]['title'] && trim($r[0]['body']) != '$content') { |