2018-06-21, 02:57 PM
I have script similar to the show latest threads sidebar which gets the member block from the portal and displays it on the index page.
Works well except when a guest uses it to log in they are redirected to the portal page as that's where the login code is coming from.
Is there a way to change member.php or add a additional segment to the script that if the user is coming from /portal.php? they are redirected to index.php of the forum on login.
The code I added to the jquery is
This is the same as the latestthread_portal script.
I also hooked into the pm's, welcome header this way.
So I just want it if the referer is portal.php they are redirected to index.php on login.
I don't know if register will redirect them to the portal I presume that button will be the index page once they are done.
Works well except when a guest uses it to log in they are redirected to the portal page as that's where the login code is coming from.
192.168.1.254 - - [21/Jun/2018:22:46:27 +0800] "GET /portal.php? HTTP/1.1" 200 5658 "https://community.cajgo-support.com/member.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36"
Is there a way to change member.php or add a additional segment to the script that if the user is coming from /portal.php? they are redirected to index.php of the forum on login.
The code I added to the jquery is
jQuery(".welcome").load("{$mybb->settings['bburl']}/portal.php .welcome_portal");
This is the same as the latestthread_portal script.
I also hooked into the pm's, welcome header this way.
So I just want it if the referer is portal.php they are redirected to index.php on login.
I don't know if register will redirect them to the portal I presume that button will be the index page once they are done.