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.

Hide or cancel the 'Confirm Logout' confirmation and redirect to the portal at log out

View previous topic View next topic Go down

Solved Hide or cancel the 'Confirm Logout' confirmation and redirect to the portal at log out

Post by Guest on Fri 12 Dec - 0:23

Hi!

I'm not sure where to post this one. Forum Appearance or Scripts, but I had to choose one, so.


I want to be able to hide or cancel the 'Confirm Logout' confirmation and redirect members to the portal at log out when they do. How do I manage that?

Forum address: fcnl.actieforum.com

Sam.

Guest
Guest


Back to top Go down

Solved Re: Hide or cancel the 'Confirm Logout' confirmation and redirect to the portal at log out

Post by Ange Tuteur on Fri 12 Dec - 9:34

Hello Samantha,

When does this "confirmation" occur ? By logout from the navigation or toolbar ?

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Hide or cancel the 'Confirm Logout' confirmation and redirect to the portal at log out

Post by Guest on Fri 12 Dec - 9:39

@Ange Tuteur wrote:Hello Samantha,

When does this "confirmation" occur ? By logout from the navigation or toolbar ?

On both occasions. It's the "Are you sure you want to log out [Yes] [No]" thing. I want it to be gone. I don't have to confirm anything on www.game-xtreme.com , but on fcnl.actieforum.com I have to. Might this be one of the settings in the ACP maybe? And after log out, it should immediately redirect the logged out member to the portal page.

Guest
Guest


Back to top Go down

Solved Re: Hide or cancel the 'Confirm Logout' confirmation and redirect to the portal at log out

Post by SLGray on Fri 12 Dec - 10:18

The only time that you should see that is when you log out in the administration panel or by using the one in the toolbar. This occurs on all forum versions.


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 36705
Reputation : 2445
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

Solved Re: Hide or cancel the 'Confirm Logout' confirmation and redirect to the portal at log out

Post by Guest on Fri 12 Dec - 10:41

@SLGray wrote:The only time that you should see that is when you log out in the administration panel or by using the one in the toolbar. This occurs on all forum versions.

Yeah, I think you're right. I made a small misinterpretation on my board. I've got no log in / log out option in my navigation bar Razz . So, then, this is only happening when using the option from the FM notification bar. Could we suppress that and have the logged out user redirected to the portal page straight after logging out then, please?

Guest
Guest


Back to top Go down

Solved Re: Hide or cancel the 'Confirm Logout' confirmation and redirect to the portal at log out

Post by JScript on Fri 12 Dec - 12:47

@SamanthaS
Hi, try this:

In your ACP: Modules -> HTML&JAVASCRIPT -> JavaScript codes management -> [Create a new JavaScript]
Title *: <- Whatever you want
Placement : <- In all the pages
Javascript Code * : <- Select, copy and paste the code below in this field:
Code:

jQuery(function() {
 if (!_userdata.session_logged_in) {
 return false;
 }
 jQuery('a[href$="logout=1"]').attr('href', jQuery('#logout').attr('href'));
});
Then click in [Submit] button!


New code in: http://help.forumotion.com/t137386-hide-or-cancel-the-confirm-logout-confirmation-and-redirect-to-the-portal-at-log-out#928378

So long,

JS


Last edited by JScript on Fri 12 Dec - 15:25; edited 1 time in total (Reason for editing : New code link!)

JScript
Forumember

Male Posts : 741
Reputation : 168
Language : PT-BR, EN
Location : Brazil

http://jscript.forumeiros.com/

Back to top Go down

Solved Re: Hide or cancel the 'Confirm Logout' confirmation and redirect to the portal at log out

Post by Guest on Fri 12 Dec - 12:51

@JScript wrote:@SamanthaS
Hi, try this:

In your ACP: Modules -> HTML&JAVASCRIPT -> JavaScript codes management -> [Create a new JavaScript]
Title *: <- Whatever you want
Placement : <- In all the pages
Javascript Code * : <- Select, copy and paste the code below in this field:
Code:

