diff --git a/e107_core/shortcodes/batch/user_shortcodes.php b/e107_core/shortcodes/batch/user_shortcodes.php index 446fa550e..cbc752dc4 100644 --- a/e107_core/shortcodes/batch/user_shortcodes.php +++ b/e107_core/shortcodes/batch/user_shortcodes.php @@ -686,6 +686,7 @@ class user_shortcodes extends e_shortcode { $sql = e107::getDb(); $tp = e107::getParser(); + $frm = e107::getForm(); $template = e107::getCoreTemplate('user','extended'); @@ -733,14 +734,19 @@ class user_shortcodes extends e_shortcode { $key = $f['user_extended_struct_name']; + if($ue_name = $tp->parseTemplate("{USER_EXTENDED={$key}.text.{$this->var['user_id']}}", TRUE)) { + $extended_record = str_replace("EXTENDED_ICON","USER_EXTENDED={$key}.icon", $EXTENDED_CATEGORY_TABLE); $extended_record = str_replace("{EXTENDED_NAME}", $tp->toHTML($ue_name,"","defs"), $extended_record); $extended_record = str_replace("EXTENDED_VALUE","USER_EXTENDED={$key}.value.{$this->var['user_id']}", $extended_record); + $extended_record = str_replace('{EXTENDED_ID}',$frm->name2id('user_'.$key), $extended_record); + if(HIDE_EMPTY_FIELDS === TRUE) { $this_value = $tp->parseTemplate("{USER_EXTENDED={$key}.value.{$this->var['user_id']}}", TRUE); + if($this_value != "") { $ret .= $tp->parseTemplate($extended_record, TRUE); diff --git a/e107_core/templates/user_template.php b/e107_core/templates/user_template.php index 024af78f6..a4cba5ff3 100644 --- a/e107_core/templates/user_template.php +++ b/e107_core/templates/user_template.php @@ -222,17 +222,17 @@ $USER_EMBED_USERPROFILE_TEMPLATE = " // Convert Shortcode Wrappers from v1.x to v2.x standards. -$USER_TEMPLATE['view'] = $USER_FULL_TEMPLATE; -$USER_WRAPPER['view']['USER_COMMENTS_LINK'] = $sc_style['USER_COMMENTS_LINK']['pre']."{---}".$sc_style['USER_COMMENTS_LINK']['post']; -$USER_WRAPPER['view']['USER_SIGNATURE'] = $sc_style['USER_SIGNATURE']['pre']."{---}".$sc_style['USER_SIGNATURE']['post']; -$USER_WRAPPER['view']['USER_UPDATE_LINK'] = $sc_style['USER_UPDATE_LINK']['pre']."{---}".$sc_style['USER_UPDATE_LINK']['post']; -$USER_WRAPPER['view']['USER_FORUM_LINK'] = $sc_style['USER_FORUM_LINK']['pre']."{---}".$sc_style['USER_FORUM_LINK']['post']; -$USER_WRAPPER['view']['USER_RATING'] = $sc_style['USER_RATING']['pre']."{---}".$sc_style['USER_RATING']['post']; -$USER_WRAPPER['view']['USER_SENDPM'] = $sc_style['USER_SENDPM']['pre']."{---}".$sc_style['USER_SENDPM']['post']; -$USER_WRAPPER['view']['USER_LOGINNAME'] = $sc_style['USER_LOGINNAME']['pre']."{---}"; +$USER_TEMPLATE['view'] = $USER_FULL_TEMPLATE; +$USER_WRAPPER['view']['USER_COMMENTS_LINK'] = $sc_style['USER_COMMENTS_LINK']['pre']."{---}".$sc_style['USER_COMMENTS_LINK']['post']; +$USER_WRAPPER['view']['USER_SIGNATURE'] = $sc_style['USER_SIGNATURE']['pre']."{---}".$sc_style['USER_SIGNATURE']['post']; +$USER_WRAPPER['view']['USER_UPDATE_LINK'] = $sc_style['USER_UPDATE_LINK']['pre']."{---}".$sc_style['USER_UPDATE_LINK']['post']; +$USER_WRAPPER['view']['USER_FORUM_LINK'] = $sc_style['USER_FORUM_LINK']['pre']."{---}".$sc_style['USER_FORUM_LINK']['post']; +$USER_WRAPPER['view']['USER_RATING'] = $sc_style['USER_RATING']['pre']."{---}".$sc_style['USER_RATING']['post']; +$USER_WRAPPER['view']['USER_SENDPM'] = $sc_style['USER_SENDPM']['pre']."{---}".$sc_style['USER_SENDPM']['post']; +$USER_WRAPPER['view']['USER_LOGINNAME'] = $sc_style['USER_LOGINNAME']['pre']."{---}"; -$USER_WRAPPER['view']['USER_COMMENTPOSTS'] = $sc_style['USER_COMMENTPOSTS']['pre']."{---}"; -$USER_WRAPPER['view']['USER_COMMENTPER'] = $sc_style['USER_COMMENTPER']['pre']."{---}".$sc_style['USER_COMMENTPER']['post']; +$USER_WRAPPER['view']['USER_COMMENTPOSTS'] = $sc_style['USER_COMMENTPOSTS']['pre']."{---}"; +$USER_WRAPPER['view']['USER_COMMENTPER'] = $sc_style['USER_COMMENTPER']['pre']."{---}".$sc_style['USER_COMMENTPER']['post']; $USER_TEMPLATE['addon'] = $USER_EMBED_USERPROFILE_TEMPLATE; $USER_TEMPLATE['extended']['start'] = $EXTENDED_CATEGORY_START; @@ -254,20 +254,20 @@ if(deftrue('BOOTSTRAP')) $USER_TEMPLATE['addon'] = ' -
- {USER_ADDON_LABEL} - {USER_ADDON_TEXT} -
+- {EXTENDED_NAME} - {EXTENDED_VALUE} -
+