Redirect to original page after login with this plugin url
jobbatam
New
I Use this plugin on my forum,, but after member login with this feature plugin, doesn't redirect to original page... i see code in config php this plugin like this :
$LoginStr = "<p>".T("")." <a href='".Url('/entry/signin')."'>".T("Apply Via Email")."</a>".T("")."</p>";
Can i Modify? after member login Redirect to original page, with this reference,,,
i see in config.php file
$Definition['Sign In or Register to Comment.'] = '<a href="{SignInUrl,html
}"{Popup}>Add Comment</a>';
Thanks
0
Comments
Just open up default.php in the plugin file and change as you need.
https://github.com/adrianspeyer/VanExtend/blob/master/Plugins/PremHide/default.php#L20
Hi @Adrian I see, but I don't understand how to set it with right code.. Can you help me?
This is not perfect code (and I am sure there are better ways to do it), but the below should work. Just replace
} else { $LoginStr = "<p>".T("Please")." <a href='".Url('/entry/signin')."'>".T("Login ")."</a>".T("To See Premium Content")."</p>"; $context = preg_replace($pattern, $LoginStr, $body); }with
} else { $BaseVan = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'] . '/'; $LoginStr = "<p>".T("Please")." <a href='".Url('/entry/signin?Target='.$BaseVan.URL().'')."'>".T("Login ")."</a>".T("To See Premium Content")."</p>"; $context = preg_replace($pattern, $LoginStr, $body); }Got it, thanks so much master @Adrian
I'm very satisfied with it, and as a follow-up is possible when logged in to use pop up as the default login, I hope in the future
Glad it's working. I'm not a fan of the pop-up. I think this is best.