Changeset 6269 for extensions
- Timestamp:
- May 22, 2010, 1:07:30 AM (15 years ago)
- Location:
- extensions/event_cats
- Files:
-
- 1 added
- 2 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/event_cats/admin/evntcats_admin.php
r4885 r6269 380 380 print '<pre>'; 381 381 //print_r('ROOT_URL : '.ROOT_URL.'<br>EVNTCATS_PATH : '.EVNTCATS_PATH); 382 print('ROOT_URL : '.ROOT_URL.'<br>EVNTCATS_PATH : '.EVNTCATS_PATH); 382 print('ROOT_URL + ... : '.preg_match('/(\d+\.\d+)\.(\d+)/', PHPWG_VERSION, $matches)); 383 print('<br />'); 384 print_r($matches); 383 385 print '</pre>'; 384 386 */ 385 387 386 $template->assign('ec_howto', 387 ($ec_howto and (count($page['errors']) ==0 and count($page['infos']) == 0))); 388 389 $template->assign('ec_help_banner_OK', (read_ec_conf('in_help_display') == '1')); 388 $template->assign( 389 'HeaderIncTPL', realpath('plugins/event_cats/admin/template/header.inc.tpl') 390 ); 391 392 $template->assign( 393 'FooterIncTPL', realpath('plugins/event_cats/admin/template/footer.inc.tpl') 394 ); 395 396 $template->assign( 397 'ec_howto', 398 ($ec_howto and (count($page['errors']) == 0 and count($page['infos']) == 0)) 399 ); 400 401 $template->assign( 402 'ec_help_banner_OK', 403 (read_ec_conf('in_help_display') == '1') 404 ); 390 405 391 406 $template->assign('EVNTCATS_PATH', EVNTCATS_PATH); 392 407 $template->assign('RACINE_URL', ROOT_URL); 393 $template->assign('U_HELP', get_root_url().'popuphelp.php?page= ec_help');408 $template->assign('U_HELP', get_root_url().'popuphelp.php?page=help'); 394 409 395 410 if (isset($conf['ec_debug1'])) $template->assign('ec_debug1', array( -
extensions/event_cats/admin/template/autolog_entries.tpl
r5058 r6269 3 3 {* <!-- Keeps file coded in UTF-8 without BOM : é --> *} 4 4 5 {include file= '../../../plugins/event_cats/admin/template/header.inc.tpl'}5 {include file=$HeaderIncTPL} 6 6 7 7 {* <!-- Whether plugin Additionnal Pages is active or not, and help banner management --> *} … … 32 32 {/if} 33 33 </div><span id = "ec_help_ban"></span> 34 35 <br /> 34 36 35 37 {* <!-- Form to view codes --> *} … … 158 160 </script> 159 161 160 {include file= '../../../plugins/event_cats/admin/template/footer.inc.tpl'}162 {include file=$FooterIncTPL} -
extensions/event_cats/admin/template/autolog_new.tpl
r5058 r6269 3 3 {* <!-- Keeps file coded in UTF-8 without BOM : é --> *} 4 4 5 {include file= '../../../plugins/event_cats/admin/template/header.inc.tpl'}5 {include file=$HeaderIncTPL} 6 6 7 7 {* <!-- Whether plugin Additionnal Pages is active or not, and help banner management --> *} … … 338 338 //--></script> 339 339 340 {include file= '../../../plugins/event_cats/admin/template/footer.inc.tpl'}340 {include file=$FooterIncTPL} -
extensions/event_cats/admin/template/config.tpl
r5058 r6269 3 3 {* <!-- Keeps file coded in UTF-8 without BOM : é --> *} 4 4 5 {include file= '../../../plugins/event_cats/admin/template/header.inc.tpl'}5 {include file=$HeaderIncTPL} 6 6 7 7 {* <!-- Whether plugin Additionnal Pages is active or not, and help banner management --> *} … … 208 208 //--></script> 209 209 210 {include file= '../../../plugins/event_cats/admin/template/footer.inc.tpl'}210 {include file=$FooterIncTPL} -
extensions/event_cats/admin/template/duplication.tpl
r5058 r6269 3 3 {* <!-- Keeps file coded in UTF-8 without BOM : é --> *} 4 4 5 {include file= '../../../plugins/event_cats/admin/template/header.inc.tpl'}5 {include file=$HeaderIncTPL} 6 6 7 7 {* <!-- For help banner --> *} … … 182 182 </form> 183 183 184 {include file= '../../../plugins/event_cats/admin/template/footer.inc.tpl'}184 {include file=$FooterIncTPL} 185 185 -
extensions/event_cats/admin/template/header.inc.tpl
r5058 r6269 6 6 7 7 {* <!-- Page title --> *} 8 <div class = "titrePage" style = "margin-top: -20px;">8 <div class = "titrePage"> 9 9 <h2>{'Admin page title'|@translate} {$EVNTCATS_VERSION}</h2> 10 10 </div> … … 23 23 {'Acknowledgement'|@translate} 24 24 </div> 25 < p>25 <br /> 26 26 {/if} 27 27 -
extensions/event_cats/main.inc.php
r5058 r6269 3 3 /* 4 4 Plugin Name: Event Cats 5 Version: auto5 Version: 1.2.1 6 6 Description: A single URL can be enough to be identified, and a user can duplicate his account to create a new one getting immediately the same properties. / On peut être identifié grâce à un simple URL, et on peut dupliquer son compte pour créer un nouveau compte ayant immédiatement les mêmes propriétés. 7 Plugin URI: http://piwigo.org/ext/extension_ svn.php?eid=3267 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=326 8 8 Author: LucMorizur 9 9 Author URI: http://lucmorizur.free.fr … … 44 44 define( // ------------------------------------------------------------------- 45 45 'EVNTCATS_INFO_VERSION', // VERSION HISTORY : 46 '1.2.1' // Improve EN translation thanks to Tosca 46 '1.2.2' // Corrections for Piwigo 2.1 compatibility 47 // '2.1.0' // When done, will simplfy and allow EC management from categories 48 // management pages in admin pages... yes yes... 49 // '1.2.1' // Improve EN translation thanks to Tosca 47 50 // '1.2.0' // Add feature 1335, Possibility to display the 'Connection' 48 51 // // link in identification block menu for generic users ; … … 73 76 include_once(EVNTCATS_PATH.'include/evntcats_main_funcs.inc.php'); 74 77 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 84 78 class event_cats { 85 79 // Sets the administration panel of the plugin 86 80 function plugin_admin_menu($menu) { 87 global $template;88 89 81 array_push($menu, 90 82 array( … … 94 86 ) 95 87 ); 96 97 // to be removed :98 $template->delete_compiled_templates();99 $template->set_prefilter('categories', 'ec_cat_modify_prefilter');100 101 88 return $menu; 102 89 } 103 104 function ec_cat_modify() {105 global $template;106 $template->set_prefilter('categories', 'ec_cat_modify_prefilter');107 }108 109 90 } // End class 110 91 … … 120 101 function ec_popup_help_content($popup_help_content, $page) { 121 102 return ( 122 $help_content = (is_admin() and $page = = 'ec_help') ?123 load_language( 'help.html', EVNTCATS_PATH, array('return' => true)) : false103 $help_content = (is_admin() and $page = 'help') ? 104 load_language($page.'.html', EVNTCATS_PATH, array('return' => true)) : false 124 105 ) ? $popup_help_content.$help_content : $popup_help_content; 125 106 } … … 149 130 if (!is_a_guest()) { 150 131 $url = ''; 151 foreach ($_GET as $item => $value) $url.= '&'.$item.'='.$value; 132 foreach ($_GET as $item => $value) { 133 $url.= '&'.$item.'='.$value; 134 } 152 135 logout_user(); 153 136 redirect(make_index_url().$url); … … 305 288 * required in the configuration. 306 289 * 290 * ec_duplicate_prefilter 291 * is used to modify the "quick connect" block in identification menu block, 292 * so that visitors identifying themselves this way, are redirected to the 293 * page they're currently displaying, instead of home page. This 294 * functionnality has been added at version 2.1.0 in Piwigo core 295 * (see bug:1484 Redirection after quickconnect), thus it is useless to 296 * implement it from here for Piwigo versions higher or equal to 2.1.0. 297 * 307 298 * @param no parameter 308 299 * @return no return value … … 311 302 add_event_handler('blockmanager_apply', 'duplicate_account_url'); 312 303 304 function ec_duplicate_prefilter($content, &$smarty) { 305 $search = "<legend>{'Quick connect'|@translate}</legend>"; 306 $addon = '<input type="hidden" name="redirect" value="{$U_REDIRECT}">'; 307 $replacement = "<legend>{'Quick connect'|@translate}</legend>".$addon; 308 return str_replace($search, $replacement, $content); 309 } 310 313 311 function duplicate_account_url() { 314 312 global $lang, $template, $user; 315 313 314 if (version_compare(PHPWG_VERSION, '2.1.0', '<')) { 316 315 // Makes the "quick connect" fieldset able to redirect to current page 317 // after user identification, just as does above "connection" link.316 // after user identification, just as does the "connection" link. 318 317 $template->assign(array('U_REDIRECT' => $_SERVER['REQUEST_URI'])); 319 318 $template->set_prefilter('menubar', 'ec_duplicate_prefilter'); 319 } 320 320 321 321 // Adds duplication link, if needed … … 349 349 } 350 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');359 360 351 add_event_handler( 361 352 'get_admin_plugin_menu_links',
Note: See TracChangeset
for help on using the changeset viewer.