jQuery(function() {
 if (!_userdata.session_logged_in) {
 return false;
 }
 jQuery('a[href$="logout=1"]').attr('href', jQuery('#logout').attr('href'));
});
Then click in [Submit] button!

So long,

JS

Obrigado. Tudo bem? I'm sorry Sad I just tried, nothing's happening... Hey, I know you from AvacWeb. You're with the elite force as well as I am, therefor I kinda trust you (I've seen your posts). If you need access to my board admin style, just say so!

Guest
Guest


Back to top Go down

Solved Re: Hide or cancel the 'Confirm Logout' confirmation and redirect to the portal at log out

Post by JScript on Fri 12 Dec - 13:05

Try this another code:

Code:

jQuery(function() {
 if (!_userdata.session_logged_in) {
 return false;
 }
 var _ToolBar = setInterval(function() {
 if (document.getElementById('fa_welcome') !== null) {
 jQuery('a[href$="logout=1"]').attr('href', jQuery('#logout').attr('href'));
 }
 }, 1000);
});


New code in: http://help.forumotion.com/t137386-hide-or-cancel-the-confirm-logout-confirmation-and-redirect-to-the-portal-at-log-out#928378

JS


Last edited by JScript on Fri 12 Dec - 15:26; edited 1 time in total (Reason for editing : New code link!)

JScript
Forumember

Male Posts : 741
Reputation : 168
Language : PT-BR, EN
Location : Brazil

http://jscript.forumeiros.com/

Back to top Go down

Solved Re: Hide or cancel the 'Confirm Logout' confirmation and redirect to the portal at log out

Post by Guest on Fri 12 Dec - 13:23

@JScript wrote:Try this another code:
Code:

jQuery(function() {
 if (!_userdata.session_logged_in) {
 return false;
 }
 var _ToolBar = setInterval(function() {
 if (document.getElementById('fa_welcome') !== null) {
 jQuery('a[href$="logout=1"]').attr('href', jQuery('#logout').attr('href'));
 }
 }, 1000);
});

JS

That one worked absolutely perfectly! TYVM! :rose: Now, how about that redirection to the portal page straight after logging out? Can you fix that one for me, please? Smile

Guest
Guest


Back to top Go down

Solved Re: Hide or cancel the 'Confirm Logout' confirmation and redirect to the portal at log out

Post by JScript on Fri 12 Dec - 13:56

SamanthaS wrote:Now, how about that redirection to the portal page straight after logging out? Can you fix that one for me, please? Smile

Okay, here it is:
Code:

if (localStorage.getItem("logout")) {
   localStorage.removeItem("logout");
   location.href = '/portal';
};
jQuery(function() {
   if (!_userdata.session_logged_in) {
      return false;
   }
   var _ToolBar = setInterval(function() {
      if (document.getElementById('fa_welcome') !== null) {
         clearInterval(_ToolBar);
         jQuery('a[href$="logout=1"]').attr('href', jQuery('#logout').attr('href'));

         jQuery('a[href*="logout=1"]').click(function(event) {
            localStorage.setItem("logout", 1);
         });
      }
   }, 1000);
});

JS


Last edited by JScript on Fri 12 Dec - 18:43; edited 2 times in total (Reason for editing : Improvements!)

JScript
Forumember

Male Posts : 741
Reputation : 168
Language : PT-BR, EN
Location : Brazil

http://jscript.forumeiros.com/

Back to top Go down

Solved Re: Hide or cancel the 'Confirm Logout' confirmation and redirect to the portal at log out

Post by Guest on Fri 12 Dec - 17:56

Oh, sweet! It didn't come up with the confirmation notification, so that's good, but it didn't redirect me to the portal straight after, yet... :/

Guest
Guest


Back to top Go down

Solved Re: Hide or cancel the 'Confirm Logout' confirmation and redirect to the portal at log out

Post by JScript on Fri 12 Dec - 18:18

@SamanthaS

In my code, search for this /portal and modify by the address you want, example:
/memberlist

It worked in my tests, so if you do the way I explained, will work too!

JS

JScript
Forumember

Male Posts : 741
Reputation : 168
Language : PT-BR, EN
Location : Brazil

