Login Page displays Site Name in Settings...how to change that?
I'm using 4.7 and the Blue_Bars theme. I've modified the css quite a bit, but nothing else. Just the css files (there are margin/padding issues between IE and FireFox as well and I have not attempted to fix them with a box hack trick...if anyone has a good suggestion or tell me how then by all means, please do so).
When you go to the user login page, it displays what you put in the Settings -> Name field. The nice thing about Drupal 4.7 is that you can use html to put a picture in there and it displays the pic where the name is on the site. Makes things easy, but when they go to the login page, it puts that picture in there and just looks ugly of course.
How can I go in and change it so it does not do that?
You can see the dilemna here: http://ngl.gamersides.com/user/login (logins are disabled)
This is the code when you view the source. What can I change to where it will just display some text instead of the picture?
<!-- begin content --><form action="/user/login" method="post" id="user_login">
<div><div class="form-item">
<label for="edit-name">Username:<span class="form-required" title="This field is required.">*</span></label>
<input type="text" maxlength="60" name="edit[name]" id="edit-name" size="30" value="" tabindex="1" class="form-text required" />
<div class="description">Enter your <img src=http://ngl.gamersides.com/themes/blue_bars/ngl_logo.jpg> username.</div>
</div>
<div class="form-item">
<label for="edit-pass">Password:<span class="form-required" title="This field is required.">*</span></label>
<input type="password" maxlength="" name="edit[pass]" id="edit-pass" size="30" tabindex="2" class="form-text required" />
<div class="description">Enter the password that accompanies your username.</div>
</div>
<input type="hidden" name="edit[form_id]" id="edit-form_id" value="user_login" />
<input type="submit" name="op" value="Log in" tabindex="3" class="form-submit" />
</div></form>
<!-- end content -->
This is in the User Module...
Is there something in here that I can change so that it won't display that and just a few words instead? I'm not a php guru by any means.
// Registration and login pages.$items[] = array('path' => 'user/login', 'title' => t('log in'),
'callback' => 'user_login', 'type' => MENU_DEFAULT_LOCAL_TASK);
$items[] = array('path' => 'user/register', 'title' => t('register'),
'callback' => 'user_register', 'access' => $user->uid == 0 && variable_get('user_register', 1), 'type' => MENU_LOCAL_TASK);
$items[] = array('path' => 'user/password', 'title' => t('request new password'),
'callback' => 'user_pass', 'access' => $user->uid == 0, 'type' => MENU_LOCAL_TASK);
$items[] = array('path' => 'user/reset', 'title' => t('reset password'),
'callback' => 'user_pass_reset', 'access' => TRUE, 'type' => MENU_CALLBACK);
$items[] = array('path' => 'user/help', 'title' => t('help'),
'callback' => 'user_help_page', 'type' => MENU_CALLBACK);
-------------------------------------------------------
http://gamersides.com
http://ngl.gamersides.com
I think it would be more
I think it would be more helpful to go over what you did. It's not a good idea to change anything in the core Drupal files and there is probably a simpler way to get what you are looking for.
I never changed any core Drupal files...
The only changes I have made are in CSS...I was just looking at where I might be able to change it so that the login page does not display the image I use for the Title.
-------------------------------------------------------
http://gamersides.com
http://ngl.gamersides.com
Ah, I see. I hadn't tried to
Ah, I see. I hadn't tried to put HTML into the name field before...
I think you would have to avoid doing this and go with another method of text/image replacement; something css based that hides the title text and uses background-image to show the picture you want. Otherwise it will show up in odd places, like your login form.
You could use regex...
I replaced the "Enter your username" text on the login page using something like this:
In your template.php:
if((arg(0) == "user") && (arg(1) == "")){
$pattern = '<div class="description">Enter your ' . $site_name. ' username.</div>';
$replacement = '<div class="description">Whatever</div>';
$content = eregi_replace($pattern, $replacement, $content);
print($content);
}
else
{
print($content);
}