aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-11-02 18:25:34 -0700
committerzotlabs <mike@macgirvin.com>2017-11-02 18:25:34 -0700
commite70bd0054c4ffb8aadeec8ee7c14dccdb34ab934 (patch)
treec9f50b84bbe5c2d32bacfbc260827f5f24a740db
parentb450b6a43593fa19e25bfd472848517092df2ef6 (diff)
downloadvolse-hubzilla-e70bd0054c4ffb8aadeec8ee7c14dccdb34ab934.tar.gz
volse-hubzilla-e70bd0054c4ffb8aadeec8ee7c14dccdb34ab934.tar.bz2
volse-hubzilla-e70bd0054c4ffb8aadeec8ee7c14dccdb34ab934.zip
hubzilla issue #896
-rw-r--r--Zotlabs/Module/Pubstream.php42
-rw-r--r--view/css/mod_pubstream.css3
-rw-r--r--view/js/mod_pubstream.js5
3 files changed, 50 insertions, 0 deletions
diff --git a/Zotlabs/Module/Pubstream.php b/Zotlabs/Module/Pubstream.php
index e83de6bc0..4224fa3c8 100644
--- a/Zotlabs/Module/Pubstream.php
+++ b/Zotlabs/Module/Pubstream.php
@@ -2,6 +2,7 @@
namespace Zotlabs\Module;
require_once('include/conversation.php');
+require_once('include/acl_selectors.php');
class Pubstream extends \Zotlabs\Web\Controller {
@@ -33,6 +34,47 @@ class Pubstream extends \Zotlabs\Web\Controller {
$static = ((array_key_exists('static',$_REQUEST)) ? intval($_REQUEST['static']) : 0);
$net = ((array_key_exists('net',$_REQUEST)) ? escape_tags($_REQUEST['net']) : '');
+
+ if(local_channel() && (! $update)) {
+
+ $channel = \App::get_channel();
+
+ $channel_acl = array(
+ 'allow_cid' => $channel['channel_allow_cid'],
+ 'allow_gid' => $channel['channel_allow_gid'],
+ 'deny_cid' => $channel['channel_deny_cid'],
+ 'deny_gid' => $channel['channel_deny_gid']
+ );
+
+ $x = array(
+ 'is_owner' => true,
+ 'allow_location' => ((intval(get_pconfig($channel['channel_id'],'system','use_browser_location'))) ? '1' : ''),
+ 'default_location' => $channel['channel_location'],
+ 'nickname' => $channel['channel_address'],
+ 'lockstate' => (($group || $cid || $channel['channel_allow_cid'] || $channel['channel_allow_gid'] || $channel['channel_deny_cid'] || $channel['channel_deny_gid']) ? 'lock' : 'unlock'),
+
+ 'acl' => populate_acl($channel_acl),
+ 'permissions' => $channel_acl,
+ 'bang' => '',
+ 'visitor' => true,
+ 'profile_uid' => local_channel(),
+ 'return_path' => 'channel/' . $channel['channel_address'],
+ 'expanded' => true,
+ 'editor_autocomplete' => true,
+ 'bbco_autocomplete' => 'bbcode',
+ 'bbcode' => true,
+ 'jotnets' => true
+ );
+
+ $o = '<div id="jot-popup">';
+ $o .= status_editor($a,$x);
+ $o .= '</div>';
+ }
+
+
+
+
+
if(! $update && !$load) {
diff --git a/view/css/mod_pubstream.css b/view/css/mod_pubstream.css
new file mode 100644
index 000000000..dde242d4e
--- /dev/null
+++ b/view/css/mod_pubstream.css
@@ -0,0 +1,3 @@
+#jot-popup {
+ display: none;
+}
diff --git a/view/js/mod_pubstream.js b/view/js/mod_pubstream.js
new file mode 100644
index 000000000..7e24a7f86
--- /dev/null
+++ b/view/js/mod_pubstream.js
@@ -0,0 +1,5 @@
+$(document).ready(function() {
+ $(".comment-edit-wrapper textarea").editor_autocomplete(baseurl+"/acl?f=&n=1");
+ // make auto-complete work in more places
+ $(".wall-item-comment-wrapper textarea").editor_autocomplete(baseurl+"/acl?f=&n=1");
+});