The Joomla! Forum ™



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.



Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 44 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Thu Oct 16, 2008 7:37 am 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Oct 15, 2008 3:31 pm
Posts: 17
Location: Israel
I'm using Joomla! 1.5
I've been trying to set up a link to allow users to logout (instead of the logout button).

I've managed to do this, by pointing a menu item to:
Code:
index.php?option=com_user&task=logout


joomla adds
Code:
&Itemid=136
because it's a menu item.

With or without the itemid, the user is taken to a blank page. Since I'm not invoking the login module directly, I suppose that's why my settings aren't taken from there.

How do I get the user to the start page instead of an empty page?
Any ideas?

_________________
http://www.actionbase.com ActionBase - Connecting People & Process
Signature rules - only literal url's


Top
 Profile  
 
PostPosted: Thu Oct 16, 2008 1:58 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Thu Jul 17, 2008 3:10 pm
Posts: 10951
Location: Ireland
As far as I know you will need to use a Form to submit this, as you need some of the hidden fields to logout.

Olaf

_________________
Olaf Offick - Global Moderator
http://learnskills.org


Top
 Profile  
 
PostPosted: Thu Oct 16, 2008 2:11 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Oct 15, 2008 3:31 pm
Posts: 17
Location: Israel
Hi, olaf.

Thanks, but I've managed to logout successfully.
It's the page I'm taken to that is bothering me.

However, maybe a form is the way to go in order to tell Joomla what to do. I'll put a link with a POST method.
But then I need to process the form, which I'm not sure what to do with.

Now I just need to figure out how to do that.

Anyone got an idea?

J.

_________________
http://www.actionbase.com ActionBase - Connecting People & Process
Signature rules - only literal url's


Top
 Profile  
 
PostPosted: Thu Oct 16, 2008 2:15 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Thu Jul 17, 2008 3:10 pm
Posts: 10951
Location: Ireland
well, you might want to try to add the hidden base64 encoded return URL parameter as well, I am not sure if you used that.

Olaf

_________________
Olaf Offick - Global Moderator
http://learnskills.org


Top
 Profile  
 
PostPosted: Thu Oct 16, 2008 3:37 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Oct 15, 2008 3:31 pm
Posts: 17
Location: Israel
ooffick wrote:
well, you might want to try to add the hidden base64 encoded return URL parameter as well, I am not sure if you used that.

Olaf

I didn't use a form at all.

I created a menu with a single menu item, of a "link" type, that points to the logout url.

Should I replace this with a custom html module and write a small form, with a link and "post" method?

J.

_________________
http://www.actionbase.com ActionBase - Connecting People & Process
Signature rules - only literal url's


Top
 Profile  
 
PostPosted: Thu Oct 16, 2008 3:48 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Thu Jul 17, 2008 3:10 pm
Posts: 10951
Location: Ireland
Sorry, what I meant was add the parameter return=[your-base64-encoded-return-URL] so your URL looks like this:
Code:
index.php?option=com_user&task=logout&return=L2luZGV4LnBocD90cD0x


Olaf

_________________
Olaf Offick - Global Moderator
http://learnskills.org


Top
 Profile  
 
PostPosted: Thu Oct 16, 2008 3:59 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Oct 15, 2008 3:31 pm
Posts: 17
Location: Israel
ooffick wrote:
Sorry, what I meant was add the parameter return=[your-base64-encoded-return-URL] so your URL looks like this:
Code:
index.php?option=com_user&task=logout&return=L2luZGV4LnBocD90cD0x


Olaf


Oooooh. Sweet.
I'll have to try this next week.

Thanks a mil, Olaf!

_________________
http://www.actionbase.com ActionBase - Connecting People & Process
Signature rules - only literal url's


Top
 Profile  
 
PostPosted: Thu Oct 23, 2008 9:36 am 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Oct 15, 2008 3:31 pm
Posts: 17
Location: Israel
ooffick wrote:
Sorry, what I meant was add the parameter return=[your-base64-encoded-return-URL] so your URL looks like this:
Code:
index.php?option=com_user&task=logout&return=L2luZGV4LnBocD90cD0x


Olaf


Okay, I tried playing around with this, but it didn't work out.

a. I'm either not properly encoding my URL.
b. Joomla doesn't automatically decode the URL (would I need to parse it myself in PHP?)
c. I'm completely off target.

