Remove Login Module *after* Login

General questions relating to Joomla! There are other boards for more specific help on Joomla! features and extensions.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
winuser
Joomla! Intern
Joomla! Intern
Posts: 99
Joined: Fri Aug 18, 2006 9:57 am

Remove Login Module *after* Login

Post by winuser » Thu Aug 31, 2006 9:20 am

I could not find the "New Topic" button in the Custom Development forum (which is probably where this message belongs), so I'll have to post my question here.

Very simply, I want to remove/unpublish the Login module after the user signs in. I use a direct "Logout" link on the user menu, so once a user has signed-in, the login module serves no purpose but to waste real estate.

If Joomla supported "min" and "max" access levels, it would be easy: I could just assign the module to Guests, and restrict it from User and above. But, Joomla's access control is not that sophisticated yet.

Is there a solution available?

Thanks in advance  ;D
Science • Education • Programming

winuser
Joomla! Intern
Joomla! Intern
Posts: 99
Joined: Fri Aug 18, 2006 9:57 am

Re: Remove Login Module *after* Login

Post by winuser » Thu Aug 31, 2006 1:21 pm

Sorry for bumping this topic; but this is on my "must-fix" list for today.

I'm confident that someone here has a good solution ;)
Science • Education • Programming

User avatar
zuze
Joomla! Explorer
Joomla! Explorer
Posts: 290
Joined: Sat Feb 11, 2006 9:43 pm
Location: Birmingham, USA
Contact:

Re: Remove Login Module *after* Login

Post by zuze » Thu Aug 31, 2006 2:27 pm

Maybe move it out of the way, closer to the bottom of the page.

I don't think you could do what you want to do, without modifying the code.

Keep in mind, that once you modify the code, any Joomla update becomes a diferent animal.

Why complicate? it does not take up that much space  8)
The key to your life is how well you deal with plan "B".
Latvian Project http://joomlacode.org/gf/project/joomla_latvian/ | http://www.joomlalv.org

winuser
Joomla! Intern
Joomla! Intern
Posts: 99
Joined: Fri Aug 18, 2006 9:57 am

Re: Remove Login Module *after* Login

Post by winuser » Thu Aug 31, 2006 2:49 pm

Well, I'm not sure that the solution must be complicated.

Is it possible to associate the login module with content, rather than a module position within the template? If so, then I could use some conditional logic to restrict the content  ;)

There are two recent bots: one which restricts content to guests (and only guests), and one which restricts content to registered users.

8)
Science • Education • Programming

winuser
Joomla! Intern
Joomla! Intern
Posts: 99
Joined: Fri Aug 18, 2006 9:57 am

Re: Remove Login Module *after* Login

Post by winuser » Fri Sep 15, 2006 9:55 am

I revisited this task today, with a clear head. The solution is ridiculously simple.

It is the relative "real estate" that drives me on this; I don't care that the login module is small. There really is a good reason for me to remove the login module after the user has signed on.

Here's one way to do it: (1) in the template file, conditionally load a 'guest' module position (i.e., if the id=0) wherever the login module should appear; (2) in the Administration backend, assign the login module (mod_login) to this guest position.

Now, guests see the login module, registered users have a direct "Logout" link on their usermenu, and the space previously occupied by the login module is used for something more practical to registered users.

Perfect!  8)
Science • Education • Programming

User avatar
leolam
Joomla! Master
Joomla! Master
Posts: 19603
Joined: Mon Aug 29, 2005 10:17 am
Location: Netherlands/ UK/ S'pore/Jakarta/ North America
Contact:

Re: Remove Login Module *after* Login

Post by leolam » Fri Sep 15, 2006 10:12 am

winuser wrote: Perfect!  8)
  ???

think you would be much better served by:
1. unpublishe the login module
2. make a menu link to component-login..........than the login and logout takes place in main body and no login module is ever shown

that is much better :)

just give it a try

cheers
Leo
Joomla's #1 Professional Support Provider:
-> Joomla Professional Support: https://gws-desk.com -
-> Joomla Specialized Hosting Solutions: https://gws-host.com -
-> Joomla Webmaster Services: gws-webmaster.services

winuser
Joomla! Intern
Joomla! Intern
Posts: 99
Joined: Fri Aug 18, 2006 9:57 am

Re: Remove Login Module *after* Login

Post by winuser » Fri Sep 15, 2006 10:44 am

Thank you, but the task was not to eliminate the login module (see title of this thread).

Also, are you sure you want to impose MORE clicks to sign on? I would prefer"name>password>click" to "click>wait for page load>name>password>click," wouldn't you?  ;)

