diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-05-24 15:50:05 -0700 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-05-24 15:50:05 -0700 |
commit | 851f2f64df284d4ec410cdf7511b365db9fc5e9b (patch) | |
tree | 81484c475285226961b51240dd071197b7021791 /include/comanche.php | |
parent | 5795e2a58bb4a0702a3d318ec6ac05681d6e5864 (diff) | |
parent | 13546167877322afa274a2540656f525e55d3b48 (diff) | |
download | volse-hubzilla-851f2f64df284d4ec410cdf7511b365db9fc5e9b.tar.gz volse-hubzilla-851f2f64df284d4ec410cdf7511b365db9fc5e9b.tar.bz2 volse-hubzilla-851f2f64df284d4ec410cdf7511b365db9fc5e9b.zip |
Merge branch 'master' of https://github.com/redmatrix/redmatrix
Conflicts:
index.php
mod/setup.php
Diffstat (limited to 'include/comanche.php')
-rw-r--r-- | include/comanche.php | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/include/comanche.php b/include/comanche.php index dfe907f4d..826948fa6 100644 --- a/include/comanche.php +++ b/include/comanche.php @@ -170,17 +170,12 @@ function comanche_block($s, $class = '') { if($r) { $o .= (($var['wrap'] == 'none') ? '' : '<div class="' . $class . '">'); - if($r[0]['title'] && trim($r[0]['title']) != '$content') { + if($r[0]['title'] && trim($r[0]['body']) != '$content') { $o .= '<h3>' . $r[0]['title'] . '</h3>'; } - if($r[0]['title'] && trim($r[0]['title']) === '$content' && get_app()->data['webpage'][0]['title']) { - $o .= '<h3>' . get_app()->data['webpage'][0]['title'] . '</h3>'; - } - - if(trim($r[0]['body']) === '$content') { - $o .= prepare_text(get_app()->data['webpage'][0]['body'], get_app()->data['webpage'][0]['mimetype']); + $o .= get_app()->page['content']; } else { $o .= prepare_text($r[0]['body'], $r[0]['mimetype']); @@ -202,9 +197,17 @@ function comanche_js($s) { case 'bootstrap': $path = 'library/bootstrap/js/bootstrap.min.js'; break; + case 'foundation': + $path = 'library/foundation/js/foundation.min.js'; + $init = "\r\n" . '<script>$(document).ready(function() { $(document).foundation(); });</script>'; + break; } - return '<script src="' . z_root() . '/' . $path . '" ></script>'; + $ret = '<script src="' . z_root() . '/' . $path . '" ></script>'; + if($init) + $ret .= $init; + + return $ret; } @@ -214,9 +217,14 @@ function comanche_css($s) { case 'bootstrap': $path = 'library/bootstrap/css/bootstrap.min.css'; break; + case 'foundation': + $path = 'library/foundation/css/foundation.min.css'; + break; } - return '<link rel="stylesheet" href="' . z_root() . '/' . $path . '" type="text/css" media="screen">'; + $ret = '<link rel="stylesheet" href="' . z_root() . '/' . $path . '" type="text/css" media="screen">'; + + return $ret; } |