Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Login box to FrontPage / Categories

Hi, I'm planning on moving from phpbb to new platform and Vanilla seems nice, but I'm having problems with few things.
Most annoying bumb I have faced is login. I would love to move the default installed login box ( the one that opens from frontpage ) to
actually be in frontpage, without the extra steps for it.
I've tried to code it there with my very limited skills / knowledge without success. I also have tried to search for topics / plugins for it and it seems not many ppl with same problem around. Latest topics about the issue were like 5-6 years old.

So, How would I get that email/login & pw box to be in frontpage?

Comments

  • Options

    Do you want there to be a login module on the home, or do you want the home just to be login?

    If it is the latter

    $Configuration['Routes']['DefaultController'] = 'entry';

    in conf/config.php would work

    grep is your friend.

  • Options

    No, I actually want the login boxes, buttons, etc be inside the "homepage". I have set categories as the homepage. Right now it says right-top corner "Howdy stranger....". So I would like to replacate that with the login boxes / buttons.

  • Options

    There are many ways to do this this is probably the simplest. it would apply across all pages.

    in your theme create a file /views/modules/guest.php (creating the directories as needed

    put inside

    <?php if (!defined('APPLICATION')) exit(); ?>
      <div class="Box GuestBox">
         <h4><?php echo T('Sign In'); ?></h4>
         <?php $this->FireEvent('BeforeSignInButton'); ?>
         <?php
            $Target = Gdn::Request()->PathAndQuery();
            if ($Target != '')
               $Target = '?Target='.urlencode($Target);
            $Controller = Gdn::Controller();
         ?>
          <div class="MainForm MySignIn">
             <?php
             echo $Controller->Form->Open(array('Action' => Url('/entry/signin'.$Target), 'id' => 'Form_User_SignIn'));
             echo $Controller->Form->Errors();
             ?>
             <ul>
                <li>
                   <?php
                      echo $Controller->Form->Label('Email/Username', 'Email');
                      echo $Controller->Form->TextBox('Email');
                   ?>
                </li>
                <li>
                   <?php
                      echo $Controller->Form->Label('Password', 'Password');
                      echo $Controller->Form->Input('Password', 'password', array('class' => 'InputBox Password'));
                      echo Anchor(T('Forgot?'), '/entry/passwordrequest', 'ForgotPassword');
                   ?>
                </li>
                <li class="Buttons">
                   <?php
                      echo $Controller->Form->Button('Sign In');
                      echo $Controller->Form->CheckBox('RememberMe', T('Keep me signed in'), array('value' => '1', 'id' => 'SignInRememberMe'));
                   ?>
                </li>
                <?php if (strcasecmp(C('Garden.Registration.Method'), 'Connect') != 0): ?>
                <li class="CreateAccount">
                   <?php
    
    
                      printf(T("Don't have an account? %s"), Anchor(T('Create One.'), '/entry/register'.$Target));
                   ?>
                </li>
                <?php endif; ?>
             </ul>
             <?php
             echo $Controller->Form->Close();
             echo $Controller->Form->Open(array('Action' => Url('/entry/passwordrequest'), 'id' => 'Form_User_Password', 'style' => 'display: none;'));
             ?>
             <ul>
                <li>
                   <?php
                      echo $Controller->Form->Label('Enter your Email address or username', 'Email');
                      echo $Controller->Form->TextBox('Email');
                   ?>
                </li>
                <li class="Buttons">
                   <?php
                      echo $Controller->Form->Button('Request a new password');
                      echo Wrap(Anchor(T('I remember now!'), '/entry/signin', 'ForgotPassword'), 'div');
                   ?>
                </li>
             </ul>
             <?php echo $Controller->Form->Close(); ?>
          </div>
         <?php $this->FireEvent('AfterSignInButton'); ?>
      </div>
    

    grep is your friend.

  • Options

    Indeed, exactly what I was looking for. To push this forum a bit further, just need a nod to right direction.
    Would I be able to place other applications ( Are these called that? ) to side panel similar way?

  • Options
    x00x00 MVP
    edited April 2013

    It depends what you are talking about.

    You can create modules, and add them to the Panel (sidebar). You would have to look at docs an how various plugins do this.

    grep is your friend.

Sign In or Register to comment.