diff options
Diffstat (limited to 'mod')
-rw-r--r-- | mod/blocks.php | 19 | ||||
-rw-r--r-- | mod/editwebpage.php | 2 | ||||
-rw-r--r-- | mod/layouts.php | 16 | ||||
-rw-r--r-- | mod/menu.php | 3 | ||||
-rw-r--r-- | mod/mitem.php | 2 | ||||
-rw-r--r-- | mod/webpages.php | 5 |
6 files changed, 46 insertions, 1 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), ); diff --git a/mod/editwebpage.php b/mod/editwebpage.php index d49a006c9..6ce5a9493 100644 --- a/mod/editwebpage.php +++ b/mod/editwebpage.php @@ -78,7 +78,7 @@ function editwebpage_content(&$a) { if($layout) $layoutselect = '<input type="hidden" name="layout_mid" value="' . $layout . '" />'; else - $layoutselect = layout_select($x['profile_uid']); + $layoutselect = layout_select($itm[0]['uid']); $o .= replace_macros(get_markup_template('edpost_head.tpl'), array( diff --git a/mod/layouts.php b/mod/layouts.php index 78d142c47..cd6e61f88 100644 --- a/mod/layouts.php +++ b/mod/layouts.php @@ -21,6 +21,16 @@ function layouts_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 +43,12 @@ function layouts_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'); diff --git a/mod/menu.php b/mod/menu.php index c3302544e..1ec3c7996 100644 --- a/mod/menu.php +++ b/mod/menu.php @@ -42,6 +42,9 @@ function menu_content(&$a) { } + $a->set_widget('design',design_tools()); + + if(argc() == 1) { // list menus $x = menu_list(local_user()); diff --git a/mod/mitem.php b/mod/mitem.php index 2b890d5a1..ee690907e 100644 --- a/mod/mitem.php +++ b/mod/mitem.php @@ -98,6 +98,8 @@ function mitem_content(&$a) { return ''; } + $a->set_widget('design',design_tools()); + $m = menu_fetch($a->data['menu']['menu_name'],local_user(), get_observer_hash()); $a->set_widget('menu_preview',menu_render($m)); diff --git a/mod/webpages.php b/mod/webpages.php index d87bd4a86..04c2e07c5 100644 --- a/mod/webpages.php +++ b/mod/webpages.php @@ -41,6 +41,11 @@ function webpages_content(&$a) { return; } + if(local_user() && local_user() == $owner) { + $a->set_widget('design',design_tools()); + } + + $mimetype = get_config('system','page_mimetype'); if(! $mimetype) $mimetype = 'choose'; |