Additional Settings For Custom Profile Fields [1.2]
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #129
RE: Additional Settings For Custom Profile Fields
(01-04-2013 03:02 AM)leefish Wrote:  Perhaps it is an idea to have a redirect back from the Edit profile and edit options pages back to usercp?

There are some options to do that (by editing the xt_ucp_main.php file):
After:

PHP Code:
if($GLOBALS['mybb']->settings['xt_proffields_ucp'] != 0){

try adding this code:

PHP Code:
if(in_array($GLOBALS['mybb']->input['action'],array('profile','do_profile','options','do_options'))){
	redirect('usercp.php','The Administrator has been disabled this page. You\'ll be redirected to the page where you can edit your profile');
}

or this code:

PHP Code:
1
2
3
4
5
6
7
8
global $plugins;
$plugins->add_hook('usercp_profile_start','xt_ucp_main_usercp_block');
$plugins->add_hook('usercp_do_profile_start','xt_ucp_main_usercp_block');
$plugins->add_hook('usercp_options_start','xt_ucp_main_usercp_block');
$plugins->add_hook('usercp_do_options_start','xt_ucp_main_usercp_block');
function xt_ucp_main_usercp_block(){
	redirect('usercp.php','The Administrator has been disabled this page. You\'ll be redirected to the page where you can edit your profile');
}


01-04-2013 04:02 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
RE: Additional Settings For Custom Profile Fields - RateU - 01-04-2013 04:02 AM

 Standard Tools
Forum Jump: