Forums | Mahara Community

Developers /
Log in function

anonymous profile picture
Account deleted
Posts: 112

11 April 2010, 19:31


         I have moved the log in box to our header and my following code looks like this:

<form class="loginForm" name="login" method="post" action="" id="login">
<table border="0" cellpadding="0" cellspacing="0">
<td><div id="login_login_username_container" class="required text"><input id="login_login_username" name="login_username" tabindex="2" value="Email" onfocus="this.value=(this.value=='Email') ? '' : this.value;" onblur="this.value=(this.value=='') ? 'E-mail' : this.value;" type="text"></div></td>
<td><div id="login_login_password_container" class="password"><input class="password" id="login_login_password" name="login_password" tabindex="2" value="Password" onfocus="this.value=(this.value=='Password') ? '' : this.value;" onblur="this.value=(this.value=='') ? 'Password' : this.value;" type="password"></div></td>
<td><div id="login_submit_container" class="submit"><input class="submit" id="login_submit" name="submit" tabindex="2" value="Login" type="submit"></div></td>
<td><div id="login-helplinks"><a href="">Join Now</a><br><a href="" tabindex="2" id="login-helplinks">Lost Password</a><input class="hidden" id="login_sesskey" name="sesskey" value="" type="hidden"><input name="pieform_login" value="" type="hidden"></div></td>

Now I believe I have done this correctly but, have a few questions. ( I will be changing some of the css to reflect to e-mail instead of username.)

We wanted to have the users icon and a welcome message in place of the login box after logging in. The users icon should be linked to their profile page. Does anyone have an idea of how to do this? Thanks in advance.
anonymous profile picture
Account deleted
Posts: 112

12 April 2010, 14:08

Here is another question. I looked through the user files and noticed how the code was written. When I try to duplicate similar codes the correct images or name doesn't appear. Here is my code:

Welcome<a href="{$WWWROOT}user/view.php?id={$user->id}">{$user->id|display_name|escape}</a><a href="{$WWWROOT}artefact/file/profileicons.php" title="Change profile image"><img src="{$WWWROOT}thumb.php?type=profileicon&amp;maxwidth=25&amp;maxheight=25&amp;id={$user->id}" alt=""></a>

Does anyone know what I may be missing to get a basic welcome message with the users name and their profile icon?

We're removing the profile sideblock and moving it to our header.

Any Help is appreciated thanks.

anonymous profile picture
Account deleted
Posts: 112

13 April 2010, 5:16

My code was wrong and here is the new code:

Welcome Back&nbsp;<a href="{$WWWROOT}user/view.php?id={$USER->id}">{$USER|display_name}</a><a href="{$WWWROOT}artefact/file/profileicons.php" title="Change profile image"><img src="{$WWWROOT}thumb.php?type=profileicon&amp;maxwidth=25&amp;maxheight=25&amp;id={$USER->id}" alt=""></a>

This might be useful to some here in the community.



3 results