I think your solution is intended for a different situation.
Science • Education • Programming

User avatar
leolam
Joomla! Master
Joomla! Master
Posts: 19603
Joined: Mon Aug 29, 2005 10:17 am
Location: Netherlands/ UK/ S'pore/Jakarta/ North America
Contact:

Re: Remove Login Module *after* Login

Post by leolam » Fri Sep 15, 2006 10:54 am

winuser wrote: Also, are you sure you want to impose MORE clicks to sign on? I would prefer"name>password>click" to "click>wait for page load>name>password>click," wouldn't you?  ;)
no i would not becasue i would never move and complicate proceeding as you have done anyhow. You have created a hack which might cost you more efforts in future updates where the standard and simple solution is indeed one click more but without any hacks. Besides that your argumentation is not valid since the logout has also a menu link which is separate to the modules as you state. In the component-link solution it is all in one...

Cheers
Leo
Joomla's #1 Professional Support Provider:
-> Joomla Professional Support: https://gws-desk.com -
-> Joomla Specialized Hosting Solutions: https://gws-host.com -
-> Joomla Webmaster Services: gws-webmaster.services

gws
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3842
Joined: Tue Aug 23, 2005 1:56 pm
Location: South coast, UK
Contact:

Re: Remove Login Module *after* Login

Post by gws » Fri Sep 15, 2006 11:03 am

Perhaps I am missing something here? Could you not publish the login module to only the home page, I assume that once guests have logged in they will move from the home page to registered content where there will be no loggin module? I strongly agree with Leo and others about not hacking the core code.

User avatar
SoftDux
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 223
Joined: Sun Oct 02, 2005 4:39 pm
Location: Johannesburg, South Africa
Contact:

Re: Remove Login Module *after* Login

Post by SoftDux » Fri Sep 15, 2006 12:14 pm

He's not hacking the core code :)

He added some hacked logic to his template, which is not a problem, since the templates are there to accomodate scenarios like this, right

Anyway, I think you're logic is good. Droopal for instance can do exactly what you want todo, so it might be worthwhile to log a feature request, to "remove the logon form once a user has logged on, and only give him the logout button"

gws
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3842
Joined: Tue Aug 23, 2005 1:56 pm
Location: South coast, UK
Contact:

Re: Remove Login Module *after* Login

Post by gws » Fri Sep 15, 2006 12:17 pm

@SoftDux yes your right, I read it too quickly.

winuser
Joomla! Intern
Joomla! Intern
Posts: 99
Joined: Fri Aug 18, 2006 9:57 am

Re: Remove Login Module *after* Login

Post by winuser » Fri Sep 15, 2006 12:33 pm

Where did all the misinformation come from?

My Logout link is direct. It is FASTER and EASIER than clicking the default Logout button. Look into this option if you are not familiar with it.

Hack? Nonsense.

I'm using a valid, supported expression type from the Joomla! engine to control the behavior of my template. Maybe you've seen it before; it looks something like this:



You are probably using this "hack" to control whether a specific class of modules should be rendered in your own templates.

What part of my solution prompted you guys to question my template needs? The point of my earlier message was to share the solution for a specific template behavior. My template is doing exactly what I want it to.

No need to presume; just read.

Again, thanks anyway.
Science • Education • Programming

User avatar
leolam
Joomla! Master
Joomla! Master
Posts: 19603
Joined: Mon Aug 29, 2005 10:17 am
Location: Netherlands/ UK/ S'pore/Jakarta/ North America
Contact:

Re: Remove Login Module *after* Login

Post by leolam » Fri Sep 15, 2006 2:19 pm

SoftDux wrote: (1).He's not hacking the core code :)
(2). to "remove the logon form once a user has logged on, and only give him the logout button"
to first : i agree also and ho (humble bow my head and apo  :-[  8)

to second: it does that....(remove the logon form once a user has logged on, and only give him the logout button") if you set the parameters right in the login module......i can give you a link to our testsite where it works complletely like that withoout issue..only a log-off button...........

@ winuser: you should not get agitated: not agreeing does not mean a war.....does it for you? Joomadesk uses experts who are extremely well informed about creating templates and the "
<?php if (some condition) mosLoadModules
" is very well known thank you  ;) i dd not had the impression this was about template behavior..i thought this was about a mod login and its behavior......

generally spoken:
You are probably using this "hack" to control whether a specific class of modules should be rendered in your own templates.
never thought about that in this post...we have no "own" templates as you refer to..sorry ;)

but mate, you post something, you get a reaction, you like it or not is not important is it? As long as you are happy with your solution it counts.......ONLY stay clear in mind to other's opinions? This is a forum where you can express your ideas and your opinions...you express yours others express theirs so respect each other ?

cheers
Lucky logon 8)

