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

Recent

Welcome to TinyPortal. Please login or sign up.

December 04, 2024, 12:07:17 PM

Login with username, password and session length
Members
Stats
  • Total Posts: 195,443
  • Total Topics: 21,252
  • Online today: 158
  • Online ever: 6,457 (November 30, 2024, 02:40:09 PM)
Users Online
  • Users: 1
  • Guests: 109
  • Total: 110
  • @rjen

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.