Ok. I am looking at a wall mod that seems very good. It installs on the account page which I believe is probably the best place for it.
My question is this. I would like returning members to default to their respective account pages when they login instead of the index page. If they are non members, then they would go to the default homepage. How would I enable this within the site?
I thought about placing the wall mod on the index page but after studying how it actually works, I am in agreement with the developer. It's best served on the users account page (like facebook). To make the mod more apparent to returning users, I want to place it right at the top of their account page and sort of force it down their throat each time they login. This would require that the system identify they are a member and redirect them to their account page by default if they login to the root address of townation.com.
I don;t know if I am making myself clear. I hope I am...
http://towtalk.net ... Hosted by Zarconia.net! |
Ok. I am looking at a wall mod that seems very good. It installs on the account page which I believe is probably the best place for it.
My question is this. I would like returning members to default to their respective account pages when they login instead of the index page. If they are non members, then they would go to the default homepage. How would I enable this within the site?
I thought about placing the wall mod on the index page but after studying how it actually works, I am in agreement with the developer. It's best served on the users account page (like facebook). To make the mod more apparent to returning users, I want to place it right at the top of their account page and sort of force it down their throat each time they login. This would require that the system identify they are a member and redirect them to their account page by default if they login to the root address of townation.com.
I don;t know if I am making myself clear. I hope I am...
Ok, let me make it simple. How do I set my site up so members who go to the url townation.com end up in their account page? Guests (non members) end up on the homepage>?
http://towtalk.net ... Hosted by Zarconia.net! |
Hello SkyForum,
Deano has a mod which I think is what you are looking for:
This mod is a source mod for Dolphin 7
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.
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.php' ) $sUrlRelocate = $_SERVER['PHP_SELF'];
if ($sUrlRelocate == $site['url'] . '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 panel 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.
I hope that is what you are after.
All the best,
Stuart
There are none so blind as those that will not see. |
That looks like it would do the trick. Thank you! http://towtalk.net ... Hosted by Zarconia.net! |
Ok, as usual, Deano's mod works perfectly for what it's designed to do but for me, it doesn't go far enough.
Maybe a different approach. I would like the default entrance page to be the /member.php page with guests and members that are NOT logged in being redirected to the homepage instead of the login screen....

What if I just make the member.php the default entrance page and just adjust the member.php to redirect them to the homepage if they aren't logged in?
http://towtalk.net ... Hosted by Zarconia.net! |
That idea didn't work. Could use some help here... http://towtalk.net ... Hosted by Zarconia.net! |
Maybe a different approach. I would like the default entrance page to be the /member.php page with guests and members that are NOT logged in being redirected to the homepage instead of the login screen....
Ok, i am confused. These are both the same. Members that are not logged in are actually guests. There is no way for dolphin to know which is which.
https://www.deanbassett.com |
Maybe a different approach. I would like the default entrance page to be the /member.php page with guests and members that are NOT logged in being redirected to the homepage instead of the login screen....
Ok, i am confused. These are both the same. Members that are not logged in are actually guests. There is no way for dolphin to know which is which.
Yeah, I even confused myself with this post. Just forget about it. You are already working on it for me in another thread.....
http://towtalk.net ... Hosted by Zarconia.net! |
Thanks so much for this, this is perfect for what I wanted!
One small problem though, whatever I put in the variables field it always redirects to member.php?
Even after changing the code above to [quote]if ($sUrlRelocate == $site['url'] . '{nickname}')[/quote] I still can't get my Dolphin to open any other page than member.php after login.. Any other suggestions for how to redirect all login's to the user's profile page?
|
Which source mod are you using? There are 2 seperate ones in this post. The last one was written for a specific purpous for SkyForum.
The mod you want is the first one listed. or the one i have in the market here. http://www.boonex.com/unity/extensions/entry/Redirect_to_any_page_after_logon_
If you used just the first one, then redirecting to the members profile after logon all you have to do is put {nickname} in the redirect field in admin.
Restore your member.php and try again. The mod works properly if installed correctly. My guess is you got confused with the two mods in here and mixed something up.
https://www.deanbassett.com |
Hey Deano. Seems I have one small issue. The login link on that stupid promo banner on the index page no longer works? (the join button still does, go figger). Is there a way to remove the login button and just leave the join button? I have placed the join form at the top of the index page anyway so a member who wants to login will probably do it there. (and it seems to work fine).
I really like how this turned out. Members are always redirected to the member page if they are logged in and I have placed that mod right in their face. It's terrific!@ I just have a little 'adjusting' to do....
Check it out at http://townation.com
http://towtalk.net ... Hosted by Zarconia.net! |
I will look at my code again. I turned that out rather fast. So i might have done something wrong. https://www.deanbassett.com |
Hello SkyForum,
Deano has a mod which I think is what you are looking for:
This mod is a source mod for Dolphin 7
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.
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.php' ) $sUrlRelocate = $_SERVER['PHP_SELF'];
if ($sUrlRelocate == $site['url'] . '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 panel 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.
I hope that is what you are after.
All the best,
Stuart
And as for this code, don't use it. It's the older code. Download the new one from the market. This one is out of date.
https://www.deanbassett.com |