http://jscript.forumeiros.com/

Back to top Go down

Solved Re: Hide or cancel the 'Confirm Logout' confirmation and redirect to the portal at log out

Post by Guest on Fri 12 Dec - 18:27

@JScript

Yay! Sublime!

Now, I got AWC (I don't need to tell you what that is Razz ) in an HTML page as well with the FM notification bar sitting at the top. When I use the log out there it doesn't use the script you just made. Could you add it to the following code for me below? Smile


Code:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script><script src="http://illiweb.com/rs3/85/frm/lang/nl.js" type="text/javascript"></script><script src="/37564.js" type="text/javascript"></script><style>
#avacweb_chat iframe{width:100%; Height:100%}
</style>
<div style="width: 100%; height: 100%;" id="chatholder">
</div>

<!-- START init_fa_toolbar -->
<script type="text/javascript" src="http://illiweb.com/rs3/85/frm/jquery/cookie/jquery.cookie.js"></script>
<script type="text/javascript" src="http://illiweb.com/rs3/85/frm/jquery/toolbar/FAToolbar.js"></script>
<script type="text/javascript" src="http://illiweb.com/rs3/85/frm/json/json2.js"></script>
<script type="text/javascript" src="http://illiweb.com/rs3/85/frm/jquery/printf/printf.js"></script>
<script type="text/javascript" src="http://illiweb.com/rs3/85/frm/jquery/dotdotdot/jquery.dotdotdot-1.5.6.js"></script>
<script type="text/javascript" src="http://illiweb.com/rs3/85/frm/jquery/notif/FA.js"></script>
<iframe id="fa_data" src="/" style="display:none"></iframe>
<div id="fa_style" style="display:none;"></div>
<script type="text/javascript">var _userdata = new Object(), _lang = new Object(), _board = new Object(), fa_data = document.getElementById('fa_data');
fa_data.onload = function() {
var fa = fa_data.contentWindow, fa_style = fa.document.getElementsByTagName('STYLE');

for (var i = 0; i<fa_style.length; i++) if (/#fa_toolbar/.test(fa_style[i].innerHTML)) document.getElementById('fa_style').appendChild(fa_style[i]);
for (var a in fa._userdata) _userdata[a] = fa._userdata[a];
for (var b in fa._lang) _lang[b] = fa._lang[b];
for (var c in fa._board) _board[c] = fa._board[c];

$(document).ready(Toolbar.init)
}</script>
<!-- END init_fa_toolbar -->

<STYLE TYPE="text/css">
<!--
body {background-image: url('http://i39.servimg.com/u/f39/19/05/73/25/sorryc11.jpg');background-repeat: no-repeat;background-attachment: fixed;background-position: center;}
#fa_toolbar {font-family: Verdana,Helvetica,Arial,sans-serif !important;font-weight: 700 !important;font-size: 0.9em !important;}
#fa_toolbar span {font-family: Verdana,Helvetica,Arial,sans-serif !important;font-weight: 700 !important;font-size: 0.9em !important;}
#fa_toolbar a {font-family: Verdana,Helvetica,Arial,sans-serif !important;font-weight: 700 !important;font-size: 0.9em !important;}
#fa_right {font-family: Verdana,Helvetica,Arial,sans-serif !important;font-weight: 700 !important;font-size: 0.9em !important;}
#fa_mail {display: none!important}
-->
</STYLE>

Guest
Guest


Back to top Go down

Solved Re: Hide or cancel the 'Confirm Logout' confirmation and redirect to the portal at log out

Post by JScript on Fri 12 Dec - 18:41

Ok!

Code:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
<script src="http://illiweb.com/rs3/85/frm/lang/nl.js" type="text/javascript"></script>
<script src="/37564.js" type="text/javascript"></script>
<style>
   #avacweb_chat iframe {
      width: 100%;
      Height: 100%
   }
</style>
<div style="width: 100%; height: 100%;" id="chatholder">
</div>

<!-- START init_fa_toolbar -->
<script type="text/javascript" src="http://illiweb.com/rs3/85/frm/jquery/cookie/jquery.cookie.js"></script>
<script type="text/javascript" src="http://illiweb.com/rs3/85/frm/jquery/toolbar/FAToolbar.js"></script>
<script type="text/javascript" src="http://illiweb.com/rs3/85/frm/json/json2.js"></script>
<script type="text/javascript" src="http://illiweb.com/rs3/85/frm/jquery/printf/printf.js"></script>
<script type="text/javascript" src="http://illiweb.com/rs3/85/frm/jquery/dotdotdot/jquery.dotdotdot-1.5.6.js"></script>
<script type="text/javascript" src="http://illiweb.com/rs3/85/frm/jquery/notif/FA.js"></script>
<iframe id="fa_data" src="/" style="display:none"></iframe>
<div id="fa_style" style="display:none;"></div>
<script type="text/javascript">
   var _userdata = new Object(),
      _lang = new Object(),
      _board = new Object(),
      fa_data = document.getElementById('fa_data');
   fa_data.onload = function() {
      var fa = fa_data.contentWindow,
         fa_style = fa.document.getElementsByTagName('STYLE');

      for (var i = 0; i < fa_style.length; i++)
         if (/#fa_toolbar/.test(fa_style[i].innerHTML)) document.getElementById('fa_style').appendChild(fa_style[i]);
      for (var a in fa._userdata) _userdata[a] = fa._userdata[a];
      for (var b in fa._lang) _lang[b] = fa._lang[b];
      for (var c in fa._board) _board[c] = fa._board[c];

      $(document).ready(Toolbar.init);

      jQuery(function() {
         if (!_userdata.session_logged_in) {
            return false;
         }
         var _ToolBar = setInterval(function() {
            if (document.getElementById('fa_welcome') !== null) {
               clearInterval(_ToolBar);
               jQuery('a[href$="logout=1"]').attr('href', jQuery('#logout').attr('href'));

               jQuery('a[href*="logout=1"]').click(function(event) {
                  localStorage.setItem("logout", 1);
               });
            }
         }, 1000);
      });
   }
</script>
<!-- END init_fa_toolbar -->

<STYLE TYPE="text/css">
   <!-- body {
      background-image: url('http://i39.servimg.com/u/f39/19/05/73/25/sorryc11.jpg');
      background-repeat: no-repeat;
      background-attachment: fixed;
      background-position: center;
   }
   #fa_toolbar {
      font-family: Verdana, Helvetica, Arial, sans-serif !important;
      font-weight: 700 !important;
      font-size: 0.9em !important;
   }
   #fa_toolbar span {
      font-family: Verdana, Helvetica, Arial, sans-serif !important;
      font-weight: 700 !important;
      font-size: 0.9em !important;
   }
   #fa_toolbar a {
      font-family: Verdana, Helvetica, Arial, sans-serif !important;
      font-weight: 700 !important;
      font-size: 0.9em !important;
   }
   #fa_right {
      font-family: Verdana, Helvetica, Arial, sans-serif !important;
      font-weight: 700 !important;
      font-size: 0.9em !important;
   }
   #fa_mail {
      display: none!important
   }
   -->
</STYLE>

So long,

JS

JScript
Forumember

Male Posts : 741
Reputation : 168
Language : PT-BR, EN
Location : Brazil

http://jscript.forumeiros.com/

Back to top Go down

Solved Re: Hide or cancel the 'Confirm Logout' confirmation and redirect to the portal at log out

Post by Guest on Fri 12 Dec - 18:47



ABSOLUTELY AWESOME DUDE! You don't know for how long I've been wanting this yk! You made me a very happy girl today! TYVM!

Warmest of my regards, e com Deus!

Samantha

PS: And this topic can be marked solved and please do archive it! Smile TY!

Guest
Guest


Back to top Go down

Solved Re: Hide or cancel the 'Confirm Logout' confirmation and redirect to the portal at log out

Post by Ange Tuteur on Fri 12 Dec - 21:12

Thanks for the help, JScript.

Topic archived

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

View previous topic View next topic Back to top


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