Hi!

I'd like to add some marketing friendly text for my client on the login page:
/user/login. How do I do this?

Also, same thing for the page once you have successfully logged in.. /user/3
I'd like to add some "welcome" text there with perhaps a link or two. How do i do that?

I'm new to drupal... so, step by step would be helpful.

Thanks!

Comments

yuvraj_jain’s picture

Just install the i tweak module that will definitely helping you towards this....
try it out...
http://drupal.org/project/itweak_login

Dotgarden’s picture

Thanks. I installed it, and it only gives me the option to add text to the registration page (in addition to changing the field names).

I'd like to edit the text for the login page, as well as the login success page.

How to I add text to these? You know, a paragraph?

monikagu’s picture

hi yuvraj.......
i think you hve installed itweak_login.
will u tell how i will i do it because i am facing problem.
thanx.

drupaledmonk’s picture

Try using custom template files for login/register and forgot password. Put in content you want before the login form.
page-user-login.tpl.php
page-user-register.tpl.php
page-user-password.tpl.php
Ask if you need any help!!

bjste’s picture

Hi - this was exactly what I was looking for too! However, could you tell me where to find/put those files?

monikagu’s picture

hi
if u recieve answer please tell me also.

bjste’s picture

Do anyone know where these files are located?

yuvraj_jain’s picture

put this files into your themes folder from where your theme is being rendered..

bjste’s picture

Thank you for your answer.....

but...I'm still not sure on how to do this...
What should the files i create contain?
Only the text that I want to show or do I have to copy some other file and paste the few lines of text into there?

Actually I was hoping that it would be possible just to edit the page (which I called login) and put in a piece of php
so that the owner of the page can edit the text which is displayed after login, without having to edit php files.

Do you know what I mean?

drupaledmonk’s picture

here is a stripped out registration page

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php print $language->language ?>" lang="<?php print $language->language ?>" dir="<?php print $language->dir ?>">

<head>
  <?php print $head; ?>
  <?php print $styles; ?>
  <?php print $scripts; ?>
  <script type="text/javascript"><?php /* Needed to avoid Flash of Unstyled Content in IE */ ?> </script>
</head>
<body class="<?php print $body_classes; ?>">
<div id="mainwrapper">
  <div class="header" >
</div>
  <div class="wrapper">
    <!-- navigation -->
    <div class="navigation">

<?php print $link_navigation;?>
      <div class="searchbox">
       <!-- <input type="text" value="Search" />
        <img src="sites/all/themes/droid/images/search_icon.gif"/>--><?php print $search_box;?><div class="login">&nbsp;&nbsp;<?php if(user_is_logged_in()){ echo '<a href="logout" style="color:#002bd1;">Logout </a>';}
else {echo '<a href="/user/login" style="color:#002bd1;">Login</a>&nbsp;/&nbsp;<a href="/user/register" style="color:#002bd1;">Register</a>';}?>&nbsp;&nbsp;</div> </div>
        
    </div>
    <div class="clearing"></div>
    <!--Flash banner endds -->
    <div class="menu-wrapper">
    <div class="menu-cols">

    <?php print $left_sidebar; ?>
</div>
<div class="content-cols">
<!--          <?php if (!empty($tabs)): ?><div class="tabs"><?php print $tabs; ?></div><?php endif; ?> -->
<center style="color:#002bd1;"><?php if (!empty($messages)): print $messages; endif; ?></center>         
<?php if (!empty($help)): print $help; endif; ?>
<?php print "<h4>Partner Registration</h4>";?>
    <?php print $content; ?></div>
      <div class="clearing"></div>
    </div>   
  <div class="clearing"></div>
  </div>
  <!--Wrapper ends -->
    <div id="footer"><div id="footer-content"><?php print $footer_message;?></div><div id="footer-content-copyright">Copyright &copy; 2010 . All Rights Reserved.</div></div>
</div>
<div class="clearing"></div>
<!--#mainwrapper ends -->
</body>
</html>

What do you mean by the owner of the page able to edit the text which is displayed.

texas-bronius’s picture

Hi- Some folks already recommended overriding with a custom template file (.tpl.php). Give a little searching for the zillions of tutorial explaining in depth while .tpl.php files are used, where to put them, and what caveats to avoid.

As for adding custom text that the client can modify, consider adding a block (/admin/build/block) that show/hides based on path. The path might be user/* or just user/register specifically, etc. The tricky part here will be how much access you want to grant the owner of the page (assumed you mean your client for whom you're building the site?). You can visit the user permissions page and give this role the ability to administer blocks..

Hope this helps somewhat :)

-Bronius

--
http://drupaltees.com
80s themed Drupal T-Shirts

bjste’s picture

I did choose to solve the problem like this:

global $user;
		
if ( $user->uid ) {
echo '<p>Welcome bla bla bbla</p>
}

Now the client can change the txt shown to logged in users at the login page.

adrianmak’s picture

I have these custom template files under my theme folder and flush all the cache.

However neither user login,register, request password page is being used.

My theme is ninesixty theme.

drupaledmonk’s picture

look at the info file as to where the template files are supposed to be located. sometimes you have to put them in a different folder under the theme itself.