Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not Solved Redirect from global_start
#1
Not Solved
Stupid question, but my LED is not blinking :p

When I'm trying to redirect through 'global_start' hook the css of redirect page is failing to load.

$plugins->add_hook('global_start', 'redirect_do');

function redirect_do(){
	global $mybb, $theme, $templates, $headerinclude;
	if($mybb->user['uid'] == 1){
		redirect('somepage.php');
	}
}

Result:

[Image: rBQ0Tfa.png]

I've tried $theme & $headerinclude set to global but no luck.

What I'm missing?
#2
Not Solved
$theme and $headerinclude are not available in global_start, they're set later.
#3
Not Solved
I realize that.
So, there is no option ??!!!
#4
Not Solved
You try using global end ?
#5
Not Solved
global_end is too late for the actual function I'm trying to perform.


Forum Jump:


Users browsing this thread: 1 Guest(s)