The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.

Create a free forum like this one.

problem with code redirects Association

Go down

problem with code redirects Association

Post by GAMSgr on January 31st 2017, 6:50 pm

(function() {
  var html_page = '/h10-Page',
      link_change = true,
      redirect = true;
  $(function() {
    var regex = new RegExp(html_page);
    // link change
    if (link_change && !regex.test(window.location.href)) {
      $('a[href^="/login"], a[href^="http://' + + '/login"]').attr('href', html_page);
    // redirect to classic if login page isn't available
    if (!document.getElementById('fa_form_container') && regex.test(window.location.href)) {
      window.location.href = '/login#login_classic';
  // login redirection
  // saves redirect location so you're taken to the correct page upon login
  if (/\/login\?redirect/.test(window.location.href)) {
    my_setcookie('fa_login_form_redirect',*?redirect=(.*?)(?:&|$)/, '$1'));
  // redirect
  if (redirect && /\/login/.test(window.location.href)) {
    if (/login_classic/.test(window.location.hash) || /admin=1/.test(window.location.href)) return;
    window.location.href = html_page;

I put this but it operates with the connection 

good night!


Posts : 88
Reputation : 1
Language : greek,english

Back to top Go down

Back to top

Permissions in this forum:
You cannot reply to topics in this forum