Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Redirect to original page after login with this plugin url

jobbatamjobbatam Batam New
edited July 2015 in Vanilla 2.0 - 2.8

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

Tagged:

Comments

  • AdrianAdrian Wandering Spirit Montreal MVP
    edited July 2015

    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

  • jobbatamjobbatam Batam New
    edited July 2015

    Hi @Adrian I see, but I don't understand how to set it with right code.. Can you help me? :awesome:

  • AdrianAdrian Wandering Spirit Montreal MVP

    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);
            }
    
  • jobbatamjobbatam Batam New

    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 B)

  • AdrianAdrian Wandering Spirit Montreal MVP
    edited July 2015

    Glad it's working. I'm not a fan of the pop-up. I think this is best.

Sign In or Register to comment.