HI
is it possible to redirect after a user registers to a page of my choice?
Sykic
Using SMF 1.1 Final?
Open Sources/Register.php and find:
redirectexit('action=login2;sa=check;member=' . $memberID, $context['server']['needs_login_fix']);
Change that to the url you want:
redirectexit('http://www.google.com']);
Thanks that worked brill
realized also should redirect user on login/logout
to achieve this I have added
$_SESSION['login_url'] = "http://www.123.co.uk/";
$_SESSION['logout_url'] = "http://www.123.co.uk";
near the top of SSI.php
please confirm this is not going to cause any trouble
it seems to work
Many thanks again for get support
Sykic
What do I edit so that when they click Register on my SMF that it takes them to a different url?
if you want to change the menu button, then change the link in the menu button function at the bottom of the theme e.g.
smf 1.1- change
// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo ($current_action == 'register' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'register' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=register">' , $txt[97] , '</a>
</td>' , $current_action == 'register' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
to this
// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo ($current_action == 'register' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'register' ? 'active_back' : 'back' , '">
<a href="http://www.domain.com">' , $txt[97] , '</a>
</td>' , $current_action == 'register' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
changing domain.com to the link of the register page e.g. domain.com/register.php
smf rc-1-
you will need to find the code behind $context['menu_buttons'] to change the register link
these are for default themes and may be different on custom themes
Hey does anyone know where I can find this code to edit it?
<a href="my-url-inserted-here">register</a>