From a4f734e37c2092b91d3915b5f4bb90eba6a4b605 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 27 Aug 2014 22:56:24 -0700 Subject: begin embeddable/shareable design elements (blocks, webpages, layouts, menus, etc.) --- include/apps.php | 34 +++++++++++++++++++++++++++++++++- mod/admin.php | 2 +- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/include/apps.php b/include/apps.php index bd50b953a..7cfa07868 100644 --- a/include/apps.php +++ b/include/apps.php @@ -467,4 +467,36 @@ function app_encode($app,$embed = false) { function papp_encode($papp) { return chunk_split(base64_encode(json_encode($papp)),72,"\n"); -} \ No newline at end of file +} + + +/** + * install a shared design element (layout, webpage, block, menu, whatever) + * + */ + +function element_install($channel,$s) { + + $ret = array('success' => false); + + $s = str_replace(array('[element]','[/element]'),array('',''),$s); + $s = base64url_decode($s); + if(! $s) + return $ret; + $x = json_decode($s,true); + if(! $x) + return $ret; + + $d = array(); + + + + + + + + + $result = item_store($d); + +} + diff --git a/mod/admin.php b/mod/admin.php index e54163c62..82d199a9b 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -1351,7 +1351,7 @@ function admin_page_profs(&$a) { return replace_macros(get_markup_template('profdef_edit.tpl'),array( '$id' => intval($r[0]['id']), - '$header' => t('New Profile Field'), + '$header' => t('Edit Profile Field'), '$field_name' => array('field_name',t('Field nickname'),$r[0]['field_name'],t('System name of field')), '$field_type' => array('field_type',t('Input type'),$r[0]['field_type'],''), '$field_desc' => array('field_desc',t('Field Name'),$r[0]['field_desc'],t('Label on profile pages')), -- cgit v1.2.3