Forum logout without confirmation Hitskin_logo Hitskin.com

This is a Hitskin.com skin preview
Install the skinReturn to the skin page

The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.
4 posters

    Forum logout without confirmation

    Van-Helsing
    Van-Helsing
    Hyperactive


    Male Posts : 2431
    Reputation : 116
    Language : English, Greek

    Solved Forum logout without confirmation

    Post by Van-Helsing Mon 24 Oct - 2:52

    Hello,
    I forgot the code for forum logging out without confirmation. scratch Can someone hep me?
    Ace 1
    Ace 1
    Helper
    Helper


    Male Posts : 843
    Reputation : 64
    Language : English - French?
    Location : Druid Hill Park

    Solved Re: Forum logout without confirmation

    Post by Ace 1 Mon 24 Oct - 16:10

    @Van-Helsing If you're talking about the Log out found in the toolbar, then add this to your JavaScripts:

    Code:
    $(function() {
      $('ul#fa_menulist li a').last().click(function(e) {
        $.get(this.href, function(data) {
          $('input[value="Yes"]', data).click();
        });
        e.preventDefault();
      });
    });
    Ch@lo Valdez
    Ch@lo Valdez
    Forumember


    Male Posts : 138
    Reputation : 50
    Language : spanish

    Solved Re: Forum logout without confirmation

    Post by Ch@lo Valdez Tue 25 Oct - 0:55

    try:

    Code:

    $(function () {
        $(function () {
            var b, c, a = document.getElementById('logout');
            if (a) {
                b = document.getElementById('fa_menulist');
                c = b && b.lastChild.childNodes[0];
                b.onclick = function () {
                    $.post('/login?logout' + '&tid=' + a.href.match(/(\w+)(?=\&key)/g)[0] + '&key=' + a.href.match(/(\w+)$/)[0] + '&confirm=1', function () {
                        window.location.reload()
                    });
                    return false
                };
            }
        });
    });
    Ch@lo Valdez
    Ch@lo Valdez
    Forumember


    Male Posts : 138
    Reputation : 50
    Language : spanish

    Solved Re: Forum logout without confirmation

    Post by Ch@lo Valdez Tue 25 Oct - 1:03

    more easy Smile

    Code:

    $(function () {
        $(function () {
            var b, c,d, a = document.getElementById('logout');
            if (a) {
                b = document.getElementById('fa_menulist');
                c = b && b.lastChild.childNodes[0];
                d = a.href;
                c.href = d;
             
            }
        });
    });
    Ace 1
    Ace 1
    Helper
    Helper


    Male Posts : 843
    Reputation : 64
    Language : English - French?
    Location : Druid Hill Park

    Solved Re: Forum logout without confirmation

    Post by Ace 1 Tue 25 Oct - 1:38

    Always with the non-AJAX (or even jQuery) JavaScript @Ch@lo Valdez.

    Good work.
    Van-Helsing
    Van-Helsing
    Hyperactive


    Male Posts : 2431
    Reputation : 116
    Language : English, Greek

    Solved Re: Forum logout without confirmation

    Post by Van-Helsing Thu 27 Oct - 1:30

    Hi dear all,
    Thanks a lot, I adapt it to fit on my forum because. I am not using the fa toolbar so I made some changes to work. Wink

    My problem has been solved.
    Hello
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51554
    Reputation : 3524
    Language : English
    Location : United States

    Solved Re: Forum logout without confirmation

    Post by SLGray Thu 27 Oct - 8:04

    Problem solved & topic archived.
    Please read our forum rules:  ESF General Rules



    Forum logout without confirmation Slgray10

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