TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

March 29, 2024, 06:03:09 AM

Login with username, password and session length
Members
Stats
  • Total Posts: 195,106
  • Total Topics: 21,213
  • Online today: 358
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 1
  • Guests: 278
  • Total: 279
  • lurkalot

Is there a way to redirect to the frontpage when logging out?

Started by wakewatcher, August 22, 2021, 01:39:54 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

wakewatcher

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.

lurkalot

Quote from: wakewatcher on August 22, 2021, 01:39:54 AM
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"

wakewatcher

Quote from: lurkalot on August 22, 2021, 02:03:18 AM

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.

Quoteafter:
// 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.

@rjen

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 Latest TP on SMF2.1 at: www.fjr-club.nl

wakewatcher

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.

VladTepes

Quote from: wakewatcher on August 22, 2021, 02:32:24 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.