Leo
Joomla's #1 Professional Support Provider:
-> Joomla Professional Support: https://gws-desk.com -
-> Joomla Specialized Hosting Solutions: https://gws-host.com -
-> Joomla Webmaster Services: gws-webmaster.services

winuser
Joomla! Intern
Joomla! Intern
Posts: 99
Joined: Fri Aug 18, 2006 9:57 am

Re: Remove Login Module *after* Login

Post by winuser » Fri Sep 15, 2006 4:25 pm

Why is it that when senior members require hand-holding, they assume the poster is throwing a fit or being rude?

I am not agitated; however, I am developing a low tolerance for people who refuse to read but are quick to confuse a thread that I am working to keep concise and defined. I am happy to explain the problem.

First, notice that I started this thread with a request for how to do x. If you want to tell me how to do y, you may still demand a "thank you" or other acknowledgement, but do NOT attempt to sneak terms like 'agree' and 'debate' so conveniently into the thread  because you don't fully understand x. Fair enough?

Sorry, Leolam, but not every thread is open for debate or argument; please learn to discriminate.

Second, I am the one who posted the first valid solution to my particular problem. Then suddenly two members, both of whom should have known better, join the thread by questioning and criticizing that solution because they guess that they know more about my situation than I do.

I answered my own post for the sake of completeness. I see now that I should have left the thread hanging and just kept my work to myself. If I were a relatively new user trying to do something similar, I would find this thread more confusing than helpful.

In closing...
@Leolam: I can guarantee you that my direct logout link is as fast or faster than your logout button. Every experienced Joomla! user knows that the default logout procedure involves TWO clicks for completion. Please stop fixating on the button itself; that's not the issue.
Science • Education • Programming

User avatar
leolam
Joomla! Master
Joomla! Master
Posts: 19603
Joined: Mon Aug 29, 2005 10:17 am
Location: Netherlands/ UK/ S'pore/Jakarta/ North America
Contact:

Re: Remove Login Module *after* Login

Post by leolam » Fri Sep 15, 2006 4:51 pm

winuser wrote:
Second, I am the one who posted the first valid solution to my particular problem. Then suddenly two members, both of whom should have known better, join the thread by questioning and criticizing that solution because they guess that they know more about my situation than I do.
this is weird.....My friend,
you posted an issue...you found and posted a solution on the fact itself i applaud you...i did not criticize the solution ; i questioned the solution despite you knowing more about your situation than i definitely do. Your post on this forum is not only about you (!) but in the interest if many other users!  So just for my understanding: we are only allowed to join your threads unless we agree to your perception of solutions? this is rather (how shell i expresss myself....i do not know....)
but not every thread is open for debate or argument; please learn to discriminate
This makes me question the purpose of your thread...if no people are allowed to comment on your rather "glorious" solution why do you post it here than? This is a rhetoric question on which i do not care for nor expect an answer.......Where is the logout button on this?  ;) ooops found it!

cheers
Leo
Last edited by leolam on Fri Sep 15, 2006 5:05 pm, edited 1 time in total.
Joomla's #1 Professional Support Provider:
-> Joomla Professional Support: https://gws-desk.com -
-> Joomla Specialized Hosting Solutions: https://gws-host.com -
-> Joomla Webmaster Services: gws-webmaster.services

winuser
Joomla! Intern
Joomla! Intern
Posts: 99
Joined: Fri Aug 18, 2006 9:57 am

Re: Remove Login Module *after* Login

Post by winuser » Fri Sep 15, 2006 6:26 pm

Your sarcasm is childish and you clearly do not know when to stop or shut your mouth.

I would suggest that right about now is a good time; at this point you are contributing NOTHING to this thread.

I don't know how much clearer I can be.
Science • Education • Programming

User avatar
Predator
Joomla! Ace
Joomla! Ace
Posts: 1827
Joined: Wed Aug 17, 2005 10:12 pm
Location: Germany-Bad Abbach
Contact:

Re: Remove Login Module *after* Login

Post by Predator » Fri Sep 15, 2006 6:42 pm

Everything seems to be said so before it is getting more OT this thread is now closed.
The "Humor, Fun and Games" forum has  more than 2500 Posts, so why not build a "Humor, Fun and Games Working" Group?
.....
Malicious tongues say we have this WG right from the start, they call it core team :D


Locked

Return to “General Questions - 1.0.x”