Login  |  Register
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome, Guest. Please login or register.
Did you miss your activation email?

October 20, 2021, 12:13:02 AM

Login with username, password and session length
Members
  • Total Members: 3825
  • Latest: JLavau
Stats
  • Total Posts: 192534
  • Total Topics: 21007
  • Online Today: 119
  • Online Ever: 1035
  • (November 26, 2020, 04:45:12 AM)
Users Online
Users: 0
Guests: 46
Total: 46

Author Topic: Is there a way to redirect to the frontpage when logging out?  (Read 456 times)

0 Members and 1 Guest are viewing this topic.

Offline wakewatcher

  • Jr. Member
  • **
  • Posts: 23
Is there a way to redirect to the frontpage when logging out?
« on: August 21, 2021, 06:39:54 PM »
This might be a SMF question.  But is there a setting in TP that tells SMF to just go back to the front page ala mysite.com/smf/index.php when logging out? When I logout now I get this url
mysite.com/smf/index.php?action=forum. I looked at the SMF admin stuff and didn't see where I could change that.  Thx.
« Last Edit: August 22, 2021, 11:35:35 AM by wakewatcher »

Offline lurkalot

  • Administrator
  • *
  • Posts: 7328
    • Camera Craniums
Re: Is there a way to redirect to the frontpage when logging out?
« Reply #1 on: August 21, 2021, 07:03:18 PM »
This might be a SMF question.  But is there a setting in TP that tells SMF to just go back to the front page ala mysite.com/smf/index.php when logging out? When I logout now I get this url
mysite.com/smf/index.php?action=forum. I looked at the SMF admin stuff and didn't see where I could change that.  Thx.

Try it now and see if it's doing what you need.

I changed the setting in TinyPortal Admin > Settings > How to redirect after login

I changed it to "Redirect to frontpage"

Offline wakewatcher

  • Jr. Member
  • **
  • Posts: 23
Re: Is there a way to redirect to the frontpage when logging out?
« Reply #2 on: August 21, 2021, 07:32:24 PM »

Try it now and see if it's doing what you need.

I changed the setting in TinyPortal Admin > Settings > How to redirect after login

I changed it to "Redirect to frontpage"

I was looking for the best of both worlds.  To redirect to the forum on login and redirect to the front page on logout. I did a simple hack on SMF LoginOut.php.

Quote
after:
// Off to the merry board index we go!
   if ($redirect)
   {
insert this:
   // Off to the merry board index we go!
   if ($redirect)
   {
       // this is my gludge to redirect to the front page when loging out.
       $_SESSION['logout_url'] = "mysite.xxx/index.php"; //try to remember I did this when upgrading.

There's probably a better way that won't catch up to me on the Next SMF upgrade.

Offline @rjen

  • Support Team
  • *
  • Posts: 2960
    • FJR-club Nederland
Re: Is there a way to redirect to the frontpage when logging out?
« Reply #3 on: August 21, 2021, 11:15:34 PM »
Looks like you are getting thereā€¦.

Alternatively you could have used upper and lower panel blocks for four Frontpage content; just set the blocks in the block setting to only show on the Frontpageā€¦
Running TP2.1.0 on SMF2.0 at: www.fjr-club.nl

Testing TP on SMF2.0
Testing TP on SMF2.1 (latest Github)
Want to check what php version I am testing on? See: PHP Info

Offline wakewatcher

  • Jr. Member
  • **
  • Posts: 23
Re: Is there a way to redirect to the frontpage when logging out?
« Reply #4 on: August 21, 2021, 11:27:47 PM »
Obviously I still don't grok TP all that well as I don't understand how that would take me back to the frontpage instead of the forum page on logout but I'll keep playing with it! Thx.

Offline VladTepes

  • Jr. Member
  • **
  • Posts: 90
Re: Is there a way to redirect to the frontpage when logging out?
« Reply #5 on: September 07, 2021, 01:37:29 AM »
I was looking for the best of both worlds.  To redirect to the forum on login and redirect to the front page on logout.

I don't think many people log out, they just close the browser tab.
Time out, perhaps, but not log out.