How should I encode the URL? Should I do it once, and then paste the code into the return parameter?

Should I still be using a menu with a link, or should I render my own <div> with a link inside?

Thanks for your help.

_________________
http://www.actionbase.com ActionBase - Connecting People & Process
Signature rules - only literal url's


Top
 Profile  
 
PostPosted: Thu Oct 23, 2008 10:16 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Thu Jul 17, 2008 3:10 pm
Posts: 10951
Location: Ireland
Which Joomla version do you use?
Which URL do you want to link to?

Olaf

_________________
Olaf Offick - Global Moderator
http://learnskills.org


Top
 Profile  
 
PostPosted: Thu Oct 23, 2008 11:40 am 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Oct 15, 2008 3:31 pm
Posts: 17
Location: Israel
I'm using Joomla 1.5

I'd like the logout link to go to the homepage when clicked.

I tried encoding "/".

I tried encoding the full URL (it's on our intranet).
I tried using the encoder I foundwhile googling the subject.

_________________
http://www.actionbase.com ActionBase - Connecting People & Process
Signature rules - only literal url's


Top
 Profile  
 
PostPosted: Thu Oct 23, 2008 12:23 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Thu Jul 17, 2008 3:10 pm
Posts: 10951
Location: Ireland
Can you try this one:

Code:
index.php?option=com_user&task=logout&return=aW5kZXgucGhw


Do you have access to your error log file? to see if there are any errors? Do you have PHP4 or PHP5?

Olaf

_________________
Olaf Offick - Global Moderator
http://learnskills.org


Top
 Profile  
 
PostPosted: Thu Oct 23, 2008 12:32 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Oct 15, 2008 3:31 pm
Posts: 17
Location: Israel
1. You ROCK. It works.
2. What did you do, and how would I go about doing it myself, in the future?
Ah... I see

Code:
"aW5kZXgucGhw" = index.php


ok. But then, what if I want to use SEF URLs?

3. We're using PHP5. Is there something specific you're interested in from the error log?

_________________
http://www.actionbase.com ActionBase - Connecting People & Process
Signature rules - only literal url's


Top
 Profile  
 
PostPosted: Thu Oct 23, 2008 12:33 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Oct 15, 2008 3:31 pm
Posts: 17
Location: Israel
jonactionbase wrote:
ok. But then, what if I want to use SEF URLs?



You encode the name of the page you'd like to go to, genius.

But really, what if I just want it to go to the root...?

_________________
http://www.actionbase.com ActionBase - Connecting People & Process
Signature rules - only literal url's


Top
 Profile  
 
PostPosted: Thu Oct 23, 2008 12:43 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Thu Jul 17, 2008 3:10 pm
Posts: 10951
Location: Ireland
The index.php file is the root.
SEF is not a problem as the other files work as the SEF file works as well.

But you could also try this one:
Code:
index.php?option=com_user&task=logout&return=Lw


Olaf

_________________
Olaf Offick - Global Moderator
http://learnskills.org


Top
 Profile  
 
PostPosted: Thu Oct 23, 2008 12:58 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Oct 15, 2008 3:31 pm
Posts: 17
Location: Israel
Aaah.

'cos the calculator kept encoding "/" it as "Lw==" and I couldn't find a way to encode the URL properly.

Great.

Now All Is Well.

Thanks again, Olaf!

J.

_________________
http://www.actionbase.com ActionBase - Connecting People & Process
Signature rules - only literal url's


Top
 Profile  
 
PostPosted: Sat Jan 31, 2009 4:39 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Fri Jan 30, 2009 12:57 pm
Posts: 1
ooffick wrote:
The index.php file is the root.
SEF is not a problem as the other files work as the SEF file works as well.

But you could also try this one:
Code:
index.php?option=com_user&task=logout&return=Lw


Olaf

This is exactly what I came searching to find today.
Thank you. :)


Top
 Profile  
 
PostPosted: Wed Feb 04, 2009 3:50 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Dec 17, 2008 6:27 pm
Posts: 27
Thats awesome!
I had completely forgot that I was trying to do this. It works great, thanks for the posts!

_________________
Jason P Bunn
Web Developer
http://www.virburbia.com


Top
 Profile  
 
PostPosted: Wed Feb 04, 2009 4:49 pm 
User avatar
Joomla! Intern
Joomla! Intern

