mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 12:48:24 +01:00
Corrected user template markup and added more class ids for greater flexibility during theme development.
This commit is contained in:
parent
87078b9e63
commit
eaf23811f5
@ -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);
|
||||
|
@ -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'] = '
|
||||
<p class="row">
|
||||
<span class="col-xs-12 col-md-4">{USER_ADDON_LABEL}</span>
|
||||
<span class="col-xs-12 col-md-8">{USER_ADDON_TEXT}</span>
|
||||
</p>
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-4">{USER_ADDON_LABEL}</div>
|
||||
<div class="col-xs-12 col-md-8">{USER_ADDON_TEXT}</div>
|
||||
</div>
|
||||
';
|
||||
|
||||
$USER_TEMPLATE['extended']['start'] = '';
|
||||
$USER_TEMPLATE['extended']['end'] = '';
|
||||
|
||||
$USER_TEMPLATE['extended']['item'] = '
|
||||
<p class="row">
|
||||
<span class="col-xs-12 col-md-4">{EXTENDED_NAME}</span>
|
||||
<span class="col-xs-12 col-md-8">{EXTENDED_VALUE}</span>
|
||||
<p>
|
||||
<div class="row {EXTENDED_ID}">
|
||||
<div class="ue-label col-xs-12 col-md-4">{EXTENDED_NAME}</div>
|
||||
<div class="ue-value col-xs-12 col-md-8">{EXTENDED_VALUE}</div>
|
||||
</div>
|
||||
';
|
||||
|
||||
|
||||
@ -316,15 +316,15 @@ if(deftrue('BOOTSTRAP'))
|
||||
|
||||
|
||||
// View shortcode wrappers.
|
||||
$USER_WRAPPER['view']['USER_COMMENTPOSTS'] = '<span class="col-xs-12 col-md-4">'.LAN_USER_68.'</span><span class="col-xs-12 col-md-8">{---}';
|
||||
$USER_WRAPPER['view']['USER_COMMENTPER'] = ' ( {---}% )</span>';
|
||||
$USER_WRAPPER['view']['USER_COMMENTPOSTS'] = '<div class="col-xs-12 col-md-4">'.LAN_USER_68.'</div><div class="col-xs-12 col-md-8">{---}';
|
||||
$USER_WRAPPER['view']['USER_COMMENTPER'] = ' ( {---}% )</div>';
|
||||
$USER_WRAPPER['view']['USER_SIGNATURE'] = '<div>{---}</div>';
|
||||
$USER_WRAPPER['view']['USER_RATING'] = '<div>{---}</div>';
|
||||
$USER_WRAPPER['view']['USER_SENDPM'] = '<div>{---}</div>';
|
||||
|
||||
$USER_TEMPLATE['view'] = '
|
||||
{SETIMAGE: w=600}
|
||||
<div class="row">
|
||||
<div class="user-profile row">
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default panel-profile clearfix">
|
||||
<div class="panel-heading" style="height:180px; background-size: cover;background-image: url( {USER_PHOTO: type=url});">
|
||||
@ -341,17 +341,17 @@ if(deftrue('BOOTSTRAP'))
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p class="row"><span class="col-xs-12 col-md-4">'.LAN_USER_63.'</span><span class="col-xs-12 col-md-8">{USER_REALNAME}</span></p>
|
||||
<p class="row"><span class="col-xs-12 col-md-4">'.LAN_USER_02.'</span><span class="col-xs-12 col-md-8">{USER_LOGINNAME}</span></p>
|
||||
<p class="row"><span class="col-xs-12 col-md-4">'.LAN_USER_60.'</span><span class="col-xs-12 col-md-8">{USER_EMAIL}</span></p>
|
||||
<p class="row"><span class="col-xs-12 col-md-4">'.LAN_USER_54.'</span><span class="col-xs-12 col-md-8">{USER_LEVEL}</span></p>
|
||||
<p class="row"><span class="col-xs-12 col-md-4">'.LAN_USER_65.'</span><span class="col-xs-12 col-md-8">{USER_LASTVISIT}<br /><small class="padding-left">{USER_LASTVISIT_LAPSE}</small></span></p>
|
||||
<p class="row"><span class="col-xs-12 col-md-4">'.LAN_USER_59.'</span><span class="col-xs-12 col-md-8">{USER_JOIN}<br /><small class="padding-left">{USER_DAYSREGGED}</small></span></p>
|
||||
<p class="row"><span class="col-xs-12 col-md-4">'.LAN_USER_66.'</span><span class="col-xs-12 col-md-8">{USER_VISITS}</span></p>
|
||||
<div class="row"><div class="col-xs-12 col-md-4">'.LAN_USER_63.'</div><div class="col-xs-12 col-md-8">{USER_REALNAME}</div></div>
|
||||
<div class="row"><div class="col-xs-12 col-md-4">'.LAN_USER_02.'</div><div class="col-xs-12 col-md-8">{USER_LOGINNAME}</div></div>
|
||||
<div class="row"><div class="col-xs-12 col-md-4">'.LAN_USER_60.'</div><div class="col-xs-12 col-md-8">{USER_EMAIL}</div></div>
|
||||
<div class="row"><div class="col-xs-12 col-md-4">'.LAN_USER_54.'</div><div class="col-xs-12 col-md-8">{USER_LEVEL}</div></div>
|
||||
<div class="row"><div class="col-xs-12 col-md-4">'.LAN_USER_65.'</div><div class="col-xs-12 col-md-8">{USER_LASTVISIT}<br /><small class="padding-left">{USER_LASTVISIT_LAPSE}</small></div></div>
|
||||
<div class="row"><div class="col-xs-12 col-md-4">'.LAN_USER_59.'</div><div class="col-xs-12 col-md-8">{USER_JOIN}<br /><small class="padding-left">{USER_DAYSREGGED}</small></div></div>
|
||||
<div class="row"><div class="col-xs-12 col-md-4">'.LAN_USER_66.'</div><div class="col-xs-12 col-md-8">{USER_VISITS}</div></div>
|
||||
{USER_ADDONS}
|
||||
<p class="row">{USER_COMMENTPOSTS} {USER_COMMENTPER}</p>
|
||||
<div class="row">{USER_COMMENTPOSTS} {USER_COMMENTPER}</div>
|
||||
{USER_EXTENDED_ALL}
|
||||
<p class="row"></p>
|
||||
<div class="row"></div>
|
||||
</div>
|
||||
<div class="panel-body text-center">
|
||||
{USER_UPDATE_LINK}
|
||||
|
@ -179,6 +179,10 @@ div.bbcode { margin: 15px 0px; clear: both; } /* layout control via bbcodes */
|
||||
border-top: 1px solid rgba(170,170,170,0.35);
|
||||
padding-top: 10px;
|
||||
}
|
||||
.panel-profile .panel-body div.row {
|
||||
border-top: 1px solid rgba(170,170,170,0.35);
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user