diff --git a/config/vanilla/config.php b/config/vanilla/config.php index 32a110e..34ee2b0 100644 --- a/config/vanilla/config.php +++ b/config/vanilla/config.php @@ -71,7 +71,10 @@ $Configuration['Garden']['ForceInputFormatter'] = false; $Configuration['Garden']['Version'] = 'Undefined'; $Configuration['Garden']['CanProcessImages'] = true; -$Configuration['Garden']['Theme'] = 'topcoder'; +// Default Topcoder Theme +//$Configuration['Garden']['Theme'] = 'topcoder'; +// MFE Topcoder Theme +$Configuration['Garden']['Theme'] = 'mfe-topcoder'; $Configuration['Garden']['MobileTheme'] = 'topcoder'; $Configuration['Garden']['Profile']['EditPhotos'] = false; $Configuration['Garden']['SystemUserID'] = '1'; diff --git a/vanilla/applications/dashboard/controllers/class.entrycontroller.php b/vanilla/applications/dashboard/controllers/class.entrycontroller.php index 2775aa0..32da3e8 100644 --- a/vanilla/applications/dashboard/controllers/class.entrycontroller.php +++ b/vanilla/applications/dashboard/controllers/class.entrycontroller.php @@ -372,7 +372,16 @@ protected function checkOverride($type, $target, $transientKey = null) { throw new Exception("Unknown entry type $type."); } - $url = str_ireplace('{target}', rawurlencode(url($target, true)), $url); + // FIX: micro-frontends-forums-app issues-12 + $isEmbedded = (bool) c('Garden.Embed.Allow',false); + $remoteUrl = c("Garden.Embed.RemoteUrl"); + if($isEmbedded && is_string( $remoteUrl)) { + $targetUrl = rawurlencode($remoteUrl.'/#'.url($target)); + } else { + $targetUrl = rawurlencode(url($target, true)); + } + + $url = str_ireplace('{target}', $targetUrl, $url); if ($this->deliveryType() == DELIVERY_TYPE_ALL && strcasecmp($this->data('Method'), 'POST') != 0) { redirectTo(url($url, true), 302, false); @@ -1019,7 +1028,16 @@ public function signOut($transientKey = "", $override = "0") { $this->_setRedirect(); } - $target = url($this->target(), true); + // FIX: micro-frontends-forums-app issues-12 + $isEmbedded = (bool) c('Garden.Embed.Allow',false); + $remoteUrl = c("Garden.Embed.RemoteUrl"); + + if($isEmbedded && is_string( $remoteUrl)) { + $target = rawurlencode($remoteUrl.'/#'.url($this->target())); + } else { + $target = url($this->target(), true); + } + if (!isTrustedDomain($target)) { $target = Gdn::router()->getDestination('DefaultController'); } diff --git a/vanilla/applications/dashboard/views/modules/guest.php b/vanilla/applications/dashboard/views/modules/guest.php index 6947b62..22af5d7 100644 --- a/vanilla/applications/dashboard/views/modules/guest.php +++ b/vanilla/applications/dashboard/views/modules/guest.php @@ -1,30 +1,40 @@ - +

-

MessageCode, $this->MessageDefault); ?>

+

fireEvent('BeforeSignInButton'); ?>

_Sender->SelfUrl); - if ($signInUrl) { - echo '
'; - echo anchor(t('Login'), signInUrl($this->_Sender->SelfUrl), 'Button Primary SignIn BigButton'.(signInPopup() ? ' SignInPopup' : ''), ['rel' => 'nofollow']); - echo '
'; - } + if(!$isEmbedded) { + if ($signInUrl) { + echo '
'; + echo anchor(t('Login'), signInUrl($this->_Sender->SelfUrl), 'Button Primary SignIn BigButton'.(signInPopup() ? ' SignInPopup' : ''), ['rel' => 'nofollow']); + echo '
'; + } - $Url = registerUrl($this->_Sender->SelfUrl); - if (!empty($Url)) { - ?> -

- Don't have an account? - 'nofollow']); - ?> -

- _Sender->SelfUrl); + if (!empty($Url)) { + ?> +

+ Don't have an account? + 'nofollow']); + ?> +

+