Loading ...

How to creare horizontal login form

Board index / PHP Melody - Video CMS / PHP Melody 1.6.x (old version)

Forums for the previous PHP Melody version (1.6.x)

Postby Nathan on Oct 11, 2011 11 am


Hi,

How can i change the login form from a block one to a horizontal login form?

Instead of this:
Username
-------------
-------------
Password
-------------
-------------
Login


To this:
Username:----------- Password:---------Login Forgot Your Password.



Thanks,


Cheers....
Nathan
Non-verified
Non-verified
 
Posts: 54
Joined: Apr 26, 2011 7 am
Reputation points: 0

Postby Trace on Oct 11, 2011 11 am


In the template for the login body (login_body.tpl), by default the content should be this:
Code: Select all
<form name="login_form" method="post" action="{$smarty.const._URL}/login.php">
<table width="100%" border="0" cellspacing="2" cellpadding="2">
  <tr>
    <td>{$lang.username}<br />
    <input name="username" type="text" size="15" class="inputtext" /></td>
  </tr>
  <tr>
    <td>{$lang.password}<br />
      <input name="pass" type="password" size="15" class="inputtext" />
   </td>
  </tr>
  <tr>
  <td>
  <input name="remember" type="checkbox" value="1" {if $smarty.post.remember} checked="checked"{/if} />
      {$lang.remember_me}
  </td>
  </tr>
  <tr>
    <td><label>
   <input type="hidden" name="ref" value="{$ref}" />
      <input type="submit" name="Login" value="{$lang.login}" class="inputbutton" />
    </label></td>
  </tr>
  <tr>

    <td><span class="signup"><a href="{$smarty.const._URL}/login.{$smarty.const._FEXT}?do=forgot_pass">{$lang.forgot_pass}</a></span></td>

  </tr>
</table>
</form>
Replace with this to fix:
Code: Select all
<form name="login_form" method="post" action="{$smarty.const._URL}/login.php">
<table width="100%" border="0" cellspacing="2" cellpadding="2">
  <tr>
    <td>{$lang.username}<br />
    <input name="username" type="text" size="15" class="inputtext" /> {$lang.password}<br />
      <input name="pass" type="password" size="15" class="inputtext" />
  <input name="remember" type="checkbox" value="1" {if $smarty.post.remember} checked="checked"{/if} />
      {$lang.remember_me}
<label>
   <input type="hidden" name="ref" value="{$ref}" />
      <input type="submit" name="Login" value="{$lang.login}" class="inputbutton" />
    </label><span class="signup"><a href="{$smarty.const._URL}/login.{$smarty.const._FEXT}?do=forgot_pass">{$lang.forgot_pass}</a></span></td>

  </tr>
</table>
</form>
Note that this is just a crude fix, you can just edit the html in a way that suits you in this file.
User avatar
Trace
Verified Customer
Verified Customer
 
Posts: 2543
Joined: Aug 16, 2010 3 pm
Location: The Netherlands
Reputation points: 1329

Postby Nathan on Oct 11, 2011 11 am


Thanks Trace, i will give a try and let you know.
Nathan
Non-verified
Non-verified
 
Posts: 54
Joined: Apr 26, 2011 7 am
Reputation points: 0


Who is online

Users browsing this forum: No registered users and 1 guest