Not signed in (Sign In)

Categories

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.

Help keep Vanilla free:
Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    •  
      CommentAuthorlech
    • CommentTimeJul 17th 2005
     # 1
    Ok, I've been thinking about this and it might prove useful if you're running vanilla in a closed off from the public mode. Most other boards support it lightly and I don't see why vanilla can't too :) So here's the idea:

    1. You send me a link to some thread.
    2. I'm turned away to the login/logout page so I have to log in before I can see the thread. (this is fine up to here)
    3. I'm logged in and dumped into discussions instead of being pointed at the thread I requested earlier.(the kicker)

    The solution: take that initial request and turn it into a hidden field to forward the user to after logging in. If it's valid and exists take them to the thread they initially requested. else toss them back to the default discussions index. :)

    here's a dirty little example.


    function camefrom($url) {
    if (!is_string($url)) return "mostrecent.php";

    $cutup = parse_url($url);

    $thehost = $cutup[host];
    $thepath = $cutup[path];
    $newpath = "index.php";

    // if they cam from the login/logout or join pages, wipe it, else forward them to the initial request.
    $output = ($thehost == "domain.com" ?
    ($thepath == "/logout.php" ? $newpath :
    ($thepath == "/login.php" ? $newpath :
    ($thepath == "/join.php" ? $newpath :
    $url ))) : $newpath );
    return $output;
    }
    •  
      CommentAuthorMark
    • CommentTimeJul 17th 2005
     # 2
    Yeah - good idea. I'll do that for v0.9.2
    •  
      CommentAuthorlech
    • CommentTimeJul 17th 2005
     # 3
    wewt!
Add your comments
    Username Password
  • Format comments as