Changeset 5058 for extensions/event_cats/main.inc.php
- Timestamp:
- Mar 5, 2010, 3:10:29 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/event_cats/main.inc.php
r4885 r5058 40 40 //ini_set('display_errors', true); 41 41 42 global $conf, $prefixeTable, $ec_lists ;42 global $conf, $prefixeTable, $ec_lists, $template; 43 43 44 44 define( // ------------------------------------------------------------------- … … 73 73 include_once(EVNTCATS_PATH.'include/evntcats_main_funcs.inc.php'); 74 74 75 function ec_cat_modify_prefilter($content, &$smarty) { 76 $search = '<fieldset id="image_order">'; 77 // $addon = '<fieldset id="event_cats_inc"><legend>YESSSSSSSSSSSSSS !!!</legend></fieldset>'; 78 $addon = "{include file='../../../plugins/event_cats/admin/template/ec_cat_modify.inc.tpl'} "; 79 $replacement = $addon.$search; 80 return str_replace($search, $replacement, $content); 81 // return $content; 82 } 83 75 84 class event_cats { 76 85 // Sets the administration panel of the plugin 77 86 function plugin_admin_menu($menu) { 87 global $template; 88 78 89 array_push($menu, 79 90 array( … … 83 94 ) 84 95 ); 96 97 // to be removed : 98 $template->delete_compiled_templates(); 99 $template->set_prefilter('categories', 'ec_cat_modify_prefilter'); 100 85 101 return $menu; 86 102 } 103 104 function ec_cat_modify() { 105 global $template; 106 $template->set_prefilter('categories', 'ec_cat_modify_prefilter'); 107 } 108 87 109 } // End class 88 110 … … 127 149 if (!is_a_guest()) { 128 150 $url = ''; 129 foreach ($_GET as $item => $value) { 130 $url.= '&'.$item.'='.$value; 131 } 151 foreach ($_GET as $item => $value) $url.= '&'.$item.'='.$value; 132 152 logout_user(); 133 153 redirect(make_index_url().$url); … … 293 313 function duplicate_account_url() { 294 314 global $lang, $template, $user; 315 316 // Makes the "quick connect" fieldset able to redirect to current page 317 // after user identification, just as does above "connection" link. 318 $template->assign(array('U_REDIRECT' => $_SERVER['REQUEST_URI'])); 319 $template->set_prefilter('menubar', 'ec_duplicate_prefilter'); 295 320 296 321 // Adds duplication link, if needed … … 321 346 get_root_url().'identification.php?redirect='.$_SERVER['REQUEST_URI'] 322 347 ); 323 // Removes "quick connection" fieldset (form)324 $template->set_filenames(array( 325 'ec_no_quick_connect' => 326 realpath(EVNTCATS_PATH.'ec_no_quick_connect.tpl') 327 ));328 $begin = 'PLUGIN_INDEX_CONTENT_BEFORE';329 $old_begin = $template->get_template_vars($begin);330 $template->assign_var_from_handle($begin, 'ec_no_quick_connect');331 $template->concat($begin, $old_begin); 332 } 333 } 348 } 349 } 350 351 function ec_duplicate_prefilter($content, &$smarty) { 352 $search = "<legend>{'Quick connect'|@translate}</legend>"; 353 $addon = '<input type="hidden" name="redirect" value="{$U_REDIRECT}">'; 354 $replacement = "<legend>{'Quick connect'|@translate}</legend>".$addon; 355 return str_replace($search, $replacement, $content); 356 } 357 358 // add_event_handler('get_admin_plugin_menu_links','ec_cat_modify'); 334 359 335 360 add_event_handler(
Note: See TracChangeset
for help on using the changeset viewer.