Code updated 18.10.2010 to latest J1.5-21 The first way is to add a menu item to the login screen. In the Menu Manager select "New" and type "External Link". The url to use is http://www.yoursite.com/index.php?option=com_user&view=login You can also add it directly in your template at a suitable position and style it appropriately - <!--login link--> If we want to add a bit of user interactivity then we first need to get the users name with a JFactory call and store it in a variable which we place in the php section of the template - $username =& JFactory::getUser(); Then we can use this to greet the user if they are logged in and also provide a logout link. <!--login link--> |
|
| LAST_UPDATED2 |
























http://joomlacode.org/gf/project/login_protocol
This allows logging in by GET protocol, which means you can actually log in by klicking the link.
J!1.5 and J!1.7
Thanks,
thankyou...
www.emxource.com
"your development resource partner"
www.uaejobszone.com
Also, I needed a little extra - namely a link to the user's data in order for the user to change password and so on. In DNN you click the name and I find this to be a intuitive solution. Here's the complete code snippet for this:
<!--login link-->
<div id="loginlink">
<?php
if ($username->guest) {
echo '<a href="/index.php?option=com_user&view=login">Login</a>';
} else {
$name = $username->get('name');
echo 'Hi <a href="/index.php?option=com_user&view=user&layout=form">' . $name . '</a> - <a href="/index.php?option=com_user&view=login">Logout</a>';
}
?>
</div>
<!--end login link-->
please help.
Thanks!
artxComponentWrapper($document);
$username =& JFactory::getUser();
?>) .
Is that right?
thank you all so much!
Its working fine work nice
Thanks,
Helped me fix a problem! Thank you!
Line fixed....