From 4011dd18f01d275620b13815573e359c77664e3a Mon Sep 17 00:00:00 2001 From: zotlabs Date: Sun, 8 Oct 2017 16:48:24 -0700 Subject: alternate navbar layouts --- Zotlabs/Render/Comanche.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Zotlabs') diff --git a/Zotlabs/Render/Comanche.php b/Zotlabs/Render/Comanche.php index d126cb3da..ca664cba6 100644 --- a/Zotlabs/Render/Comanche.php +++ b/Zotlabs/Render/Comanche.php @@ -121,6 +121,11 @@ class Comanche { if($cnt) \App::$layout['theme'] = trim($matches[1]); + $cnt = preg_match("/\[navbar\](.*?)\[\/navbar\]/ism", $s, $matches); + if($cnt) + \App::$layout['navbar'] = trim($matches[1]); + + $cnt = preg_match_all("/\[webpage\](.*?)\[\/webpage\]/ism", $s, $matches, PREG_SET_ORDER); if($cnt) { // only the last webpage definition is used if there is more than one -- cgit v1.2.3 From c37908f344ecbac3ee60e3e36701161a4047d639 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Sun, 8 Oct 2017 17:22:38 -0700 Subject: check write_storage permission in /display --- Zotlabs/Lib/ThreadStream.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs') diff --git a/Zotlabs/Lib/ThreadStream.php b/Zotlabs/Lib/ThreadStream.php index d7a898704..436723f8c 100644 --- a/Zotlabs/Lib/ThreadStream.php +++ b/Zotlabs/Lib/ThreadStream.php @@ -68,7 +68,7 @@ class ThreadStream { // pull some trickery which allows us to re-invoke this function afterward // it's an ugly hack so @FIXME $this->writable = perm_is_allowed($this->profile_owner,$ob_hash,'post_comments'); - $this->uploadable = false; + $this->uploadable = perm_is_allowed($this->profile_owner,$ob_hash,'write_storage'); break; case 'page': $this->profile_owner = \App::$profile['uid']; -- cgit v1.2.3 From 23812e5b48b7a4d4f0c275c0fbb3d244a582397c Mon Sep 17 00:00:00 2001 From: zotlabs Date: Sun, 8 Oct 2017 19:43:03 -0700 Subject: ability to pin apps to the navbar when using named navbars --- Zotlabs/Lib/Apps.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Zotlabs') diff --git a/Zotlabs/Lib/Apps.php b/Zotlabs/Lib/Apps.php index c4f4038dc..f13fbe362 100644 --- a/Zotlabs/Lib/Apps.php +++ b/Zotlabs/Lib/Apps.php @@ -383,6 +383,13 @@ class Apps { $install_action = (($installed) ? t('Update') : t('Install')); $icon = ((strpos($papp['photo'],'icon:') === 0) ? substr($papp['photo'],5) : ''); + if($mode === 'navbar') { + return replace_macros(get_markup_template('app_nav.tpl'),array( + '$app' => $papp, + '$icon' => $icon, + )); + } + return replace_macros(get_markup_template('app.tpl'),array( '$app' => $papp, '$icon' => $icon, -- cgit v1.2.3