X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FContent%2FWidget.php;h=ce4548d1ad02ea73ba42e39d7292f6c4414da82a;hb=ddc3c0db03267d29ace272b504dc6f803fa02990;hp=c74cd3ec31d1af8b1817d307bbb2cd1b1d6e636e;hpb=649bbaa4c3d28cdf4cb8544ff2f92ba493023953;p=friendica.git diff --git a/src/Content/Widget.php b/src/Content/Widget.php index c74cd3ec31..ce4548d1ad 100644 --- a/src/Content/Widget.php +++ b/src/Content/Widget.php @@ -102,7 +102,7 @@ class Widget public static function unavailableNetworks(): array { // Always hide content from these networks - $networks = [Protocol::PHANTOM, Protocol::FACEBOOK, Protocol::APPNET, Protocol::ZOT]; + $networks = [Protocol::PHANTOM, Protocol::FACEBOOK, Protocol::APPNET, Protocol::TWITTER, Protocol::ZOT]; if (!Addon::isEnabled("discourse")) { $networks[] = Protocol::DISCOURSE; @@ -116,10 +116,6 @@ class Widget $networks[] = Protocol::PUMPIO; } - if (!Addon::isEnabled("twitter")) { - $networks[] = Protocol::TWITTER; - } - if (!Addon::isEnabled("tumblr")) { $networks[] = Protocol::TUMBLR; } @@ -470,6 +466,10 @@ class Widget if ($dthen) { // Set the start and end date to the beginning of the month + $cutoffday = $dthen; + $thisday = substr($dnow, 4); + $nextday = date('Y-m-d', strtotime($dnow . ' + 1 day')); + $nextday = substr($nextday, 4); $dnow = substr($dnow, 0, 8) . '01'; $dthen = substr($dthen, 0, 8) . '01'; @@ -502,7 +502,7 @@ class Widget $cutoff_year = intval(DateTimeFormat::localNow('Y')) - $visible_years; $cutoff = array_key_exists($cutoff_year, $ret); - $o = Renderer::replaceMacros(Renderer::getMarkupTemplate('widget/posted_date.tpl'),[ + $o = Renderer::replaceMacros(Renderer::getMarkupTemplate('widget/posted_date.tpl'), [ '$title' => DI::l10n()->t('Archives'), '$size' => $visible_years, '$cutoff_year' => $cutoff_year, @@ -510,7 +510,11 @@ class Widget '$url' => $url, '$dates' => $ret, '$showless' => DI::l10n()->t('show less'), - '$showmore' => DI::l10n()->t('show more') + '$showmore' => DI::l10n()->t('show more'), + '$onthisdate' => DI::l10n()->t('On this date'), + '$thisday' => $thisday, + '$nextday' => $nextday, + '$cutoffday' => $cutoffday ]); return $o; @@ -530,10 +534,17 @@ class Widget ['ref' => 'person', 'name' => DI::l10n()->t('Persons')], ['ref' => 'organisation', 'name' => DI::l10n()->t('Organisations')], ['ref' => 'news', 'name' => DI::l10n()->t('News')], - ['ref' => 'community', 'name' => DI::l10n()->t('Forums')], + ['ref' => 'community', 'name' => DI::l10n()->t('Groups')], ]; - return self::filter('accounttype', DI::l10n()->t('Account Types'), '', - DI::l10n()->t('All'), $base, $accounts, $accounttype); + return self::filter( + 'accounttype', + DI::l10n()->t('Account Types'), + '', + DI::l10n()->t('All'), + $base, + $accounts, + $accounttype + ); } }