Merge pull request #4432 from rabuzarus/20180209_-_move_membersince_to_core

Move membersince addon to core
This commit is contained in:
Hypolite Petovan 2018-02-09 15:37:29 -05:00 committed by GitHub
commit d0a7b0956d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 50 additions and 23 deletions

View file

@ -126,6 +126,7 @@ class Feature
L10n::t('Advanced Profile Settings'), L10n::t('Advanced Profile Settings'),
['forumlist_profile', L10n::t('List Forums'), L10n::t('Show visitors public community forums at the Advanced Profile Page'), false, Config::get('feature_lock', 'forumlist_profile', false)], ['forumlist_profile', L10n::t('List Forums'), L10n::t('Show visitors public community forums at the Advanced Profile Page'), false, Config::get('feature_lock', 'forumlist_profile', false)],
['tagadelic', L10n::t('Tag Cloud'), L10n::t('Provide a personal tag cloud on your profile page'), false, Config::get('feature_lock', 'tagadelic', false)], ['tagadelic', L10n::t('Tag Cloud'), L10n::t('Provide a personal tag cloud on your profile page'), false, Config::get('feature_lock', 'tagadelic', false)],
['profile_membersince', L10n::t('Display Membership Date'), L10n::t('Display membership date in profile'), false, Config::get('feature_lock', 'profile_membersince', false)],
], ],
]; ];

View file

@ -722,6 +722,10 @@ class Profile
$profile['fullname'] = [L10n::t('Full Name:'), $a->profile['name']]; $profile['fullname'] = [L10n::t('Full Name:'), $a->profile['name']];
if (Feature::isEnabled($uid, 'profile_membersince')) {
$profile['membersince'] = [L10n::t('Member since:'), DateTimeFormat::local($a->profile['register_date'])];
}
if ($a->profile['gender']) { if ($a->profile['gender']) {
$profile['gender'] = [L10n::t('Gender:'), $a->profile['gender']]; $profile['gender'] = [L10n::t('Gender:'), $a->profile['gender']];
} }

View file

@ -6,6 +6,13 @@
<dd>{{$profile.fullname.1}}</dd> <dd>{{$profile.fullname.1}}</dd>
</dl> </dl>
{{if $profile.membersince}}
<dl id="aprofile-membersince" class="aprofile">
<dt>{{$profile.membersince.0}}</dt>
<dd>{{$profile.membersince.1}}</dd>
</dl>
{{/if}}
{{if $profile.gender}} {{if $profile.gender}}
<dl id="aprofile-gender" class="aprofile"> <dl id="aprofile-gender" class="aprofile">
<dt>{{$profile.gender.0}}</dt> <dt>{{$profile.gender.0}}</dt>

View file

@ -30,6 +30,14 @@
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$profile.fullname.1}}</div> <div class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$profile.fullname.1}}</div>
</div> </div>
{{if $profile.membersince}}
<div id="aprofile-membersince" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 aprofile">
<hr class="profile-separator">
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$profile.membersince.0}}</div>
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$profile.membersince.1}}</div>
</div>
{{/if}}
{{if $profile.gender}} {{if $profile.gender}}
<div id="aprofile-gender" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 aprofile"> <div id="aprofile-gender" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 aprofile">
<hr class="profile-separator"> <hr class="profile-separator">

View file

@ -11,6 +11,13 @@
<dd>{{$profile.fullname.1}}</dd> <dd>{{$profile.fullname.1}}</dd>
</dl> </dl>
{{if $profile.membersince}}
<dl id="aprofile-membersince" class="aprofile">
<dt>{{$profile.membersince.0}}</dt>
<dd>{{$profile.membersince.1}}</dd>
</dl>
{{/if}}
{{if $profile.gender}} {{if $profile.gender}}
<dl id="aprofile-gender" class="aprofile"> <dl id="aprofile-gender" class="aprofile">
<dt>{{$profile.gender.0}}</dt> <dt>{{$profile.gender.0}}</dt>