event_handler();
The OnPanelCreate event handler is called when the system collects information for building the control toolbar in the public section of the site. Handler function thus can add custom buttons to the toolbar.
<? // file /bitrix/php_interface/init.php // register handler AddEventHandler("main", "OnPanelCreate", Array("MyClass", "OnPanelCreateHandler")); class MyClass { // add a button function OnPanelCreateHandler() { global $APPLICATION; $APPLICATION->AddPanelButton(array( // hyperlink "HREF" => "/bitrix/admin/my_page.php", // button image "SRC" => "/bitrix/images/my_module_id/button_image.gif", "ALT" => "Cool function", "MAIN_SORT" => 300, "SORT" => 10 )); } /* Now the toolbar display our button */ } ?>
© 2001-2005 Bitrix | Bitrix Site Manager - Content Management & Portal Solutions |