X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=membersince%2Fmembersince.php;h=635a0158dddd4ea12a7ef5450eeb26b976c980f8;hb=05d2707d501b7b1cdd98b0802121e69a6df7d05d;hp=c11f9b5304750a7c35453fe49b19473bafb888f2;hpb=b0dba96b0d731eb5ac41f8ef414145a994300c0f;p=friendica-addons.git diff --git a/membersince/membersince.php b/membersince/membersince.php index c11f9b53..635a0158 100644 --- a/membersince/membersince.php +++ b/membersince/membersince.php @@ -7,18 +7,13 @@ * Status: Unsupported */ -use Friendica\Core\Addon; -use Friendica\Core\L10n; +use Friendica\Core\Hook; +use Friendica\DI; use Friendica\Util\DateTimeFormat; function membersince_install() { - Addon::registerHook('profile_advanced', 'addon/membersince/membersince.php', 'membersince_display'); -} - -function membersince_uninstall() -{ - Addon::unregisterHook('profile_advanced', 'addon/membersince/membersince.php', 'membersince_display'); + Hook::register('profile_advanced', 'addon/membersince/membersince.php', 'membersince_display'); } function membersince_display(Friendica\App $a, &$b) @@ -39,7 +34,7 @@ function membersince_display(Friendica\App $a, &$b) $hr->setAttribute('class','profile-separator'); // The label div. - $label = $doc->createElement('div', L10n::t('Member since:')); + $label = $doc->createElement('div', DI::l10n()->t('Member since:')); $label->setAttribute('class', 'col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted'); // The div for the register date of the profile owner. @@ -54,6 +49,6 @@ function membersince_display(Friendica\App $a, &$b) $b = $doc->saveHTML(); } else { // Works in Vier. - $b = preg_replace('/<\/dl>/', "\n\n\n