Output message on all ACP pages?
#1
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
Reply
#2
[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
-Paul H.

Cogisne lingua latina?
Reply
#3
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
Reply
#4
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.
Lost interest, sold my sites, will browse here once in a while. It's been fun.
Reply
#5
It's fine Pavemen, we used $page->Output_Alert() to do it Smile Considering that's what the version check error message uses Smile
Reply
#6
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??
With Regards and many thanks.
------------------------------------------
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)