Log in

View Full Version : [profile] any idea where to find....?


Hex_legend
01-02-2010, 11:32 AM
I want it so that when people update their profile, it redirects them to another profile page which I specify, instead of usercp.php

so from profile.php?do=editdetails (or whatever) to
profile.php?do=extraoptions

where do I find where this is done?

Lynne
01-02-2010, 03:01 PM
Have you looked at the profile.php page? For instance, if you edit the password, you go to do=editpassword. The action then is do=updatepassword. At the end of the code for do=updatepassword is the redirect (example):
eval(print_standard_redirect('redirect_updatethank s'));It is similar for all of the (do=editprofile has the action do=updateprofile, editoptions goes to updateoptions, etc.)

Hex_legend
01-02-2010, 10:38 PM
Thanks Lynne
For anyone else who wants to know how to do this, this is what I done.

Open Profile.php

Find:


// save the data
$userdata->save();

if ($vbulletin->session->vars['profileupdate'])
{
$vbulletin->session->set('profileupdate', 0);
}

if (empty($vbulletin->GPC['gotopassword']))
{
$vbulletin->url = 'usercp.php' . $vbulletin->session->vars['sessionurl_q'];
}
else
{
$vbulletin->url = 'profile.php?' . $vbulletin->session->vars['sessionurl'] . 'do=editpassword';
}

eval(print_standard_redirect('redirect_updatethank s'));
}


replace with:


// save the data
$userdata->save();

if ($vbulletin->session->vars['profileupdate'])
{
$vbulletin->session->set('profileupdate', 0);
}

if (empty($vbulletin->GPC['gotopassword']))
{
$vbulletin->url = 'profile.php?do=extra' . $vbulletin->session->vars['sessionurl_q'];
}
else
{
$vbulletin->url = 'profile.php?' . $vbulletin->session->vars['sessionurl'] . 'do=editpassword';
}

eval(print_standard_redirect('redirect_updatethank s'));
}