Not signed in (Sign In)

Categories

Vanilla 1.1.5 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.
    • CommentAuthorastereo
    • CommentTimeJul 26th 2006
     # 1
    I have the guest sign in plugin installed for a few days, and just noticed today they guests trying to login through the form weren't having any luck. I came across this error after attempting to login:

    Fatal error: Call to a member function on a non-object in /home/devloung/public_html/forum/extensions/GuestSignIn/default.php on line 70

    My default is untouched besides the addition of an image next to the guest welcome title, and a custom signed in message. Any ideas?


    <?php
    /*
    Extension Name: Guest Sign in Message
    Extension Url: http://lussumo.com/addons/
    Description: Adds a sign in form to the panel if the person viewing the forum doesn't have an active session.
    Version: 1.0
    Author: WallPhone
    Author Url: http://wallphone.com/

    Portions Copyright 2003 - 2005 Mark O'Sullivan
    */

    // All definitions may be shortened to '', and the extension will try to make do with the current language file.
    $GuestSignIn_Title = 'Welcome, Guest';
    $GuestSignIn_Message = 'Join active discussions on various web topics by signing up for the devlounge community, or logging in below.';
    $GuestSignIn_User = '';
    $GuestSignIn_Pass = '';
    $GuestSignIn_Remember = '';
    $GuestSignIn_Submit = '';
    $GuestSignIn_Forgot = '';
    $GuestSignIn_Apply = '';


    // If this is defined, then it will appear as a message for signed in users.
    $GuestSignIn_Welcome = 'Glad to see you return. Take a look around for new topics since your last visit.';


    $GuestSignIn_Title = ( $GuestSignIn_Title ) ? $GuestSignIn_Title : $Context->Dictionary['NotSignedIn'];
    $GuestSignIn_User = ( $GuestSignIn_User ) ? $GuestSignIn_User : $Context->Dictionary['Username'];
    $GuestSignIn_Message = ( $GuestSignIn_Message ) ? $GuestSignIn_Message : '';
    $GuestSignIn_Pass = ( $GuestSignIn_Pass ) ? $GuestSignIn_Pass : $Context->Dictionary['Password'];
    $GuestSignIn_Remember =( $GuestSignIn_Remember )? $GuestSignIn_Remember: $Context->Dictionary['RememberMe'];
    $GuestSignIn_Submit = ( $GuestSignIn_Submit ) ? $GuestSignIn_Submit : $Context->Dictionary['SignIn'];
    $GuestSignIn_Forgot = ( $GuestSignIn_Forgot ) ? $GuestSignIn_Forgot : $Context->Dictionary['ForgotYourPassword'];
    $GuestSignIn_Apply = ( $GuestSignIn_Apply ) ? $GuestSignIn_Apply : $Context->Dictionary['ApplyForMembership'];

    if (in_array($Context->SelfUrl, array("account.php", "categories.php", "comments.php", "index.php", "search.php")) && $Context->Session->UserID == 0) {
    $Head->AddStyleSheet('extensions/GuestSignIn/style.css');
    $Panel->AddString('<div id="GuestSignIn">
    <h2><img src="http://www.devlounge.net/forum/themes/vanilla/styles/default/images/person-alt2.png" alt="Welcome" /> '.$GuestSignIn_Title.'</h2>
    ' . $GuestSignIn_Message . '
    <fieldset><form id="frmSignIn" method="post" action="'. GetUrl($Configuration, 'people.php') .'">
    <input name="PostBackAction" value="SignIn" type="hidden">
    <input name="ReturnUrl" value="" type="hidden">
    <ul>
    <li><label for="txtUsername">'. $GuestSignIn_User .'</label>
    <input id="txtUsername" name="Username" value="" class="Input" maxlength="20" type="text">
    </li>
    <li><label for="txtPassword">'. $GuestSignIn_Pass .'</label>
    <input id="txtPassword" name="Password" value="" class="Input" type="password">
    </li>
    <li id="RememberMe"><label for="RememberMeID">
    <input name="RememberMe" value="1" id="RememberMeID" type="checkbox" checked="checked"> '. $GuestSignIn_Remember .'</label>
    </li>
    </ul>
    <input name="btnSignIn" value="'. $GuestSignIn_Submit .'" class="Button" type="submit">
    </form></fieldset>
    <ul class="MembershipOptionLinks">
    <li class="ForgotPasswordLink"><a href="'.
    GetUrl($Configuration, 'people.php', '', '', '', '', 'PostBackAction=PasswordRequestForm'). '">'. $GuestSignIn_Forgot .'</a></li>
    <li class="ApplyForMembershipLink"><a href="'.
    GetURL($Configuration, 'people.php', '', '', '', '', 'PostBackAction=ApplyForm'). '">'. $GuestSignIn_Apply .'</a></li>
    </ul>
    </div>', 10);

    } else {
    if ( $GuestSignIn_Welcome )
    {
    $Head->AddStyleSheet('extensions/GuestSignIn/style.css');
    $Panel->Addstring('<div id="GuestSignIn"><h2><img src="http://www.devlounge.net/forum/themes/vanilla/styles/default/images/person-alt2.png" alt="Welcome" /> Welcome Back</h2>'.$GuestSignIn_Welcome.'</div>', 10);
    }
    }
    ?>
    •  
      CommentAuthorWallPhone
    • CommentTimeJul 26th 2006 edited
     # 2
    Hmm...

    OK., you need to modify that IF statement at the end to read like this:if ( $GuestSignIn_Welcome && $Context->SelfUrl <> "people.php" )
    I like the change you tried to make, mind if I include it in the next version of this extension?
    • CommentAuthorastereo
    • CommentTimeJul 26th 2006
     # 3
    Sure it's no problem. I'll give this a shot, thanks for your reply
Add your comments
    Username Password
  • Format comments as