add design tool menu to appropriate pages
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user