'contests')) . '/'); $ED = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'ExtendedDescription';")); define('CR_ED_state', $ED['state']); // +-----------------------------------------------------------------------+ // Trigger // +-----------------------------------------------------------------------+ add_event_handler('get_admin_plugin_menu_links', 'CR_admin_menu'); // Lien d'administration add_event_handler('loc_end_section_init', 'CR_section_init'); // Paramètre URL add_event_handler('loc_end_index', 'CR_index'); // Contenu du la page add_event_handler('loc_end_picture', 'CR_comment_picture', 10); // Commentaire sur la page image if(CR_ED_state == 'active') add_event_handler('render_CR_content', 'get_user_language_desc'); // Textes multilangues // Langues load_language('plugin.lang', CR_PATH); // Gestion du menu include(CR_PATH . 'include/cr_menubar.php'); // Lien d'administration function CR_admin_menu($menu){ array_push($menu, array( 'NAME' => CR_NAME, 'URL' => CR_ADMIN )); return $menu; } // Paramètre URL function CR_section_init(){ global $tokens, $page, $conf; include(CR_PATH . 'include/functions.php'); if($tokens[0] == 'contests'){ $page['section'] = 'contests'; $page['title'] = l10n('Contests'); if(isset($tokens[1]) AND $tokens[1]){ $page['contest'] = explode('-', $tokens[1]); $page['contest'] = $page['contest'][0]; $page['title'] .= $conf['level_separator'] . trigger_event('render_CR_content', get_contest_name($page['contest'])); } } } // Contenu du la page function CR_index(){ global $template, $page, $conf; if(isset($page['section']) and $page['section'] == 'contests'){ if(isset($page['contest'])) include(CR_PATH . 'include/cr_page.php'); else include(CR_PATH . 'include/cr_main.php'); } } // Ajoute le commentaire sur la page image function CR_comment_picture(){ global $page, $template, $conf; include(CR_PATH . 'include/cr_comment_picture.php'); } ?>