MyBB Community Forums

Full Version: Output message on all ACP pages?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I want to display a message (similar to the announcements boxes here at mybb) on every ACP page if a certain setting is on. What hook would I use? Is there a global ACP hook? And how would I put the HTML in the page?

Thanks
Tom
[Wiki: MyBB_Plugin_Hooks] (Broken link, head over to docs.mybb.com instead)

admin_page_output_header might work for ya.

EDIT: Actually it probably wont....

You could try flash_message()

http://www.mybb.com/sourcedocs/nav.html?...e.html#l79
How about the actual message? I've tried "flash_Message()" and a plain and simple "echo" but it "Can't Modify Page Headers. Headers already sent" Sad

EDIT: NVM, used admin_page_output_nav_tabs_end and $page->Output_alert

Thanks paul Smile
looks like you can't without a core edit to the output_header function since there are no templates to modify. since there is no plugin at the end of the output_header function to modify the header content, you can't update that way either.

the flash message will work if you hook into admin_load and then run flash_message, but it will only work when you have no other messages being entered. Its not an array of data, its only one item, so any action will update the flash_message contents overwriting your info then.
It's fine Pavemen, we used $page->Output_Alert() to do it Smile Considering that's what the version check error message uses Smile
flash_message() is for admin, what is for end user.
if i want to show message to user and want to redirect him in some page, what method will be used??