2010-11-29, 08:47 AM
I have a plugin that when you click on a link in the Admin CP it posts data to another file but I want to redirect back to the admin page when it's done. I cannot figure this out though.
My code:
That redirects to this link:
I got the $mybb->settings['admin_dir'] from the MyBB default template and when I check the $mybb it does show the correct directory for [admin_dir]. What am I missing?
Bah! It's $mybb->config NOT $mybb->settings... no idea where I got that from, guess I'm more tired than I thought. After changing that it started to work without a problem.
My code:
redirect("../" . $mybb->settings['admin_dir'] . "/index.php?module=config/mypage");
That redirects to this link:
http://www.mywebsite.com//index.php?module=config/mypage
I got the $mybb->settings['admin_dir'] from the MyBB default template and when I check the $mybb it does show the correct directory for [admin_dir]. What am I missing?
Bah! It's $mybb->config NOT $mybb->settings... no idea where I got that from, guess I'm more tired than I thought. After changing that it started to work without a problem.