diff options
author | friendica <info@friendica.com> | 2013-09-03 19:55:26 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-09-03 19:55:26 -0700 |
commit | ab1c9dc9c9ecc1f382b6c7512b014c11f08b6e5e (patch) | |
tree | d6b1b30ab6191156ff0e5150332612a2cf788dbe /mod/blocks.php | |
parent | 50d4206e9fa0713655d4737ebdeb404afac4984e (diff) | |
download | volse-hubzilla-ab1c9dc9c9ecc1f382b6c7512b014c11f08b6e5e.tar.gz volse-hubzilla-ab1c9dc9c9ecc1f382b6c7512b014c11f08b6e5e.tar.bz2 volse-hubzilla-ab1c9dc9c9ecc1f382b6c7512b014c11f08b6e5e.zip |
add design tool menu to appropriate pages
Diffstat (limited to 'mod/blocks.php')
-rw-r--r-- | mod/blocks.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/mod/blocks.php b/mod/blocks.php index 29117eae8..170d37256 100644 --- a/mod/blocks.php +++ b/mod/blocks.php @@ -2,6 +2,8 @@ function blocks_content(&$a) { + + if(argc() > 1) $which = argv(1); else { @@ -21,6 +23,16 @@ function blocks_content(&$a) { $owner = intval($r[0]['channel_id']); } + // Block design features from visitors + + if((! local_user()) || (local_user() != $owner)) { + notice( t('Permission denied.') . EOL); + return; + } + + + + // Get the observer, check their permissions $observer = $a->get_observer(); @@ -33,6 +45,12 @@ function blocks_content(&$a) { return; } + if(local_user() && local_user() == $owner) { + $a->set_widget('design',design_tools()); + } + + + // Create a status editor (for now - we'll need a WYSIWYG eventually) to create pages // Nickname is set to the observers xchan, and profile_uid to the owners. This lets you post pages at other people's channels. require_once ('include/conversation.php'); @@ -43,6 +61,7 @@ require_once ('include/conversation.php'); 'lockstate' => (($group || $cid || $channel['channel_allow_cid'] || $channel['channel_allow_gid'] || $channel['channel_deny_cid'] || $channel['channel_deny_gid']) ? 'lock' : 'unlock'), 'bang' => (($group || $cid) ? '!' : ''), 'visitor' => 'block', + 'mimetype' => 'choose', 'profile_uid' => intval($owner), ); |