Please upgrade here. These earlier versions are no longer being updated and have security issues.

Redirect to original page after login with this plugin url

This discussion is related to the PremHide addon.
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 Vanilla Staff
    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

    Sharing is caring

    hgtonightjobbatam
  • 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 Vanilla Staff

    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);
            }
    

    Sharing is caring

    jobbatamBleistivthgtonight
  • 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 Vanilla Staff
    edited July 2015

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

    Sharing is caring

    jobbatam
Sign In or Register to comment.