'PWG Stuffs', 'URL' => get_admin_plugin_menu_link(STUFFS_PATH . 'admin/admin.php') ) ); return $menu; } function load_stuffs() { global $template; include(STUFFS_PATH . 'class.inc.php'); include(STUFFS_PATH . 'functions.inc.php'); $template->set_template_dir(STUFFS_PATH.'theme/template/'); $template->set_filename('stuffs', 'stuffs_blocks.tpl'); $stuffs = new stuffs(); if (!empty($stuffs->blocks['begin'])) { $template->assign('blocks', $stuffs->blocks['begin']); $template->concat($stuffs->prefixe.'BEFORE', $template->parse('stuffs', true)); } if (!empty($stuffs->blocks['end'])) { $template->assign('blocks', $stuffs->blocks['end']); $template->concat($stuffs->prefixe.'AFTER', $template->parse('stuffs', true)); } } function stuffs_section_init() { global $tokens, $page; switch (script_basename()) { case 'picture': $page['stuffs_section'] = 'on_picture'; break; case 'index': if (count($tokens) == 1 and empty($tokens[0])) { $page['stuffs_section'] = 'on_home'; break; } elseif (isset($page['section']) and $page['section'] == 'categories') { $page['stuffs_section'] = isset($page['category']) ? 'on_cats' : 'on_root'; break; } default: return; } add_event_handler('loc_begin_page_header', 'load_stuffs'); } add_event_handler('get_admin_plugin_menu_links', 'stuffs_admin_menu'); add_event_handler('loc_end_section_init', 'stuffs_section_init', 60); ?>