[FREE] Redirect on Login and/or Logout mod

Started by Cola-Coca, March 27, 2025, 08:25:06 PM

Previous topic - Next topic

Cola-Coca

I LOVE SMF

Kindred

In short -- no. There was no license included with the mod (this was before we required a defined license) which means the it defaults to the most restrictive license which does not allow anyone else to republish
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

GL700Wing

#2
Quote from: Cola-Coca on March 27, 2025, 08:25:06 PMCan someone update this mod?
https://custom.simplemachines.org/index.php?mod=1443
@Cola-Coca If you download the Redirect on Login and/or Logout mod v0.4 mod and edit the install2.xml file as follows the mod will install and work on SMF 2.1 (this doesn't change how the mod works - it just changes the check for where one block of code gets inserted).

In the install2.xml file replace line 10 with the following line:
if ((empty($_SESSION['login_url']) && isset($_SESSION['old_url']) && strpos($_SESSION['old_url'], 'dlattach') === false && preg_match('~(board|topic)[=,]~', $_SESSION['old_url']) != 0) || (isset($_GET['quicklogin']) && isset($_SESSION['old_url']) && strpos($_SESSION['old_url'], 'login') === false))
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Illori

#3
Quote from: GL700Wing on March 28, 2025, 02:01:35 AM
Quote from: Cola-Coca on March 27, 2025, 08:25:06 PMCan someone update this mod?
https://custom.simplemachines.org/index.php?mod=1443
@Cola-Coca If you download the Redirect on Login and/or Logout mod v0.4 mod and edit the install2.xml file as follows the mod will install and work on SMF 2.1 (this doesn't change how the mod works - it just changes the check for where one block of code gets inserted).

In the install2.xml file replace line 10 with the following line:
    if ((empty($_SESSION['login_url']) && isset($_SESSION['old_url']) && strpos($_SESSION['old_url'], 'dlattach') === false && preg_match('~(board|topic)[=,]~', $_SESSION['old_url']) != 0) || (isset($_GET['quicklogin']) && isset($_SESSION['old_url']) && strpos($_SESSION['old_url'], 'login') === false))

SMF 2.0 and SMF 2.1 has an emulation feature for the package manager that should allow this without editing the files, is this not working?

GL700Wing

#4
Quote from: Illori on March 28, 2025, 05:13:50 AM
Quote from: GL700Wing on March 28, 2025, 02:01:35 AM
Quote from: Cola-Coca on March 27, 2025, 08:25:06 PMCan someone update this mod?
https://custom.simplemachines.org/index.php?mod=1443
@Cola-Coca If you download the Redirect on Login and/or Logout mod v0.4 mod and edit the install2.xml file as follows the mod will install and work on SMF 2.1 (this doesn't change how the mod works - it just changes the check for where one block of code gets inserted).

In the install2.xml file replace line 10 with the following line:
    if ((empty($_SESSION['login_url']) && isset($_SESSION['old_url']) && strpos($_SESSION['old_url'], 'dlattach') === false && preg_match('~(board|topic)[=,]~', $_SESSION['old_url']) != 0) || (isset($_GET['quicklogin']) && isset($_SESSION['old_url']) && strpos($_SESSION['old_url'], 'login') === false))

SMF 2.0 and SMF 2.1 has an emulation feature for the package manager that should allow this without editing the files, is this not working?
Emulation mode didn't need to be used (the mod installs for "2.0 - 2.99.99") but an install error occurred because one block of code that is being searched for in ./Sources/LogInOut.php is not exactly the same in SMF 2.1 as it was in SMF 2.0.
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Cola-Coca

@GL700Wing I installed the mod without any errors. Unfortunately it doesn't work. When I login, nothing happens, just the home page opens.
I LOVE SMF

GL700Wing

#6
Quote from: Cola-Coca on March 28, 2025, 10:43:30 PM@GL700Wing I installed the mod without any errors. Unfortunately it doesn't work. When I login, nothing happens, just the home page opens.
The login and logout URLs I configured on the forum on which I tested this mod definitely worked - suggest you logout, clear your browser cache and then login/logout again.
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Advertisement: