Login button

Permalink
How can I put a login button in my theme?
Thank you

Fxxxx
 
fastcrash replied on at Permalink Best Answer Reply
fastcrash
why not just you copy the original login form from concrete5/single_pages/login.php, and put it in your theme. make it not mess with your css.

i put this in the heade.php theme
<?php
if($u->isRegistered()){ ?>
   <span class="login"><a href="<?php echo $this->url('/login', 'logout') ?>" class="style8"><?php echo t('Sign Out') ?></a> | 
    <a href="<?php echo $this->url('/profile', $u->uID) ?>" class="style8"><?php echo t('MyProfile') ?></a> | </span>
   <span class="login style8"> Hello <b><?php echo $u->getUserName() ?></b>,  today <?php echo strtolower(date('l d F Y')." at ". date('H:i a')) ?></span>
   <?php
}else{
?>
<form method="post" action="<?php echo $this->url('/login', 'do_login')?>" class="login">
   <span class="login-title" ><?php echo t(USER_REGISTRATION_WITH_EMAIL_ADDRESS == true ? 'Email Address' : 'Username') ?></span>
   <input class="login-input" type="text" name="uName" id="uName" <?php echo  (isset($uName)?'value="'.$uName.'"':'');?> >
   <span class="login-title"><?php echo t(' Password')?></span>
   <input class="login-input" type="password" name="uPassword" id="uPassword" >
   <?php echo $form->submit('submit', '', array(), 'login-submit')?>
   <?php echo $form->checkbox('uMaintainLogin', 1)?>


there is someone make free login add-on too, see in marketplace