login
Login and Register on the Same Page with Custom Error module
Code for the customerror 403 access denied page.
<?php
drupal_add_js('misc/collapse.js');
drupal_add_js('misc/drupal.js');
?>
<div id="user_login_inner">
<div id="user_login_outer">
<div id="user_login_msg">
With your FREE account, you can:
<ul>
<li>Post articles and stories</li>
<li>Add local area events</li>
<li>Add a directory listing</li>
</ul>
</div>
<div id="user_login_area">
<div id="user_login_login">
<fieldset>
<legend><?php print t("Login"); ?></legend>
<div class="fieldset-wrapper">
<h2><?php print t(""); ?></h2>
<?php print drupal_get_form('user_login'); ?>
</div>
</fieldset>
</div>
<div id="user_login_register">
<fieldset>
<legend><?php print t("Register"); ?></legend>
<div class="fieldset-wrapper">
<h2><?php print t(""); ?></h2>
<?php print drupal_get_form('user_register'); ?>
</div>
</fieldset>
</div>
</div>
</div>
</div>Hide and Show the Login Block
I found this little gym written by Jim Skowyra at http://anthonymedia.com/content/hide-and-show-login-block.
A member of the Western Massachusetts Drupal Users Group posed the question, 'what techniques do you use to hide or display a login block?' As this is a feature that gets request with some regularity, I started playing around with a jQuery solution. You can see it in action by pressing the login link in the upper right corner of this site, just under the primary links.
Here's how I did it.
First, I created a file called login.js that contained this code: