Is there anyone out there that has successfully over-ridden the Login Form and Page in a Zen Sub-theme in D6? There are a ton of questions out there about customizing the Login form, but most are either D5 or have only limited explanation of the process to override the form if you are using a D6 Zen subtheme.
I've seen the pages addressing the issue here http://drupal.org/node/350634, and here http://drupal.org/node/19855, but when I try and kludge together the code with the snippets that people are suggesting that we use for Zen, I get no changes in my theme. Does anyone have an actual working copy of the changes to Zen template.php and user_login.tpl.php that give control over the User login block/page so we can include it here for future reference? An official theme reference page that includes the code like
/**
* Implementation of HOOK_theme().
*/
function zen_ninesixty_theme(&$existing, $type, $theme, $path) {
$hooks = zen_theme($existing, $type, $theme, $path);
// Add your theme hooks like this:
/*
$hooks['hook_name_here'] = array( // Details go here );
*/
// @TODO: Needs detailed comments. Patches welcome!
return $hooks;
}
function zen_ninesixty_preprocess_page(&$vars, $hook) {
// For easy printing of variables.
$vars['logo_img'] = $vars['logo'] ? theme('image', substr($vars['logo'], strlen(base_path())), t('Home'), t('Home')) : '';
$vars['linked_logo_img'] = $vars['logo_img'] ? l($vars['logo_img'], '<front>', array('rel' => 'home', 'title' => t('Home'), 'html' => TRUE)) : '';
$vars['linked_site_name'] = $vars['site_name'] ? l($vars['site_name'], '<front>', array('rel' => 'home', 'title' => t('Home'))) : '';
$vars['main_menu_links'] = theme('links', $vars['primary_links'], array('class' => 'links main-menu'));
$vars['secondary_menu_links'] = theme('links', $vars['secondary_links'], array('class' => 'links secondary-menu'));
showing where the new code snippets go would be helpful to those of us who only have a basic understanding of PHP.
Ideally the template functions should give the maximum amount of control over the individual elements (even the submit button if that is possible) and let us wrap the form elements like the User Name and Password fields in our own divs. I've tried for hours to figure out what the problem is with my attempts, but I can only modify the elements that are available already and can't get the user_login.tpl.php file to take.
Comments
Comment #1
Kurt Adamson commentedThese links should help you, info is spot on as far as i can see
http://11heavens.com/theming-the-contact-form-in-Drupal-6
http://11heavens.com/theming-the-register-form-in-Drupal-6
http://www.grump-it.net
Comment #2
crutch commentedsubscribe
Comment #3
iNade commentedSubscribe too, got problem with this.
Comment #4
akalata commentedClosing old and inactive support requests.
Comment #5
Mark F commentedVideo tutorial for horizontal login bar in Zen Subtheme here - hope it helps. https://mark-fuller.org/drupal-blog/horizontal-login-bar-using-zen-subtheme