Drupal 7 : Creating Horizontal Login Bar Without Module


/ Published in: PHP
Save to your folder(s)

Do you know that you can create a new form directly from theme template.php without the need of creating a module in Drupal 7?

Armed with that knowledge, we will build a new login form and transform it to become a horizontal login bar.

You might asked, why create a new login form while you can form alter the standard login block form (user_login_block) ? The reason for this is very simple, the standard login block form will be altered by other contribution module such as captcha module and it would not be possible to display the captcha in a tight spaced horizontal bar. Not to mentioned other standard module such as openid will also altered the module and adds its own html tag.

So by creating a new login form we will be able to create a clean and slim horizontal login bar without the worry about other contribution module messing the layout of our horizontal login bar.

To do this we need to add a few functions to the theme template.php.

URL: http://www.drupalstore.info/blog/drupal-7-creating-horizontal-login-bar-without-module

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.