diff options
author | friendica <info@friendica.com> | 2014-08-27 22:56:24 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-08-27 22:56:24 -0700 |
commit | a4f734e37c2092b91d3915b5f4bb90eba6a4b605 (patch) | |
tree | ab1353b6da9609dcacf3fe1c50615997187e1a86 /include | |
parent | 2d210db1b85e5893afe285fc7b32f9987f1ae565 (diff) | |
download | volse-hubzilla-a4f734e37c2092b91d3915b5f4bb90eba6a4b605.tar.gz volse-hubzilla-a4f734e37c2092b91d3915b5f4bb90eba6a4b605.tar.bz2 volse-hubzilla-a4f734e37c2092b91d3915b5f4bb90eba6a4b605.zip |
begin embeddable/shareable design elements (blocks, webpages, layouts, menus, etc.)
Diffstat (limited to 'include')
-rw-r--r-- | include/apps.php | 34 |
1 files changed, 33 insertions, 1 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); + +} + |