aboutsummaryrefslogtreecommitdiffstats
path: root/mod/blocks.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-08-28 01:08:42 -0700
committerfriendica <info@friendica.com>2014-08-28 01:08:42 -0700
commited4896def1f90d903919311312fee974384540d7 (patch)
treeeecbd6f92877ee922005ab7b8f30a4f962ea630f /mod/blocks.php
parenta4f734e37c2092b91d3915b5f4bb90eba6a4b605 (diff)
downloadvolse-hubzilla-ed4896def1f90d903919311312fee974384540d7.tar.gz
volse-hubzilla-ed4896def1f90d903919311312fee974384540d7.tar.bz2
volse-hubzilla-ed4896def1f90d903919311312fee974384540d7.zip
make blocks, webpages, and layouts postable (pre-filled forms if supplied from elsewhere). The only serious issue is with ordering - you have to process and save a named layout before you can save a webpage that uses that layout name. Otherwise it will get unset during the save.
Diffstat (limited to 'mod/blocks.php')
-rw-r--r--mod/blocks.php17
1 files changed, 11 insertions, 6 deletions
diff --git a/mod/blocks.php b/mod/blocks.php
index 74a980c25..3f2bef116 100644
--- a/mod/blocks.php
+++ b/mod/blocks.php
@@ -45,14 +45,10 @@ 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.
+// 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');
$x = array(
'webpage' => ITEM_BUILDBLOCK,
@@ -67,6 +63,15 @@ require_once ('include/conversation.php');
'profile_uid' => intval($owner),
);
+ if($_REQUEST['title'])
+ $x['title'] = $_REQUEST['title'];
+ if($_REQUEST['body'])
+ $x['body'] = $_REQUEST['body'];
+ if($_REQUEST['pagetitle'])
+ $x['pagetitle'] = $_REQUEST['pagetitle'];
+
+
+
$o .= status_editor($a,$x);
//Get a list of blocks. We can't display all them because endless scroll makes that unusable, so just list titles and an edit link.