Joined: Thu Nov 13, 2008 7:32 pm
Posts: 51
Location: Mexico
Great, it works just fine, thanks!


Top
 Profile  
 
PostPosted: Wed Feb 11, 2009 1:31 pm 
User avatar
Joomla! Fledgling
Joomla! Fledgling

Joined: Wed Feb 11, 2009 12:31 pm
Posts: 1
Hey everybody! this post helped me a lot!
Here you can encode text to 64:
http://www.motobit.com/util/base64-decoder-encoder.asp

_________________
Please read forum rules regarding signatures: viewtopic.php?f=8&t=65


Top
 Profile  
 
PostPosted: Wed Mar 25, 2009 4:58 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Feb 24, 2009 11:10 pm
Posts: 9
I want only to thank Olaf as he saved me time today, he gave two solutions, one on my thread and this one for url to logout
You are so loved Olaf, if you need help in satellite just google my name

marahibsat


Top
 Profile  
 
PostPosted: Mon May 11, 2009 10:19 am 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Apr 08, 2009 1:17 am
Posts: 19
Olaf, Joomla Hero!!!
Thanks

_________________
ProPymeChile


Top
 Profile  
 
PostPosted: Thu May 21, 2009 5:03 pm 
Joomla! Intern
Joomla! Intern

Joined: Thu Sep 27, 2007 4:40 pm
Posts: 51
Life saver! Exactly what I was looking for. :D :D :D

Thanks Olaf


Top
 Profile  
 
PostPosted: Sat Jun 13, 2009 12:46 am 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Thu Aug 09, 2007 2:08 pm
Posts: 115
Could anyone explain me how to do this?

I always get the Menu item number at the end of the link.

Thnx


Top
 Profile  
 
PostPosted: Sat Jun 13, 2009 8:33 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Thu Jul 17, 2008 3:10 pm
Posts: 10951
Location: Ireland
You can set the URL yourself if you want to.

Olaf

_________________
Olaf Offick - Global Moderator
http://learnskills.org


Top
 Profile  
 
PostPosted: Sat Jun 13, 2009 2:24 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Thu Aug 09, 2007 2:08 pm
Posts: 115
How?


Top
 Profile  
 
PostPosted: Sat Jun 13, 2009 2:37 pm 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Tue Dec 25, 2007 2:15 pm
Posts: 1075
Location: Baroda - India
is it working with SEF urls enabled?

_________________
ONE WORLD OPEN WORLD - WAR TODAY GIVE PEACE A CHANCE
http://indiavoice.info - India News & Information Portal
http://indiadaily.indiavoice.info - India Daily Infotainment

(Powered by Joomla!)


Top
 Profile  
 
PostPosted: Sat Jun 13, 2009 2:39 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Thu Jul 17, 2008 3:10 pm
Posts: 10951
Location: Ireland
MAD King wrote:
How?

Did you try the external link type in the Menu Item?
What exactly do you want to do anyway?

Olaf

_________________
Olaf Offick - Global Moderator
http://learnskills.org


Top
 Profile  
 
PostPosted: Sat Jun 13, 2009 2:52 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Thu Aug 09, 2007 2:08 pm
Posts: 115
I want the logout link in the user menu. But when I use the external link option it gives me a item id at the end and that comes up with an error after clicking the link.


Top
 Profile  
 
PostPosted: Sat Jun 13, 2009 3:08 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Thu Jul 17, 2008 3:10 pm
Posts: 10951
Location: Ireland
Why don't you use the following:

  1. Go to the Menu Manager
  2. Find your Menu
  3. Click on the Edit Menu Items Icon
  4. Click on New
  5. Click on User
  6. Click on "Default Login Layout"
  7. set Access Level = Registered
  8. set title = "Logout"
  9. set alias = "Logout"
  10. set Logout Redirection URL to whatever URL you want e.g. /index.php
  11. Click on Save

Olaf

_________________
Olaf Offick - Global Moderator
http://learnskills.org


Top
 Profile  
 
PostPosted: Sat Jun 13, 2009 5:20 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Thu Aug 09, 2007 2:08 pm
Posts: 115
Thank you. But is there a way if I click on the logout link that I looged out without redirect to the extra page with the logout button?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 44 posts ]  Go to page 1, 2  Next



Who is online

Users browsing this forum: No registered users and 38 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group