From de3345f5f39f080e00c2572b48a53d85c7f65b5c Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 1 Sep 2013 17:07:55 -0700 Subject: This isn't optimal, but on the short term we'll clone the page editor to use as a block editor, and probably a layout editor as well. Eventually, these should all probably just be switches onto a single editor instance. Decided to put the layout_mid into the item table directory rather than re-use resource_id, so that we can still have pages attached to different resources like photos and events and stuff. The block editor is far from finished, at this point I've only cloned it and changed the name and type of item it looks for. --- mod/item.php | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'mod/item.php') diff --git a/mod/item.php b/mod/item.php index 1893a6ef4..504df9d29 100644 --- a/mod/item.php +++ b/mod/item.php @@ -495,6 +495,9 @@ function item_post(&$a) { if($buildblock) $item_restrict = $item_restrict | ITEM_BUILDBLOCK; + + if($pdl) + $item_restrict = $item_restrict | ITEM_PDL; if(! strlen($verb)) @@ -764,7 +767,16 @@ function item_post(&$a) { intval($parent) ); - if($webpage) { + $page_type = ''; + + if($webpage) + $page_type = 'WEBPAGE'; + elseif($buildblock) + $page_type = 'BUILDBLOCK'; + elseif($ptemplate) + $page_type = 'PDL'; + + if($page_type) { // store page info as an alternate message_id so we can access it via // https://sitename/page/$channelname/$pagetitle @@ -773,11 +785,12 @@ function item_post(&$a) { // as the entire mid. If it were the post_id the link would be less portable. // We should have the ability to edit this and arrange pages into menus via the pages module + q("insert into item_id ( iid, uid, sid, service ) values ( %d, %d, '%s','%s' )", intval($post_id), intval($channel['channel_id']), dbesc(($pagetitle) ? $pagetitle : substr($mid,0,16)), - dbesc('WEBPAGE') + dbesc($page_type) ); } -- cgit v1.2.3