diff options
author | redmatrix <git@macgirvin.com> | 2016-03-01 14:55:04 -0800 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-03-01 14:55:04 -0800 |
commit | 765dd5569b9ce2f18ac9974123d96452d0d19926 (patch) | |
tree | 62446cd9f085a6e6b7da95be15a878954da51f40 /include | |
parent | c19a1a6b82d04d1c6a42f638998f2c692caf83dd (diff) | |
download | volse-hubzilla-765dd5569b9ce2f18ac9974123d96452d0d19926.tar.gz volse-hubzilla-765dd5569b9ce2f18ac9974123d96452d0d19926.tar.bz2 volse-hubzilla-765dd5569b9ce2f18ac9974123d96452d0d19926.zip |
Allow configuration of the display order of profile fields. This is an important piece of a more general profile configuration framework which will eventually be accessible via the admin page.
Diffstat (limited to 'include')
-rw-r--r-- | include/identity.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/identity.php b/include/identity.php index 380556246..382b096fe 100644 --- a/include/identity.php +++ b/include/identity.php @@ -1253,6 +1253,24 @@ function advanced_profile(&$a) { if($a->profile['name']) { + $profile_fields_basic = get_profile_fields_basic(); + $profile_fields_advanced = get_profile_fields_advanced(); + + $advanced = ((feature_enabled($a->profile['profile_uid'],'advanced_profiles')) ? true : false); + if($advanced) + $fields = $profile_fields_advanced; + else + $fields = $profile_fields_basic; + + $clean_fields = array(); + if($fields) { + foreach($fields as $k => $v) { + $clean_fields[] = trim($k); + } + } + + + $tpl = get_markup_template('profile_advanced.tpl'); $profile = array(); @@ -1370,6 +1388,7 @@ function advanced_profile(&$a) { '$canlike' => (($profile['canlike'])? true : false), '$likethis' => t('Like this thing'), '$profile' => $profile, + '$fields' => $clean_fields, '$editmenu' => profile_edit_menu($a->profile['profile_uid']), '$things' => $things )); |