From ed4896def1f90d903919311312fee974384540d7 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 28 Aug 2014 01:08:42 -0700 Subject: 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. --- mod/layouts.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'mod/layouts.php') diff --git a/mod/layouts.php b/mod/layouts.php index 318e6e29f..2d14212cf 100644 --- a/mod/layouts.php +++ b/mod/layouts.php @@ -68,7 +68,8 @@ function layouts_content(&$a) { // 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'); @@ -85,6 +86,14 @@ function layouts_content(&$a) { '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. -- cgit v1.2.3