2013-09-28, 08:23 PM
Seems like a very simple task, but I'm having trouble. I'm trying to insert a variable that carries text into the Admin CP. My hook is:
I want to replace the <div id="content"> as you can see in the header of the Admin CP. What am I doing wrong? Do I have to give permission to modify the Admin CP? If so how?
Solved my own problem. You can't change any admin files as they don't have any template files. What I used instead was the flash_message function.
$plugins->add_hook('admin_page_output_header', 'plugin_acp_msg');
function plugin_acp_msg($page)
{
$page = str_replace("<div id=\"content\">", "<div id=\"content\"><p>Message</p>", $page);
return $page;
}
I want to replace the <div id="content"> as you can see in the header of the Admin CP. What am I doing wrong? Do I have to give permission to modify the Admin CP? If so how?
Solved my own problem. You can't change any admin files as they don't have any template files. What I used instead was the flash_message function.