diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-05-27 16:02:16 -0700 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-05-27 16:02:16 -0700 |
commit | 5a889558aaddac325c880ede547eec39493c4fa8 (patch) | |
tree | d48850e794055263291c64da45dd6744b6ff7bf9 /include/comanche.php | |
parent | 3ecc9efd8d22caf3317876ff8d79cffa52f75513 (diff) | |
parent | 33a7f76ebc0ff330d7c4ec28149c8aa3f334b7b7 (diff) | |
download | volse-hubzilla-5a889558aaddac325c880ede547eec39493c4fa8.tar.gz volse-hubzilla-5a889558aaddac325c880ede547eec39493c4fa8.tar.bz2 volse-hubzilla-5a889558aaddac325c880ede547eec39493c4fa8.zip |
Merge https://github.com/redmatrix/redmatrix into pending_merge
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 65f64be5c..cb46985eb 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') { |