begin embeddable/shareable design elements (blocks, webpages, layouts, menus, etc.)
This commit is contained in:
parent
2d210db1b8
commit
a4f734e37c
@ -467,4 +467,36 @@ function app_encode($app,$embed = false) {
|
||||
function papp_encode($papp) {
|
||||
return chunk_split(base64_encode(json_encode($papp)),72,"\n");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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);
|
||||
|
||||
}
|
||||
|
||||
|
@ -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')),
|
||||
|
Reference in New Issue
Block a user