This is DEANO's mod which he has made available free of charge
This mod allows you to set a page that the member will
be redirected to after the member logs in.
When completed a new setting for the redirect page will appear
in Admin -> Settings -> Advanced Settings -> Variables
First we need to enter a new admin item in the database.
Enter the following SQL query using phpMyAdmin or you
can use the sql query tool in my deanos tools mod if you
have it installed.
INSERT INTO `sys_options` (`Name`, `VALUE`, `kateg`, `desc`, `Type`, `check`, `err_text`, `order_in_kateg`, `AvailableValues`) VALUES
('page_after_logon', 'member.php', 15, 'Page to redirect to after logon', 'digit', '', '', NULL, '');
Now make the follow change to member.php in the root of your dolphin site.
------------------------------------------------------------------------------------
FOR DOLPHIN 7.0.3-7.0.9
------------------------------------------------------------------------------------
At about line 686 Look for the following.
if (!$sUrlRelocate = $sRelocate or $sRelocate == $site['url'] or basename($sRelocate) == 'join.php')
$sUrlRelocate = BX_DOL_URL_ROOT . 'member.php';
Replace it with the following code.
// Deano - Redirect after Logon Mod - Start
if (!$sUrlRelocate = $sRelocate or $sRelocate == $site['url'] or basename($sRelocate) == 'join.php')
$sUrlRelocate = BX_DOL_URL_ROOT . 'member.php';
if (strstr($sUrlRelocate,'member.php')) {
$dbRv = getParam('page_after_logon');
$dbRd = $dbRv;
$dbRd = str_replace("{nickname}",getNickName((int)$_COOKIE['memberID']),$dbRd);
$dbRd = str_replace("{memberid}",$_COOKIE['memberID'],$dbRd);
$sUrlRelocate = $site['url'] . $dbRd;
}
// Deano - Redirect after Logon Mod - End
The mod defaults to redirecting the member after logon to the default
page of member.php
You can now change this to any page you want.
You will find the setting in the admin panal in advanced settings -> Variables.
Here are some example values.
To redirect to the main index page. Leave the value empty.
To redirect to the members profile use a value of {nickname}
To redirect to the photos main page use a value of m/photos/home/
To redirect to the news main page use a value of m/news/index/
There are 2 special values that can be used in the value field.
{nickname} is replaced with the nickname of the member that logged in.
{memberid} is replaced with the member id of the member logged in.