Members: 16,996
Threads: 38,846
Posts: 159,391
Online: 24

Newest Member: Kl_broka@rediffmail.com


Odoo.tv - Outdoor Television


Sedo - Domains kaufen und verkaufen das Projekt mambers.com steht zum Verkauf Besucherstatistiken von mambers.com etracker® Web-Controlling statt Logfile-Analyse
Old 27.09.2004, 03:11   #1 (permalink)
Junior Mamber
 
Join Date: Sep 2004
Posts: 28
OffLead is on a distinguished road
Default User Login module

Okay, I'm putting the final structural touches on a new project. I'm relatively new to Mambo (but liking it much), and have a few questions. First up is the User Login module.

Currently this module loads with the login form for any un-signed-in user. That's fine. But once the user is logged in, I'd like to drop this module, and simply put a logout link into the User Menu.

1. Is it possible to have a module available to the public, but then have it go away once the user is logged in (and thus a Registered user)?

2. I assume I can add a "Logout" link into a menu as a URL, yes?

Thanks.
OffLead is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Old 27.09.2004, 13:16   #2 (permalink)
Baby Mamber
 
Join Date: Apr 2004
Location: Germany
Posts: 22
SensaiLee is on a distinguished road
Default Re: User Login module

You could try something like this:

In admin-menu set mod_login show up in module-position "user2".

In index.php of your template, insert the following code at the position where your login-module, or your logout-link should appear.

Code:
<?php
 if ($my->id) {
   mosLoadModules ( 'user2' );
 } else { ?>
   <a href="<?php echo sefRelToAbs("index.php?option=logout"); ?>"><?php echo _BUTTON_LOGOUT; ?></a>
<?php } ?>
Now position "user2" is only loaded when an unregistered user is viewing your site.
SensaiLee is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 27.09.2004, 18:57   #3 (permalink)
Junior Mamber
 
Join Date: Sep 2004
Posts: 28
OffLead is on a distinguished road
Default Re: User Login module

Thanks!

Actually, I solved this nicely this morning while searching for another component for another issue. The akologin mod does precisely what I wanted to do, moving the login form to the user menu, and once a user is logged in, replaces the login form with a link to log out. Works perfectly,

I like the logic of your solution also, and if I run into this issue in later versions may use it.
OffLead is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
User login how to questions. kkruecke Mambo 4.5.1 'How Do I' Questions 4 03.09.2004 14:09
...change design of login form and/or user menu mambofriis Mambo 4.5 'How Do I' Questions 2 28.07.2004 02:14
dTree module for phpshop - user manual prado Module 'How Do I' Questions 1 22.06.2004 20:08
Login Module Missing msmrmyr Mambo 4.5 Installation and Upgrades 0 10.06.2004 08:21
Modify the text of the Login Module? supes Module 'How Do I' Questions 2 12.04.2004 02:41


All times are GMT +2. The time now is 06:03.

Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
A vBSkinworks Design
© Copyright 2004-2008 by Arthur Konze Webdesign.