Changeset 8956
- Timestamp:
- Jan 28, 2011, 8:56:39 AM (13 years ago)
- Location:
- extensions/event_cats
- Files:
-
- 26 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/event_cats/CHANGELOG.txt
r6425 r8956 1 2011-01-28 1.2.4 2 Fix bug 2135 3 1 4 2010-01-04 1.2.3 2 5 Re-fix bug 1432 -
extensions/event_cats/admin/autolog_entries.inc.php
r7832 r8956 36 36 // +-----------------------------------------------------------------------+ 37 37 38 // Keeps file coded in UTF-8 without BOM : é38 // Keeps file coded in UTF-8 without BOM : é 39 39 40 40 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); … … 104 104 elseif ($a == 3) { // Image 105 105 $url_end.= ($url_end == '') ? '' : '&img='.$arg2; 106 $t = pwg_db_fetch_row(pwg_query("106 $t = mysql_fetch_row(pwg_query(" 107 107 SELECT `name`, `file` 108 108 FROM `".IMAGES_TABLE."` … … 201 201 // construction of $code_URL 202 202 $code_URL = 203 ROOT_URL.203 EC_ROOT_URL. 204 204 'index.php?autolog='. 205 205 $ec_entry['code']. -
extensions/event_cats/admin/autolog_new.inc.php
r7864 r8956 36 36 // +-----------------------------------------------------------------------+ 37 37 38 // Keeps file coded in UTF-8 without BOM : é38 // Keeps file coded in UTF-8 without BOM : é 39 39 40 40 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); … … 96 96 )); 97 97 98 $month_list = $lang['month'];99 $month_list[0]='------------';100 ksort($month_list);101 102 98 if ($ec_is_creation) { 103 99 $template->assign('ec_help_banner1', l10n('ec_help_banner1_new_c')); … … 109 105 } 110 106 111 $template->assign(array( 112 'ec_hidden_when_no_code' => (count($ec_lists['duplicable_codes']) == 0) ? 113 'style = "display:none;"' : '', 114 'ec_hidden_when_no_user' => (count($ec_lists['user_ids']) == 0) ? 115 'style = "display:none;"' : '', 116 'ec_no_assoc' => ((pwg_db_num_rows(pwg_query(" 117 SELECT * 118 FROM `".IMAGE_CATEGORY_TABLE."` 119 "))) == 0), 120 'month_list' => $month_list, 121 'ec_days' => $lang['day'], 122 'ec_current_day' => intval(date('j')), 123 'ec_current_month' => intval(date('n')), 124 'ec_current_year' => intval(date('Y')), 125 'ec_current_time' => date('H').":".date('i'), /* 126 'ec_server_timestamp' => date('H:i'), */ 127 'ec_ap_ok' => defined('ADD_PAGES_TABLE'), 128 'ec_lists' => $ec_lists, 129 'ec_default_entry' => $ec_default_entry, 130 'ec_default_action' => $ec_default_action, 131 'ec_def_auto_code_dg_nb' => $ec_def_auto_code_dg_nb, 132 'ec_auto_code_dg_nb' => 133 $ec_conf_possible_values['auto_code_dg_nb'], 134 )); 107 $template->assign('ec_hidden_when_no_code', 108 (count($ec_lists['duplicable_codes']) == 0) ? 'style = "display:none;"' : '' 109 ); 110 $template->assign('ec_hidden_when_no_user', 111 (count($ec_lists['user_ids']) == 0) ? 'style = "display:none;"' : '' 112 ); 113 $template->assign('ec_no_assoc', ((mysql_num_rows(pwg_query(" 114 SELECT * 115 FROM `".IMAGE_CATEGORY_TABLE."` 116 "))) == 0)); 117 $template->assign('ec_ap_ok', defined('ADD_PAGES_TABLE')); 118 $template->assign('ec_lists', $ec_lists); 119 $template->assign('ec_default_entry', $ec_default_entry); 120 $template->assign('ec_default_action', $ec_default_action); 121 $template->assign('ec_def_auto_code_dg_nb', $ec_def_auto_code_dg_nb); 122 $template->assign('ec_auto_code_dg_nb', 123 $ec_conf_possible_values['auto_code_dg_nb']); 135 124 136 125 ?> -
extensions/event_cats/admin/config.inc.php
r7832 r8956 36 36 // +-----------------------------------------------------------------------+ 37 37 38 // Keeps file coded in UTF-8 without BOM : é38 // Keeps file coded in UTF-8 without BOM : é 39 39 40 40 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 41 41 42 global $ec_conf_ possible_values, $ec_conf;42 global $ec_conf_default, $ec_conf; 43 43 44 44 // +-----------------------------------------------------------------------+ … … 54 54 sprintf( 55 55 l10n('Register replacement'), 56 ' <br>',56 ' <br />', // nicer line feed 57 57 $lang['Register'], 58 58 $lang['Duplicate'] … … 64 64 sprintf( 65 65 l10n('Display connection'), 66 ' <br>',66 ' <br />', // nicer line feed 67 67 (version_compare(PHPWG_VERSION, '2.1.0', '<')) ? 68 68 $lang['Connection'] : $lang['Login'] … … 79 79 // Sends configuration values to the template, described per key 80 80 $ec_conf2 = array(); $i = 0; 81 foreach ($ec_conf_possible_values as $k => $v) 82 { $ec_conf2[$k] = $ec_conf[$i]; $i++; } 81 foreach ($ec_conf_default as $k => $v) { $ec_conf2[$k] = $ec_conf[$i]; $i++; } 83 82 $template->assign('ec_conf', $ec_conf2); 84 83 $template->assign('ec_help_banner1', l10n('ec_help_banner1_config')); -
extensions/event_cats/admin/duplication.inc.php
r7832 r8956 36 36 // +-----------------------------------------------------------------------+ 37 37 38 // Keeps file coded in UTF-8 without BOM : é38 // Keeps file coded in UTF-8 without BOM : é 39 39 40 40 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); … … 58 58 sprintf( 59 59 l10n('Register replacement'), 60 ' <br>',60 ' <br />', // nicer line feed 61 61 $lang['Register'], 62 62 $lang['Duplicate'] -
extensions/event_cats/admin/evntcats_admin.php
r8061 r8956 36 36 // +-----------------------------------------------------------------------+ 37 37 38 // Keeps file coded in UTF-8 without BOM : é38 // Keeps file coded in UTF-8 without BOM : é 39 39 40 40 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); … … 213 213 SET `arg2` = $c 214 214 WHERE `arg1` = 3 215 AND `code` IS NULL216 215 LIMIT 1 ; 217 216 " : " … … 238 237 SET `arg2` = $c 239 238 WHERE `arg1` = 3 240 AND `code` IS NULL241 239 LIMIT 1 ; 242 240 " : " … … 381 379 /* 382 380 print '<pre>'; 383 //print_r(' ROOT_URL : '.ROOT_URL.'<br>EVNTCATS_PATH : '.EVNTCATS_PATH);384 print(' ROOT_URL + ... : '.preg_match('/(\d+\.\d+)\.(\d+)/', PHPWG_VERSION, $matches));385 print('<br >');381 //print_r('EC_ROOT_URL : '.EC_ROOT_URL.'<br>EVNTCATS_PATH : '.EVNTCATS_PATH); 382 print('EC_ROOT_URL + ... : '.preg_match('/(\d+\.\d+)\.(\d+)/', PHPWG_VERSION, $matches)); 383 print('<br />'); 386 384 print_r($matches); 387 385 print '</pre>'; 388 386 */ 389 387 390 $template->assign(array( 391 'HeaderIncTPL' => 392 realpath('plugins/event_cats/admin/template/header.inc.tpl'), 393 'SmartFieldsetIncTPL' => 394 realpath('plugins/event_cats/admin/template/smart_fieldsets.inc.tpl'), 395 'FooterIncTPL' => 396 realpath('plugins/event_cats/admin/template/footer.inc.tpl'), 397 )); 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 ); 398 395 399 396 $template->assign( … … 408 405 409 406 $template->assign('EVNTCATS_PATH', EVNTCATS_PATH); 410 $template->assign('RACINE_URL', ROOT_URL);407 $template->assign('RACINE_URL', EC_ROOT_URL); 411 408 $template->assign('U_HELP', get_root_url().'popuphelp.php?page=help'); 412 409 413 if (isset($conf['ec_debug1']) and $conf['ec_debug1']) 414 $template->assign('ec_debug1', array( 410 if (isset($conf['ec_debug1'])) $template->assign('ec_debug1', array( 415 411 'POST' => str_from_var($_POST), 416 412 'ec_debug' => (isset($ec_debug)) ? str_from_var($ec_debug) : '(unset)', -
extensions/event_cats/admin/evntcats_theme.css
r7832 r8956 1 /* Keeps file coded in UTF-8 without BOM : é */1 /* Keeps file coded in UTF-8 without BOM : é */ 2 2 3 3 #ec_js_warn { -
extensions/event_cats/admin/template/autolog_entries.js
r7832 r8956 1 1 /* Event Cats Javascript functions LucMorizur June 2009 - ... */ 2 2 3 // Keeps file coded in UTF-8 without BOM : é3 // Keeps file coded in UTF-8 without BOM : é 4 4 5 5 var ec_checked_line = -1; -
extensions/event_cats/admin/template/autolog_entries.tpl
r7832 r8956 1 1 {* <!-- Event Cats (event categories) LucMorizur June 2009 - ... --> *} 2 2 3 {* <!-- Keeps file coded in UTF-8 without BOM : é --> *}3 {* <!-- Keeps file coded in UTF-8 without BOM : é --> *} 4 4 5 5 {include file=$HeaderIncTPL} … … 18 18 {'Hide'|@translate} 19 19 </label> 20 — 20 — 21 21 </span> 22 22 {if $ec_ap_ok} … … 33 33 </div><span id = "ec_help_ban"></span> 34 34 35 <br >35 <br /> 36 36 37 37 {* <!-- Form to view codes --> *} 38 38 <form class = "filter" method = "post" name = "ec_view_codes" action = ""> 39 <p> 40 <input type = "hidden" id = "ec_act1_id" name = "ec_act1"> 41 <input type = "radio" name = "ec_entry_sel" value = "-1" id = "selection--1" style = "display:none;"> 42 </p> 39 <input type = "hidden" id = "ec_act1_id" name = "ec_act1" /> 40 <input type = "radio" name = "ec_entry_sel" value = "-1" id = "selection--1" style = "display:none;"/> 43 41 44 42 <div style = "text-align:center; font-weight:bold; font-size:120%;"> … … 48 46 <!--[if !IE]> <--> </label> <!--> <![endif]--> 49 47 <!-- What we're able to do for our "prefered" browser |-( ...! --> 50 </a><br ><br>51 </div> 48 </a><br /> 49 </div><br /> 52 50 53 51 {* <!-- Table to show codes present in MySQL table --> *} … … 69 67 <input type = "radio" name = "ec_entry_sel" value = "{$code_line.id}" id = "selection-{$code_line.id}" 70 68 onclick = "ec_mark_line({$code_line.id});" 71 >69 /> 72 70 <label for = "selection-{$code_line.id}">{$code_line.id}</label> 73 71 <a id = "ec_url_id_{$code_line.id}" style = "display:none;" href = "{$code_line.code_URL}"></a> … … 78 76 > 79 77 {$code_line.Code} 80 {if !$comment_tooltip and $code_line.Comment != ''}<br >{$code_line.Comment}{/if}78 {if !$comment_tooltip and $code_line.Comment != ''}<br />{$code_line.Comment}{/if} 81 79 </label> 82 80 </td> … … 88 86 <a href = "javascript:void(0);" onclick = "ec_check_ds({$code_line.id});"> 89 87 <img src = "{$EVNTCATS_URLS.ROOT}icon/disable.png" class = "button" 90 alt = "{'Outdate entry ttip'|@translate}" title = "{'Outdate entry ttip'|@translate}" >88 alt = "{'Outdate entry ttip'|@translate}" title = "{'Outdate entry ttip'|@translate}" /> 91 89 </a> 92 90 {if $code_line.Forced == 'true'} … … 94 92 <img class = "button" src = "{$EVNTCATS_URLS.ROOT}icon/forced.png" 95 93 alt = "{'Unforce display ttip'|@translate}" title = "{'Unforce display ttip'|@translate}" 96 >94 /> 97 95 </a> 98 96 {else} … … 103 101 <a href = "javascript:void(0);" title = "{'Duplicate entry ttip'|@translate}" onclick = "ec_duplicate_entry({$code_line.id});"> 104 102 <img src = "{$EVNTCATS_URLS.ROOT}icon/duplicate.png" class = "button" style = "border:none" 105 alt = "{'Duplicate entry ttip'|@translate}" title = "{'Duplicate entry ttip'|@translate}" >103 alt = "{'Duplicate entry ttip'|@translate}" title = "{'Duplicate entry ttip'|@translate}" /> 106 104 </a> 107 105 {/if} … … 122 120 <label title = "{'Copy URL ttip'|@translate}"> 123 121 {'URL'|@translate} 124 <input type = "text" id = "ec_show_URL" size = "100" title = "{'Copy URL ttip'|@translate}" readonly = "readonly"> 125 </label><br> 126 <br> 127 <a href = "javascript:void(0);" title = "{'Test URL ttip'|@translate}" 128 id = "ec_table_URL" onclick = "return ec_check_tst();" class = "ec_lower_tools" > 129 <img src = "{$EVNTCATS_URLS.ROOT}icon/url2.png" class = "button" alt = "{'Test URL ttip'|@translate}"> 122 <input type = "text" id = "ec_show_URL" size = "100%" title = "{'Copy URL ttip'|@translate}" readonly = "readonly" /> 123 </label><br /> 124 <br /> 125 <a 126 href = "javascript:void(0);" title = "{'Test URL ttip'|@translate}" alt = "{'Test URL ttip'|@translate}" 127 id = "ec_table_URL" onclick = "return ec_check_tst();" class = "ec_lower_tools" 128 /> 129 <img src = "{$EVNTCATS_URLS.ROOT}icon/url2.png" class = "button"/> 130 130 {'Test'|@translate} 131 131 </a> 132 132 133 <a href = "javascript:void(0);" onclick = "ec_check_dl();" id = "ec_del_link_id" 134 class = "ec_lower_tools" title = "{'Delete entry ttip'|@translate}" > 135 <img src = "{$EVNTCATS_URLS.ROOT}icon/delete.png" class = "button" alt = "{'Delete entry ttip'|@translate}"> 133 <a href = "javascript:void(0);" onclick = "ec_check_dl();" id = "ec_del_link_id" class = "ec_lower_tools" 134 alt = "{'Delete entry ttip'|@translate}" title = "{'Delete entry ttip'|@translate}" 135 > 136 <img src = "{$EVNTCATS_URLS.ROOT}icon/delete.png" class = "button"/> 136 137 {'Delete'|@translate} 137 138 </a> 138 139 139 <a href = "javascript:void(0);" onclick = "ec_check_m();" id = "ec_mod_link_id" 140 class = "ec_lower_tools" title = "{'Modify entry ttip'|@translate}" > 141 <img src = "{$EVNTCATS_URLS.ROOT}icon/modify.png" class = "button" alt = "{'Modify entry ttip'|@translate}"> 140 <a href = "javascript:void(0);" onclick = "ec_check_m();" id = "ec_mod_link_id" class = "ec_lower_tools" 141 alt = "{'Modify entry ttip'|@translate}" title = "{'Modify entry ttip'|@translate}" 142 > 143 <img src = "{$EVNTCATS_URLS.ROOT}icon/modify.png" class = "button"/> 142 144 {'Modify'|@translate} 143 145 </a> 144 146 </td> 145 147 </tr> 146 </table> 148 </table><br /> 147 149 </form> 148 150 -
extensions/event_cats/admin/template/autolog_new.js
r8018 r8956 1 1 /* Event Cats Javascript functions LucMorizur June 2009 - ... */ 2 2 3 // Keeps file coded in UTF-8 without BOM : é3 // Keeps file coded in UTF-8 without BOM : é 4 4 5 5 // All variables declarations … … 7 7 // of .tpl file, thus some values below are modified during the HTML page 8 8 // "reading and displaying" 9 10 9 var ec_avoid_infinite_loop = true; 11 10 var ec_is_creation = true; 12 11 var ec_chk_nover_cat = true; 13 12 var ec_chk_over_grp = true; 14 var ec_ap_ok = false;15 13 var ec_flag1 = false; 16 14 var ec_flag2 = false; 17 15 var ec_dont_check = false; 18 16 var ec_selected_old_group = false; 19 var ec_validity_on = false;20 var ec_validity_day_length = 0;21 17 var ec_err = ''; 22 18 var ec_selected_img = ''; … … 41 37 var ec_selected_code = '-1'; 42 38 var ec_selected_action = '-1'; 43 var maintenant = new Date();44 var validity_date = new Date();45 39 var ec_JS_message = new Array(); 46 40 var ec_duplic_codes = new Array(); 47 41 var ec_lists_temp = new Array(); 48 var ec_validity_days = new Array();49 42 var ec_lists = new Array(); 50 43 ec_lists['code'] = new Array(); … … 61 54 } 62 55 63 function ec_add_0(s) {64 var s2 = String(s);65 return (s2.length == 1) ? "0" + s2 : s2;66 }67 68 56 function ec_check_exist_value(ec_id, ec_val) { 69 57 var e = document.getElementById(ec_id); … … 80 68 } 81 69 return false; 82 }83 84 function ec_update_comment(ec_id) {85 if (ec_id == '')86 de('first_fieldset_comment_id').innerHTML = '';87 else88 de('first_fieldset_comment_id').innerHTML = ' <em>(' + ec_id + ')</em>';89 70 } 90 71 … … 150 131 151 132 function ec_mark_code(ec_id) { 152 var t2 = d.ec_new_code.ec_in_up_code_list_id;153 133 if (ec_id == '-1') { 154 134 de('ec_sel_code_old').checked = 'checked'; … … 173 153 (ec_selected_old_group) ? 'checked' : ''; 174 154 de('ec_act2_id').value = '-1'; 175 de('first_cache_id').innerHTML = ec_new_code_text;176 ec_update_comment(ec_new_comment_text);177 155 break; 178 156 case 'ec_sel_code_old': … … 189 167 ec_selected_old_user = 190 168 ec_lists['user_id'][ec_selected_old_code]; 191 de('first_cache_id').innerHTML =192 ec_lists['code'][t2.options[t2.selectedIndex].value];193 ec_update_comment(194 ec_lists['comment'][t2.options[t2.selectedIndex].value]195 );196 169 ec_flag1 = true; 197 170 ec_mark_user('ec_sel_user_old'); … … 213 186 214 187 function ec_mark_user(ec_id) { 215 var t = d.ec_new_code.ec_in_up_usr_list_id;216 188 if (ec_id == '-1') { 217 189 de('ec_sel_user_old').checked = 'checked'; … … 245 217 de('ec_in_up_newgroup_id').checked = ''; 246 218 de('ec_in_up_usr_list_id').selectedIndex = '-1'; 247 de('second_cache_id').innerHTML = '';248 219 break; 249 220 case 'ec_sel_user_new': // New user … … 258 229 (ec_selected_old_group) ? 'checked' : ''; 259 230 de('ec_in_up_usr_list_id').selectedIndex = '-1'; 260 de('second_cache_id').innerHTML = ec_new_user_text;261 231 break; 262 232 case 'ec_sel_user_old': // "Old" user 263 233 if (ec_selected_action == 'ec_input_action_refused') 264 234 ec_selected_action = 'ec_input_action_home'; 265 de('ec_in_up_usr_txt_id').value = ''; 266 de('ec_in_up_psd_txt_id').value = ''; 267 de('ec_confirm_psd_txt_id').value = ''; 268 de('ec_in_up_grp_txt_id').value = ''; 269 de('ec_in_up_newgroup_id').checked = ''; 270 de('ec_in_up_usr_list_id').value = ec_selected_old_user; 271 de('second_cache_id').innerHTML = 272 t.options[t.selectedIndex].label; 235 de('ec_in_up_usr_txt_id').value = ''; 236 de('ec_in_up_psd_txt_id').value = ''; 237 de('ec_confirm_psd_txt_id').value = ''; 238 de('ec_in_up_grp_txt_id').value = ''; 239 de('ec_in_up_newgroup_id').checked = ''; 240 de('ec_in_up_usr_list_id').value = ec_selected_old_user; 273 241 break; 274 242 } … … 388 356 389 357 function ec_rnd(ec_min, ec_max) { 390 return Math.floor(ec_min + (ec_max - ec_min + 1) * Math.random() );358 return Math.floor(ec_min + (ec_max - ec_min + 1) * Math.random() ); 391 359 } 392 360 … … 719 687 } 720 688 721 function ec_get_validity() {722 validity_date.setMilliseconds(0);723 validity_date.setSeconds(0);724 validity_date.setMinutes(de('ec_validity_time_id').value.match(/\d+$/));725 validity_date.setHours(de('ec_validity_time_id').value.match(/^\d+/));726 validity_date.setDate(de('ec_validity_day_id').selectedIndex);727 validity_date.setMonth(de('ec_validity_month_id').selectedIndex - 1);728 validity_date.setFullYear(de('ec_validity_year_id').value);729 }730 731 function ec_set_validity() {732 validity_date.setMilliseconds(0);733 validity_date.setSeconds(0);734 de('ec_validity_year_id').value = validity_date.getFullYear();735 de('ec_validity_month_id').selectedIndex = validity_date.getMonth() + 1;736 de('ec_validity_day_id').selectedIndex = validity_date.getDate();737 de('ec_validity_time_id').value =738 ec_add_0(validity_date.getHours()) +739 ':' +740 ec_add_0(validity_date.getMinutes());741 de('ec_validity_sel_day').value =742 ec_validity_days[validity_date.getDay()];743 }744 745 function ec_validity_check_min() {746 var tp = new Date();747 tp.setMilliseconds(0);748 tp.setSeconds(0);749 maintenant.setTime(tp.getTime());750 tp.setTime(maintenant.getTime() + 120000); // PHP will not allow that751 // [date & time] is less than [one minute more than current [date & time]].752 // Thus considering processing time, JavaScript should not allow a date753 // less than [two minutes more than current [date & time]] (due to the fact754 // that base unit for this value is one minute).755 de("ec_min_year_id").value = tp.getFullYear();756 de("ec_min_month_id").selectedIndex = tp.getMonth() + 1;757 de("ec_min_day_id").selectedIndex = tp.getDate();758 ec_get_validity();759 if (Number(validity_date.getTime()) < Number(tp.getTime()))760 validity_date.setTime(tp.getTime());761 ec_set_validity();762 }763 764 function ec_mark_now() {765 maintenant = new Date();766 maintenant.setMilliseconds(0);767 maintenant.setSeconds(0);768 validity_date.setTime(maintenant.getTime() + 120000); // See two minutes769 // explanation in function ec_validity_check_min770 ec_set_validity();771 }772 773 function ec_validity_set_min() {774 ec_validity_check_min();775 // Run again this whole function after 1 mn776 window.setTimeout("ec_validity_set_min()", 60000);777 }778 779 function ec_add_time(v2, k) {780 var m = 0; var ts = 0;781 var v = (isNaN(v2)) ? 0 : Number(v2);782 if (v < 0) v = 0;783 ec_get_validity();784 ts = Number(validity_date.getTime());785 switch (k) {786 case 0: // minute(s)787 validity_date.setTime(ts + (v * 60000));788 break;789 case 1: // hour(s)790 validity_date.setTime(ts + (v * 3600000));791 break;792 case 2: // day(s)793 validity_date.setTime(ts + (v * 86400000));794 break;795 case 3: // month(s)796 m = Number(de('ec_validity_month_id').selectedIndex + v);797 validity_date.setFullYear(798 Number(de('ec_validity_year_id').value) + Math.floor(m / 12)799 );800 validity_date.setMonth(m % 12); // % : modulo801 break;802 case 4: // year(s)803 validity_date.setFullYear(Number(de('ec_validity_year_id').value) + v);804 break;805 }806 ec_set_validity();807 ec_validity_check_min();808 }809 810 function ec_valid_set_time_to(v) {811 var tp = new Date();812 var ts = 0;813 tp.setMilliseconds(0);814 tp.setSeconds(0);815 maintenant.setTime(tp.getTime());816 tp.setTime(maintenant.getTime() + 120000); // See two minutes817 // explanation in function ec_validity_check_min818 ec_get_validity();819 validity_date.setHours(v);820 validity_date.setMinutes(0);821 ts = Number(validity_date.getTime());822 if (ts < Number(tp.getTime()))823 validity_date.setTime(ts + 86400000); // Add 1 day824 ec_set_validity();825 ec_validity_check_min();826 }827 828 function ec_check_validity_on() {829 jQuery('.ec_valid_ctl').attr('disabled', !ec_validity_on);830 jQuery('img.ui-datepicker-trigger').css(831 'display', (ec_validity_on) ? 'inline' : 'none'832 );833 jQuery('#ec_tmp_img').css(834 'display', (ec_validity_on) ? 'none' : 'inline'835 );836 }837 838 function ec_toggle_fieldset(f1, f2) {839 var t = jQuery(f1).css('display');840 jQuery(f1).css('display', jQuery(f2).css('display'));841 jQuery(f2).css('display', t);842 }843 844 689 function ec_init() { 845 690 ec_selected_old_group = false; … … 860 705 ec_selected_user = '-1'; 861 706 ec_selected_code = '-1'; 862 de('ec_valid_offset_id').value =863 maintenant.getTimezoneOffset();864 707 de('ec_style_forced_id').innerHTML = ec_up_code_lbl_forced_txt; 865 708 de('ec_act1_id').value = ec_default_action; … … 878 721 de('ec_input_action_home').checked = 'checked'; 879 722 de('ec_input_action_home').checked = ''; 880 for (var i = 0; i <= 6; i++)881 ec_validity_day_length =882 (ec_validity_days[i].length > ec_validity_day_length) ?883 ec_validity_days[i].length : ec_validity_day_length;884 ec_validity_day_length++;885 de('ec_validity_sel_day').size = ec_validity_day_length;886 ec_mark_now();887 ec_validity_set_min();888 pwg_initialization_datepicker("#ec_min_day_id", "#ec_min_month_id",889 "#ec_min_year_id", "#ec_min_date_id", null, null, null);890 pwg_initialization_datepicker("#ec_validity_day_id",891 "#ec_validity_month_id", "#ec_validity_year_id", "#ec_linked_date_id",892 null, "#ec_min_date_id", null);893 maintenant = new Date();894 maintenant.setMilliseconds(0);895 maintenant.setSeconds(0);896 validity_date.setTime(maintenant.getTime());897 723 898 724 if (ec_is_creation) { // Entry creation … … 1015 841 } 1016 842 ec_mark_help(''); 1017 sf_init('first_fieldset_id', 'first_cache_id');1018 sf_init('second_fieldset_id', 'second_cache_id');1019 jQuery(document).ready(function(){1020 jQuery('#first_cache_id').after(document.createElement('span'));1021 jQuery('#first_cache_id').next().attr('id', 'first_fieldset_comment_id');1022 jQuery('#ec_tmp_img').attr(1023 'src', jQuery('img.ui-datepicker-trigger:first').attr('src')1024 );1025 ec_check_validity_on();1026 jQuery('.ui-datepicker').click(function(){1027 ec_validity_check_min();1028 });1029 jQuery('.ec_datepicker').change(function(){1030 ec_validity_check_min();1031 });1032 jQuery('#ec_validity_sel_day').css(1033 'backgroundColor', jQuery('#content').css('backgroundColor')1034 );1035 jQuery('#ec_validity_sel_day').css(1036 'color', jQuery('#content').css('color')1037 );1038 jQuery('.ec_valid_ctl').attr('disabled', 'disabled');1039 jQuery('#ec_valid_date_on_id').change(function(){1040 ec_validity_on = jQuery(this).attr('checked');1041 ec_check_validity_on();1042 });1043 });1044 843 return false; 1045 844 } -
extensions/event_cats/admin/template/autolog_new.tpl
r8018 r8956 1 1 {* <!-- Event Cats (event categories) LucMorizur June 2009 - ... --> *} 2 2 3 {* <!-- Keeps file coded in UTF-8 without BOM: é --> *} 4 5 {include file = $HeaderIncTPL} 6 {include file = 'include/datepicker.inc.tpl'} 7 {include file = $SmartFieldsetIncTPL} 8 9 {* <!-- Specific CSS --> *} 10 {html_head} 11 {literal} 12 <link rel = "stylesheet" type = "text/css" href = "{$RACINE_URL}themes/default/js/ui/theme/ui.datepicker.css"> 13 <style type = "text/css"> 14 #ui-datepicker-div { 15 display:none; 16 } 17 </style> 18 {/literal} 19 {/html_head} 20 21 {* <!-- JS functions --> *} 22 <script type = "text/javascript" src = "{$RACINE_URL}{$EVNTCATS_PATH}admin/template/autolog_new.js"></script> 3 {* <!-- Keeps file coded in UTF-8 without BOM : é --> *} 4 5 {include file=$HeaderIncTPL} 23 6 24 7 {* <!-- Whether plugin Additionnal Pages is active or not, and help banner management --> *} … … 35 18 {'Hide'|@translate} 36 19 </label> 37 — 20 — 38 21 </span> 39 22 {if $ec_ap_ok} 40 23 {'Additional Pages active'|@translate} 41 24 <script type = "text/javascript"> 42 ec_ap_ok = {if count($ec_lists.add_pages) == 0}false{else}true{/if};25 var ec_ap_ok = {if count($ec_lists.add_pages) == 0}false{else}true{/if}; 43 26 </script> 44 27 {else} 45 28 {'Additional Pages inactive'|@translate} 46 29 <script type = "text/javascript"> 47 ec_ap_ok = false;30 var ec_ap_ok = false; 48 31 </script> 49 32 {/if} 50 33 </div><span id = "ec_help_ban"></span> 51 34 <script type = "text/javascript"><!-- 52 d e('ec_help_banner2').style.display = "none";35 document.getElementById('ec_help_banner2').style.display = "none"; 53 36 //--></script> 54 37 55 38 {* <!-- Parameters list --> *} 56 39 <form class = "filter" method = "post" name = "ec_new_code" action = "" onsubmit = "return ec_check_submit();"> 57 <p style = "display:none;"> 58 <input type = "hidden" id = "ec_act1_id" name = "ec_act1"> 59 <input type = "hidden" id = "ec_act2_id" name = "ec_entry_sel"> 60 </p> 40 <input type = "hidden" id = "ec_act1_id" name = "ec_act1" /> 41 <input type = "hidden" id = "ec_act2_id" name = "ec_entry_sel" /> 61 42 62 43 {* <!-- Page title. Can be "New entry" or "Entry modification" --> *} … … 73 54 </a> 74 55 {if $ec_is_creation} 75 <br ><br>76 <input class = "submit" type = "button" value = "{'Full auto'|@translate}"56 <br /><br /> 57 <input class = "submit" type = "button" name = "ec_submit_gen_full_auto" value = "{'Full auto'|@translate}" 77 58 id = "ec_submit_gen_full_auto_id" onclick = "ec_gen_full_auto();" style = "margin-top:0;"/> 78 59 {/if} 79 60 </div> 80 61 81 {* <!-- [ [ [New] / [existing]code] / [Existing entry] ] selection --> *}82 <fieldset id = "first_fieldset_id">62 {* <!-- [ [New / existing code] / [Existing entry] ] selection --> *} 63 <fieldset> 83 64 <legend style = "font-weight:bold;"> 84 65 {if $ec_is_creation} … … 88 69 {/if} 89 70 </legend> 90 <ul>91 71 92 72 {if $ec_is_creation} … … 94 74 {* <!-- New code (to create) --> *} 95 75 <label for = "ec_in_up_code_id" onclick = "ec_mark_code('ec_sel_code_new');" {$ec_hidden_when_no_code} > 96 <input type = "radio" name = "ec_sel_code" value = "new" id = "ec_sel_code_new"/>76 <input type = "radio" name = "ec_sel_code" for = "ec_in_up_code_id" value = "new" id = "ec_sel_code_new"/> 97 77 {'New code'|@translate} 98 78 </label> 99 79 <span {$ec_hidden_when_no_code} > </span> 100 80 <label for = "ec_in_up_code_id" style = "margin:0;"> 101 <input class = "submit" type = "button" value = "{'Auto code button'|@translate}"81 <input class = "submit" type = "button" name = "ec_submit_gen_code" value = "{'Auto code button'|@translate}" 102 82 id = "ec_submit_gen_code_id" onclick = "ec_gen_code();" style = "margin:0;" 103 >83 /> 104 84 </label> 105 85 {'Auto code mid'|@translate} 106 86 <select name = "ec_in_up_auto_code_length" id = "ec_in_up_auto_code_length_id" onchange = "ec_auto_code_digits_nb = this.value;"> 107 {foreach from = $ec_auto_code_dg_nb item = ec_item name =listloop}87 {foreach from=$ec_auto_code_dg_nb item=ec_item name=listloop} 108 88 <option value = "{$ec_item}"> 109 89 {$ec_item} … … 117 97 {/foreach} 118 98 </select> 119 {'Auto code end'|@translate}<br> 120 </li> 121 122 <li style = "padding-left: 30px;"> 123 <input type = "text" name = "ec_in_up_code" maxlength = "32" size = "40" 124 id = "ec_in_up_code_id" onblur = "ec_check_code_text(this.value);" 125 > 126 — 127 <label for = "ec_in_up_comment_id" style = "margin:0;" title = "{'Optional'|@translate}"> 128 <span style = "font-weight:bold; font-style:italic;">{'Comment'|@translate}</span> 129 <input type = "text" name = "ec_in_up_comment" maxlength = "100" size = "50" id = "ec_in_up_comment_id" 130 onchange = "ec_new_comment_text = this.value; ec_update_comment(this.value);" 131 > 132 </label> 99 {'Auto code end'|@translate}<br /> 100 <li style = "padding-left: 30px;"> 101 <input type = "text" name = "ec_in_up_code" maxlength = "32" size = "40" 102 id = "ec_in_up_code_id" onblur = "ec_check_code_text(this.value);" 103 /> 104 — 105 <label for = "ec_in_up_comment_id" style = "margin:0;" title = "{'Optional'|@translate}"> 106 <span style = "font-weight:bold; font-style:italic;">{'Comment'|@translate}</span> 107 <input type = "text" name = "ec_in_up_comment" maxlength = "100" size = "50" id = "ec_in_up_comment_id" 108 onchange = "ec_new_comment_text = this.value;" 109 /> 110 </label> 111 </li> 133 112 </li> 134 113 … … 136 115 {* <!-- Known code --> *} 137 116 <label for = "ec_in_up_code_list_id" onclick = "ec_mark_code('ec_sel_code_old');" {$ec_hidden_when_no_code}> 138 <input type = "radio" name = "ec_sel_code" {$ec_hidden_when_no_code} value = "old" id = "ec_sel_code_old">117 <input type = "radio" name = "ec_sel_code" for = "ec_in_up_code_list_id" {$ec_hidden_when_no_code} value = "old" id = "ec_sel_code_old" /> 139 118 {'Existing code'|@translate} 140 119 </label> 141 120 <select name = "ec_in_up_code_list" id = "ec_in_up_code_list_id" onchange = "ec_change_code_list(this.value);" {$ec_hidden_when_no_code} > 142 {foreach from = $ec_lists.duplicable_codes.codes key = ec_key item =ec_val}121 {foreach from=$ec_lists.duplicable_codes.codes key=ec_key item=ec_val} 143 122 <option value = "{$ec_val.id}"> 144 123 {$ec_key} 145 124 {if $ec_val.comment != ''} 146 — {$ec_val.comment}125 — {$ec_val.comment} 147 126 {/if} 148 127 </option> … … 157 136 {* <!-- Entry choice --> *} 158 137 <select name = "ec_in_up_entry_list" id = "ec_in_up_entry_list_id" onchange = "ec_mark_entry(this.value);"> 159 {foreach from = $ec_lists.ec_table item =ec_val}138 {foreach from=$ec_lists.ec_table item=ec_val} 160 139 <option value = "{$ec_val.id}"> 161 140 {$ec_val.id} : {$ec_val.code} 162 141 {if $ec_val.comment != ''} 163 — {$ec_val.comment}142 — {$ec_val.comment} 164 143 {/if} 165 144 </option> 166 145 {/foreach} 167 146 </select> 168 — 147 — 169 148 <label for = "ec_in_up_comment_id" style = "margin:0;" title = "{'Optional'|@translate}"> 170 149 <span style = "font-weight:bold; font-style:italic;">{'Comment'|@translate}</span> 171 150 <input type = "text" name = "ec_in_up_comment" maxlength = "100" size = "50" id = "ec_in_up_comment_id" 172 onchange = "ec_new_comment_text = this.value;"> 151 onchange = "ec_new_comment_text = this.value;" 152 /> 173 153 </label> 174 154 </li> … … 176 156 {/if} 177 157 178 </ul>179 158 </fieldset> 180 159 181 160 {* <!-- User to identify --> *} 182 <fieldset id = "second_fieldset_id">161 <fieldset> 183 162 <legend style = "font-weight:bold;"> 184 163 {'Identified user'|@translate} 185 164 <span style = "font-weight:bold; color:red;" id = "ec_in_up_pwd_warn"> </span><br /> 186 165 </legend> 187 <ul> 188 189 {if !$ec_is_creation} 190 <li> 191 {* <!-- None --> *} 192 <label onclick = "return ec_mark_user('ec_sel_user_none');"> 193 <input type = "radio" name = "ec_sel_user" value = "none" id = "ec_sel_user_none"> 194 {'No user'|@translate} 195 </label><br> 196 </li> 197 {/if} 198 166 167 {if !$ec_is_creation} 199 168 <li> 200 {* <!-- New user (to create) --> *} 201 <label for = "ec_in_up_usr_txt_id" onclick = "return ec_mark_user('ec_sel_user_new');" {$ec_hidden_when_no_user} > 202 <input type = "radio" name = "ec_sel_user" value = "new" id = "ec_sel_user_new" {$ec_hidden_when_no_user}> 203 {'New generic user'|@translate} 204 </label> 205 <span {$ec_hidden_when_no_user} > </span> 206 <label for = "ec_in_up_usr_txt_id" style = "margin:0;"> 207 <input class = "submit" type = "button" value = "{'Generate username'|@translate}" 208 id = "ec_submit_gen_user_id" onclick = "ec_gen_user();" 209 > 210 </label> 169 {* <!-- None --> *} 170 <label onclick = "return ec_mark_user('ec_sel_user_none');"> 171 <input type = "radio" name = "ec_sel_user" value = "none" id = "ec_sel_user_none" /> 172 {'No user'|@translate} 173 </label><br /> 211 174 </li> 175 {/if} 176 177 <li> 178 {* <!-- New user (to create) --> *} 179 <label for = "ec_in_up_usr_txt_id" onclick = "return ec_mark_user('ec_sel_user_new');" {$ec_hidden_when_no_user} > 180 <input type = "radio" name = "ec_sel_user" for = "ec_in_up_usr_txt_id" value = "new" id = "ec_sel_user_new" {$ec_hidden_when_no_user} /> 181 {'New generic user'|@translate} 182 </label> 183 <span {$ec_hidden_when_no_user} > </span> 184 <label for = "ec_in_up_usr_txt_id" style = "margin:0;"> 185 <input class = "submit" type = "button" name = "ec_submit_gen_user" value = "{'Generate username'|@translate}" 186 id = "ec_submit_gen_user_id" onclick = "ec_gen_user();" 187 /> 188 </label> 212 189 <li style = "padding-left: 30px;"> 213 <label class = "ec_block" onclick = "return ec_mark_user('ec_sel_user_new');">{'New username'|@translate}<br >190 <label class = "ec_block" onclick = "return ec_mark_user('ec_sel_user_new');">{'New username'|@translate}<br /> 214 191 <input type = "text" name = "login" id = "ec_in_up_usr_txt_id" maxlength = "50" 215 192 size = "20" onblur = "ec_new_user_text = this.value; ec_check_user_text();" 216 >217 </label> 218 <label class = "ec_block" onclick = "return ec_mark_user('ec_sel_user_new');">{'New password'|@translate}<br >193 /> 194 </label> 195 <label class = "ec_block" onclick = "return ec_mark_user('ec_sel_user_new');">{'New password'|@translate}<br /> 219 196 <input type = "text" name = "password" id = "ec_in_up_psd_txt_id" maxlength = "32" 220 197 size = "20" onblur = "ec_new_psd_text = this.value; ec_check_pwd_text();" 221 >222 </label> 223 <label class = "ec_block" onclick = "return ec_mark_user('ec_sel_user_new');">{'Confirm password'|@translate}<br >198 /> 199 </label> 200 <label class = "ec_block" onclick = "return ec_mark_user('ec_sel_user_new');">{'Confirm password'|@translate}<br /> 224 201 <input type = "password" id = "ec_confirm_psd_txt_id" maxlength = "32" size = "20"/> 225 202 </label> … … 227 204 <input type = "checkbox" name = "ec_in_up_newgroup" id = "ec_in_up_newgroup_id" 228 205 onchange = "ec_selected_old_group = (this.checked != '');" 229 >206 /> 230 207 <span onMouseover = "ec_chk_over_grp = true;" onMouseout = "ec_chk_over_grp = false;"> 231 208 {'New group'|@translate} 232 </span><br >209 </span><br /> 233 210 <input type = "text" name = "groupname" id = "ec_in_up_grp_txt_id" maxlength = "32" 234 211 size = "20" onblur = "ec_new_grp_text = this.value; if (this.value != '') ec_selected_old_group = true;" 235 >236 </label> <br>237 </li> 238 239 <li>240 {* <!-- Known user --> *}241 <label for = "ec_in_up_usr_list_id" onclick = "return ec_mark_user('ec_sel_user_old');" {$ec_hidden_when_no_user} >242 <input type = "radio" name = "ec_sel_user" {$ec_hidden_when_no_user} value = "old" id = "ec_sel_user_old">243 {'Existing user'|@translate}244 </label>245 <select name = "ec_in_up_usr_list" id = "ec_in_up_usr_list_id" onchange = "ec_change_user_list(this.value);" {$ec_hidden_when_no_user}>246 {foreach from = $ec_lists.user_ids key = ec_key item = ec_val}247 <option label = "{$ec_val}" value = "{$ec_key}" >{$ec_val}</option>248 {/foreach}249 </select><br>250 </ li>251 252 </ul>212 /> 213 </label> 214 </li><br /> 215 </li> 216 217 <li> 218 {* <!-- Known user --> *} 219 <label for = "ec_in_up_usr_list_id" onclick = "return ec_mark_user('ec_sel_user_old');" {$ec_hidden_when_no_user} > 220 <input type = "radio" name = "ec_sel_user" for = "ec_in_up_usr_list_id" {$ec_hidden_when_no_user} value = "old" id = "ec_sel_user_old" /> 221 {'Existing user'|@translate} 222 </label> 223 <select name = "ec_in_up_usr_list" id = "ec_in_up_usr_list_id" onchange = "ec_change_user_list(this.value);" {$ec_hidden_when_no_user} > 224 {foreach from=$ec_lists.user_ids key=ec_key item=ec_val} 225 <option label = "{$ec_val}" value = "{$ec_key}" >{$ec_val}</option> 226 {/foreach} 227 </select><br /> 228 </li> 229 253 230 </fieldset> 254 231 … … 256 233 <fieldset> 257 234 <legend style = "font-weight:bold;">{'Displayed page'|@translate}</legend> 258 <ul> 259 260 <li> 261 <label class = "ec_block" for = "ec_in_up_forced_id" style = "margin-top:5px;" onclick = "ec_mark_forced();"> 262 <input type = "checkbox" name = "ec_in_up_forced" id = "ec_in_up_forced_id"> 263 <span id = "ec_style_forced_id"> </span> 235 236 <li> 237 <label class = "ec_block" for = "ec_in_up_forced_id" style = "margin-top:5px;" onclick = "ec_mark_forced();"> 238 <input type = "checkbox" name = "ec_in_up_forced" id = "ec_in_up_forced_id"> 239 <span id = "ec_style_forced_id"> </span> 240 </label> 241 </li> 242 243 <li> 244 {* <!-- Additionnal Page, provided the plugin is activated and at least one Add. P. is available --> *} 245 <label class = "ec_block" for = "ec_in_up_aps_id" onclick = "return ec_mark_action('ec_input_action_add_p');" 246 {if !$ec_ap_ok or count($ec_lists.add_pages) == 0} style = "display:none;" {/if} 247 > 248 <input type = "radio" name = "ec_input_action" value = "add_p" id = "ec_input_action_add_p" for = "ec_in_up_aps_id" /> 249 {'Additional Page'|@translate}<br /> 250 <select class = "categoryList" name = "ec_in_up_aps" size="30" id = "ec_in_up_aps_id" onchange = "ec_selected_AP = this.value;" > 251 {html_options options=$ec_lists.add_pages} 252 </select> 253 </label> 254 255 {* <!-- Category, provided at least one category is available --> *} 256 <label class = "ec_block" for = "ec_in_up_cats_id" onclick = "return ec_mark_action('ec_input_action_cat');" 257 {if count($ec_lists.categories) == 0} style = "display:none;" {/if} 258 > 259 <input type = "radio" name = "ec_input_action" value = "cat" id = "ec_input_action_cat" for = "ec_in_up_cats_id" 260 onMouseover = "ec_chk_nover_cat = false;" onMouseout = "ec_chk_nover_cat = true;" 261 /> 262 <span onMouseover = "ec_chk_nover_cat = false;" onMouseout = "ec_chk_nover_cat = true;">{'Category'|@translate}</span><br /> 263 <select class = "categoryList" name = "ec_in_up_cat" size = "30" id = "ec_in_up_cats_id" onchange = "ec_selected_cat = this.value;"> 264 {html_options options=$ec_lists.categories} 265 </select> 266 </label> 267 268 {* <!-- Image, provided at least one category is available and at least one image is associated to one category --> *} 269 <label class = "ec_block" for = "ec_in_up_imgs_id" onclick = "return ec_mark_action('ec_input_action_img');" 270 {if $ec_no_assoc or count($ec_lists.categories) == 0} style = "display:none;" {/if} 271 > 272 <input type = "radio" name = "ec_input_action" value = "img" id = "ec_input_action_img" for = "ec_in_up_imgs_id" /> 273 {'Image id'|@translate}<br /> 274 <input type = "text" name = "ec_in_up_img" id = "ec_in_up_imgs_id" maxlength = "6" 275 size = "10" onblur = "ec_selected_img = this.value; ec_check_img_text();" onfocus = "return ec_mark_action('ec_input_action_img');" 276 /><br /> 277 <span id = "ec_in_up_imgs_warn"> </span><br /> 278 </label> 279 280 {* <!-- Index page --> *} 281 <label class = "ec_block" onclick = "return ec_mark_action('ec_input_action_home');"> 282 <input type = "radio" name = "ec_input_action" value = "home" id = "ec_input_action_home" /> 283 {'Home'|@translate} 284 </label> 285 286 {* <!-- Access denied page (only when modifying an entry) --> *} 287 {if !$ec_is_creation} 288 <label class = "ec_block" onclick = "return ec_mark_action('ec_input_action_refused');"> 289 <input type = "radio" name = "ec_input_action" value = "refused" id = "ec_input_action_refused" /> 290 {'Access denied'|@translate} 264 291 </label> 265 </li> 266 267 <li> 268 {* <!-- Additionnal Page, provided the plugin is activated and at least one Add. P. is available --> *} 269 <label class = "ec_block" for = "ec_in_up_aps_id" onclick = "return ec_mark_action('ec_input_action_add_p');" 270 {if !$ec_ap_ok or count($ec_lists.add_pages) == 0} style = "display:none;" {/if} 271 > 272 <input type = "radio" name = "ec_input_action" value = "add_p" id = "ec_input_action_add_p"> 273 {'Additional Page'|@translate}<br> 274 <select class = "categoryList" name = "ec_in_up_aps" size = "30" id = "ec_in_up_aps_id" onchange = "ec_selected_AP = this.value;" > 275 {html_options options = $ec_lists.add_pages} 276 </select> 277 </label> 278 279 {* <!-- Category, provided at least one category is available --> *} 280 <label class = "ec_block" for = "ec_in_up_cats_id" onclick = "return ec_mark_action('ec_input_action_cat');" 281 {if count($ec_lists.categories) == 0} style = "display:none;" {/if} 282 > 283 <input type = "radio" name = "ec_input_action" value = "cat" id = "ec_input_action_cat" 284 onMouseover = "ec_chk_nover_cat = false;" onMouseout = "ec_chk_nover_cat = true;" 285 > 286 <span onMouseover = "ec_chk_nover_cat = false;" onMouseout = "ec_chk_nover_cat = true;">{'Category'|@translate}</span><br> 287 <select class = "categoryList" name = "ec_in_up_cat" size = "30" id = "ec_in_up_cats_id" onchange = "ec_selected_cat = this.value;"> 288 {html_options options = $ec_lists.categories} 289 </select> 290 </label> 291 292 {* <!-- Image, provided at least one category is available and at least one image is associated to one category --> *} 293 <label class = "ec_block" for = "ec_in_up_imgs_id" onclick = "return ec_mark_action('ec_input_action_img');" 294 {if $ec_no_assoc or count($ec_lists.categories) == 0} style = "display:none;" {/if} 295 > 296 <input type = "radio" name = "ec_input_action" value = "img" id = "ec_input_action_img"> 297 {'Image id'|@translate}<br> 298 <input type = "text" name = "ec_in_up_img" id = "ec_in_up_imgs_id" maxlength = "6" 299 size = "10" onblur = "ec_selected_img = this.value; ec_check_img_text();" onfocus = "return ec_mark_action('ec_input_action_img');" 300 ><br> 301 <span id = "ec_in_up_imgs_warn"> </span><br> 302 </label> 303 304 {* <!-- Index page --> *} 305 <label class = "ec_block" onclick = "return ec_mark_action('ec_input_action_home');"> 306 <input type = "radio" name = "ec_input_action" value = "home" id = "ec_input_action_home"> 307 {'Home'|@translate} 308 </label> 309 310 {* <!-- Access denied page (only when modifying an entry) --> *} 311 {if !$ec_is_creation} 312 <label class = "ec_block" onclick = "return ec_mark_action('ec_input_action_refused');"> 313 <input type = "radio" name = "ec_input_action" value = "refused" id = "ec_input_action_refused"> 314 {'Access denied'|@translate} 315 </label> 316 {/if} 317 </li> 318 319 </ul> 292 {/if} 293 </li> 294 320 295 </fieldset> 321 296 322 {* <!-- Validity date --> *} 323 324 {* 325 <!-- 326 Next steps: 327 _ check if initialize validity date with JS is doable; DONE 328 _ check if ' onchange = "ec_update_ts();" ' can be used; DONE 329 _ implement JS: 330 _ tick checkboxes when necessary; 331 _ throw proper information when submitting form. 332 _ implement PHP ; 333 _ commit, and drink a pint! 334 {''|@translate} 335 --> 336 *} 337 338 <fieldset> 339 <legend style = "font-weight:bold;">{'Validity date'|@translate}</legend> 340 <table style = "margin-left: 0px; text-align:left;"> 341 <tr> 342 343 <td style="vertical-align:top; margin-top:0;"> 344 <p style = "text-align:left; padding-bottom: 1em; padding-top: 0; margin-top: 0pt; font-weight: bold;"> 345 <label for = "ec_valid_date_on_id"> 346 <input type = "checkbox" name = "ec_valid_date_on" id = "ec_valid_date_on_id"> 347 {'Activate'|@translate} 348 </label> 349 </p> 350 <p style = "text-align:left;"> 351 <input type = "text" id = "ec_validity_sel_day" style = "text-align:right; border:none; cursor:default;" disabled = "disabled"> 352 <select id = "ec_validity_day_id" name = "ec_validity_day" class = "ec_valid_ctl ec_datepicker"> 353 <option value = "0">--</option> 354 {section name=day start=1 loop=32} 355 <option value = "{$smarty.section.day.index}"> 356 {$smarty.section.day.index} 357 </option> 358 {/section} 359 </select> 360 <select id = "ec_validity_month_id" name = "ec_validity_month" class = "ec_valid_ctl ec_datepicker"> 361 {html_options options=$month_list} 362 </select> 363 <input id = "ec_validity_year_id" name = "ec_validity_year" type = "text" size = "4" 364 maxlength = "4" style = "text-align:right; " class = "ec_valid_ctl ec_datepicker"> 365 <input id = "ec_validity_time_id" name = "ec_validity_time" type = "text" class = "ec_valid_ctl ec_datepicker" 366 size = "5" maxlength = "5" title = "{'Hours field tooltip'|@translate}" style = "text-align:right; "> 367 <input id = "ec_linked_date_id" name = "ec_linked_date_id" type = "hidden" size = "10" disabled = "disabled"> 368 <img id = "ec_tmp_img" class = "ui-datepicker-trigger" alt = "" title = "" 369 src = "{$EVNTCATS_URLS.ROOT}icon/tmp.png" style = "display:none; cursor:default;"> 370 </p> 371 <p style = "text-align:left;"> 372 <input id = "ec_date_today_btn_id" type = "button" value = "{'Now + 2 mn'|@translate}" 373 class = "ec_valid_ctl submit" title = "{'Now button tooltip'|@translate}" onclick = "ec_mark_now();"> — 374 <input id = "ec_set_time_to_btn_id" type = "button" value = "{'Set time to'|@translate}" 375 class = "ec_valid_ctl submit" onclick = "ec_valid_set_time_to(document.getElementById('ec_set_time_to_id').selectedIndex);"> 376 <select id = "ec_set_time_to_id" name = "ec_set_time_to" onchange = "ec_valid_set_time_to(this.selectedIndex);" class = "ec_valid_ctl"> 377 {section name=time start=0 loop=24} 378 <option label = "{if strlen($smarty.section.time.index) lt 2}0{/if}{$smarty.section.time.index}:00" value = "{$smarty.section.time.index}"> 379 {if strlen($smarty.section.time.index) lt 2}0{/if}{$smarty.section.time.index}:00 380 </option> 381 {/section} 382 </select> 383 </p> 384 <p style = "text-align:left;"> 385 <input id = "ec_date_add_btn_id" type = "button" value = "{'Add'|@translate}" title = "{'Add button tooltip'|@translate}" class = "ec_valid_ctl submit" 386 onclick = "ec_add_time(document.getElementById('ec_date_add_val_id').value, document.getElementById('ec_date_add_kind_id').selectedIndex);"> 387 <input id = "ec_date_add_val_id" type = "text" size = "5" maxlength = "5" value = "" style = "text-align:right;" class = "ec_valid_ctl"> 388 <select id = "ec_date_add_kind_id" name = "ec_date_add_kind" class = "ec_valid_ctl"> 389 <option label = "{'Minutes'|@translate}" value = "minutes">{'Minutes'|@translate}</option> 390 <option label = "{'Hours'|@translate}" value = "hours" >{'Hours'|@translate}</option> 391 <option label = "{'Days'|@translate}" value = "days" >{'Days'|@translate}</option> 392 <option label = "{'Months'|@translate}" value = "months" >{'Months'|@translate}</option> 393 <option label = "{'Years'|@translate}" value = "years" >{'Years'|@translate}</option> 394 </select> 395 </p> 396 <br> 397 <table> 398 <tr> 399 <td style = "text-align:right; vertical-align:top; font-weight:bold;"> 400 <label for = "ec_notify_id" title = "{'Notify label tooltip'|@translate}"> 401 <input type = "checkbox" name = "ec_notify" id = "ec_notify_id" disabled = "disabled"> 402 {'Do notify'|@translate} 403 </label> 404 </td> 405 <td style = "text-align:left;"> 406 <ul style = "list-style-type:none; list-style-position:inside; padding-left:0.5em;"> 407 <li style = "margin-bottom:0;"> 408 <label for = "ec_notify_user_id"> 409 <input type = "checkbox" name = "ec_notify_user" id = "ec_notify_user_id" class = "ec_valid_ctl"> 410 {'The user'|@translate} 411 </label> 412 </li> 413 <li style = "margin-bottom:0;"> 414 <label for = "ec_notify_webm_id"> 415 <input type = "checkbox" name = "ec_notify_webm" id = "ec_notify_webm_id" class = "ec_valid_ctl"> 416 {'The webmaster'|@translate} 417 </label> 418 </li> 419 <li style = "margin-bottom:0;"> 420 <label for = "ec_notify_admins_id"> 421 <input type = "checkbox" name = "ec_notify_admins" id = "ec_notify_admins_id" class = "ec_valid_ctl"> 422 {'All administrators'|@translate} 423 </label> 424 </li> 425 </ul> 426 </td> 427 </tr> 428 </table> 429 <p style = "display:none;"> 430 <!-- jQuery datepicker: see (french) http://fr.piwigo.org/forum/viewtopic.php?id=19042 --> 431 <select id = "ec_min_day_id" name = "ec_min_day"> 432 <option value = "0">--</option> 433 {section name=day start=1 loop=32} 434 <option value = "{$smarty.section.day.index}"> 435 {$smarty.section.day.index} 436 </option> 437 {/section} 438 </select> 439 <select id = "ec_min_month_id" name = "ec_min_month"> 440 {html_options options=$month_list} 441 </select> 442 <input id = "ec_min_year_id" name = "ec_min_year" type = "text" size = "4" maxlength = "4"> 443 <input id = "ec_min_date_id" name = "ec_min_date_id" type = "hidden" disabled = "disabled"> 444 <input id = "ec_valid_offset_id" name = "ec_valid_offset" type = "text"> 445 </p> 446 {* <!-- For tests purpose; must be removed --> *} 447 <p style = "text-align:left;"> 448 <span id = "ec_span_tst_id"></span> 449 </p> 450 {* <!-- /For tests purpose; must be removed --> *} 451 </td> 452 453 <td> </td><td> </td><td> </td> {* <!-- sorry :-\ --> *} 454 455 <td style="vertical-align:top; margin-top:0;"> 456 <table> 457 <tr> 458 <td style = "text-align:right; vertical-align:top; font-weight:bold;"> 459 {'Page once code outdated'|@translate} 460 </td> 461 <td style = "text-align:left;"> 462 <ul style = "list-style-type:none; list-style-position:inside; padding-left: 0.5em;"> 463 <li style = "margin-bottom:0;"> 464 <label for = "ec_date_unknown_0_id"> 465 <input type = "radio" name = "ec_date_unknown" value = "0" id = "ec_date_unknown_0_id" class = "ec_valid_ctl"> 466 {'Home'|@translate} 467 </label> 468 </li> 469 <li style = "margin-bottom:0;"> 470 <label for = "ec_date_unknown_1_id"> 471 <input type = "radio" name = "ec_date_unknown" value = "1" id = "ec_date_unknown_1_id" class = "ec_valid_ctl"> 472 {'Access denied'|@translate} 473 </label> 474 </li> 475 {* <!-- Additionnal Page, provided the plugin is activated and at least one Add. P. is available --> *} 476 <li {if !$ec_ap_ok or count($ec_lists.add_pages) == 0} style = "display:none;" {else} style = "margin-bottom:0;" {/if} > 477 <label for = "ec_date_in_up_aps_id"> 478 <input type = "radio" name = "ec_date_unknown" value = "2" id = "ec_date_unknown_2_id" class = "ec_valid_ctl"> 479 {'Additional Page'|@translate}<br> 480 <select class = "ec_valid_ctl categoryList" name = "ec_date_in_up_aps" size = "30" id = "ec_date_in_up_aps_id" > 481 {html_options options = $ec_lists.add_pages} 482 </select> 483 </label> 484 </li> 485 </ul> 486 </td> 487 </tr> 488 </table> 489 </td> 490 491 </tr> 492 </table> 493 494 </fieldset> 495 496 497 <p style = "margin-top:0;"> 498 <input class = "submit" type = "submit" value = "{'Submit'|@translate}" style = "margin-top:1em;"> 499 <input class = "submit" type = "submit" value = "{'Reset'|@translate}" onclick = "return ec_init();" style = "margin-top:1em;"> 297 <p> 298 <input class = "submit" type = "submit" value = "{'Submit'|@translate}"/> 299 <input class = "submit" type = "submit" value = "{'Reset'|@translate}" onclick = "return ec_init();"/> 500 300 </p> 501 301 </form> 502 302 503 303 {* <!-- JavaScript functions --> *} 304 <script type = "text/javascript" src = "{$RACINE_URL}{$EVNTCATS_PATH}admin/template/autolog_new.js"></script> 504 305 <script type = "text/javascript"><!-- 505 306 ec_is_creation = {if $ec_is_creation}true{else}false{/if}; 506 ec_validity_on = {if $ec_validity_on}true{else}false{/if};507 307 ec_up_code_lbl_forced_txt = "{'Forced'|@translate}"; 508 308 ec_JS_message['ec_gen_user_act_miss'] = "{'ec_gen_user_act_miss'|@translate|@escape:javascript}"; … … 525 325 ec_default_entry = "{$ec_default_entry}"; 526 326 ec_auto_code_digits_nb = "{$ec_def_auto_code_dg_nb}"; 527 sf_plus_bullet_path = "{$EVNTCATS_URLS.ROOT}icon/plus.png";528 sf_minus_bullet_path = "{$EVNTCATS_URLS.ROOT}icon/minus.png";529 327 {if $ec_is_creation} 530 {foreach from = $ec_lists.duplicable_codes.ids key = ec_key item =ec_val}328 {foreach from=$ec_lists.duplicable_codes.ids key=ec_key item=ec_val} 531 329 ec_duplic_codes[{$ec_key}] = {$ec_val}; 532 330 {/foreach} 533 331 {/if} 534 {foreach from = $ec_lists.ec_table item = ec_val name =listloop}332 {foreach from=$ec_lists.ec_table item=ec_val name=listloop} 535 333 ec_lists_temp[{$smarty.foreach.listloop.index}] = 536 334 "{$ec_val.id};{$ec_val.code};{$ec_val.user_id};{$ec_val.action};{$ec_val.arg1};{$ec_val.arg2};{$ec_val.forced};{$ec_val.comment}"; 537 335 {/foreach} 538 {foreach from = $ec_days item = ec_day name = listloop}539 ec_validity_days[{$smarty.foreach.listloop.index}] = "{$ec_day}";540 {/foreach}541 336 ec_build_ec_lists(); 542 337 ec_init(); 543 //--> 544 </script> 545 546 {include file = $FooterIncTPL} 338 //--></script> 339 340 {include file=$FooterIncTPL} -
extensions/event_cats/admin/template/config.js
r7832 r8956 1 1 /* Event Cats Javascript functions LucMorizur June 2009 - ... */ 2 2 3 // Keeps file coded in UTF-8 without BOM : é3 // Keeps file coded in UTF-8 without BOM : é 4 4 5 5 // All variables declarations -
extensions/event_cats/admin/template/config.tpl
r7832 r8956 1 1 {* <!-- Event Cats (event categories) LucMorizur June 2009 - ... --> *} 2 2 3 {* <!-- Keeps file coded in UTF-8 without BOM : é --> *}3 {* <!-- Keeps file coded in UTF-8 without BOM : é --> *} 4 4 5 5 {include file=$HeaderIncTPL} … … 18 18 {'Hide'|@translate} 19 19 </label> 20 — 20 — 21 21 </span> 22 22 {if $ec_ap_ok} … … 43 43 <tr> 44 44 <td style = "text-align:right; font-weight:bold;"> 45 {'Duplication allowance'|@translate} 46 </td> 47 <td> 48 <ul style = "list-style-type:none; list-style-position:inside; padding-left: 0.5em;"> 49 <li style = "margin-bottom:0;"> 50 <label for = "ec_dup_conf_none_id"> 51 <input 52 type = "radio" name = "ec_dup_conf" value = "0" id = "ec_dup_conf_none_id" 53 {if $ec_conf.dup_allow == '0'} checked = "checked" {/if} 54 > 55 {'No account'|@translate} 56 </label> 57 </li> 58 <li style = "margin-bottom:0;"> 59 <label for = "ec_dup_conf_group_id"> 60 <input 61 type = "radio" name = "ec_dup_conf" value = "2" id = "ec_dup_conf_group_id" 62 {if $ec_conf.dup_allow == '2'} checked = "checked" {/if} 63 > 64 {'Selection per group'|@translate} 65 </label> 66 </li> 67 <li style = "margin-bottom:0;"> 68 <label for = "ec_dup_conf_all_id"> 69 <input 70 type = "radio" name = "ec_dup_conf" value = "1" id = "ec_dup_conf_all_id" 71 {if $ec_conf.dup_allow == '1'} checked = "checked" {/if} 72 > 73 {'All accounts'|@translate} 74 </label> 75 </li> 76 </ul> 45 {'Duplication allowance'|@translate} 46 </td> 47 <td> 48 <label for = "ec_dup_conf_none_id"> 49 <input 50 type = "radio" name = "ec_dup_conf" value = "0" id = "ec_dup_conf_none_id" 51 {if $ec_conf.dup_allow == '0'} checked = "checked" {/if} 52 /> 53 {'No account'|@translate} 54 </label><br /> 55 <label for = "ec_dup_conf_group_id"> 56 <input 57 type = "radio" name = "ec_dup_conf" value = "2" id = "ec_dup_conf_group_id" 58 {if $ec_conf.dup_allow == '2'} checked = "checked" {/if} 59 /> 60 {'Selection per group'|@translate} 61 </label><br /> 62 <label for = "ec_dup_conf_all_id"> 63 <input 64 type = "radio" name = "ec_dup_conf" value = "1" id = "ec_dup_conf_all_id" 65 {if $ec_conf.dup_allow == '1'} checked = "checked" {/if} 66 /> 67 {'All accounts'|@translate} 68 </label> 77 69 </td> 78 70 <td> </td><td> </td><td> </td> {* <!-- sorry :-\ --> *} 79 <td style = "text-align:right; font-weight:bold;"> <!-- id = "Replace "Register" link ?" -->71 <td style = "text-align:right; font-weight:bold;"> 80 72 {* <!-- Replace "Register" link ? --> *} 81 {$ec_dup_link_conf} 82 </td> 83 <td> 84 <ul style = "list-style-type:none; list-style-position:inside; padding-left: 0.5em;"> 85 <li style = "margin-bottom:0;"> 86 <label for = "ec_dup_disp_normal_id"> 87 <input 88 type = "radio" name = "ec_dup_disp" value = "0" id = "ec_dup_disp_normal_id" 89 {if $ec_conf.duplic_display == '0'} checked = "checked" {/if} 90 > 91 {'No account'|@translate} 92 </label> 93 </li> 94 <li style = "margin-bottom:0;"> 95 <label for = "ec_dup_disp_but_gen_id"> 96 <input 97 type = "radio" name = "ec_dup_disp" value = "2" id = "ec_dup_disp_but_gen_id" 98 {if $ec_conf.duplic_display == '2'} checked = "checked" {/if} 99 > 100 {'All but generics'|@translate} 101 </label> 102 </li> 103 <li style = "margin-bottom:0;"> 104 <label for = "ec_dup_disp_dup_id"> 105 <input 106 type = "radio" name = "ec_dup_disp" value = "1" id = "ec_dup_disp_dup_id" 107 {if $ec_conf.duplic_display == '1'} checked = "checked" {/if} 108 > 109 {'All accounts'|@translate} 110 </label> 111 </li> 112 </ul> 73 {$ec_dup_link_conf} 74 </td> 75 <td> 76 <label for = "ec_dup_disp_normal_id"> 77 <input 78 type = "radio" name = "ec_dup_disp" value = "0" id = "ec_dup_disp_normal_id" 79 {if $ec_conf.duplic_display == '0'} checked = "checked" {/if} 80 /> 81 {'No account'|@translate} 82 </label><br /> 83 <label for = "ec_dup_disp_but_gen_id"> 84 <input 85 type = "radio" name = "ec_dup_disp" value = "2" id = "ec_dup_disp_but_gen_id" 86 {if $ec_conf.duplic_display == '2'} checked = "checked" {/if} 87 /> 88 {'All but generics'|@translate} 89 </label><br /> 90 <label for = "ec_dup_disp_dup_id"> 91 <input 92 type = "radio" name = "ec_dup_disp" value = "1" id = "ec_dup_disp_dup_id" 93 {if $ec_conf.duplic_display == '1'} checked = "checked" {/if} 94 /> 95 {'All accounts'|@translate} 96 </label><br /> 113 97 </td> 114 98 </tr> … … 121 105 <tr> 122 106 <td style = "text-align:right; vertical-align:top; font-weight:bold;"> 123 {'Page for unknown code'|@translate} 124 </td> 125 <td> 126 <ul style = "list-style-type:none; list-style-position:inside; padding-left: 0.5em;"> 127 <li style = "margin-bottom:0;"> 128 <label for = "ec_unknown_0_id" onclick = "ec_mark_action('ec_unknown_0_id');"> 129 <input type = "radio" name = "ec_unknown" value = "0" id = "ec_unknown_0_id"> 130 {'Home'|@translate} 131 </label> 132 </li> 133 <li style = "margin-bottom:0;"> 134 <label for = "ec_unknown_1_id" onclick = "ec_mark_action('ec_unknown_1_id');"> 135 <input type = "radio" name = "ec_unknown" value = "1" id = "ec_unknown_1_id"> 136 {'Access denied'|@translate} 137 </label> 138 </li> 139 <li {if !$ec_ap_ok or count($add_pages) == 0} style = "display:none;" {else} style = "margin-bottom:0;" {/if}> 140 {* <!-- Additionnal Page, provided the plugin is activated and at least one Add. P. is available --> *} 141 <label class = "ec_block" for = "ec_in_up_aps_id" onclick = "ec_mark_action('ec_unknown_2_id');"> 142 <input type = "radio" name = "ec_unknown" value = "2" id = "ec_unknown_2_id"> 143 {'Additional Page'|@translate}<br> 144 <select class = "categoryList" name = "ec_in_up_aps" size="30" id = "ec_in_up_aps_id" onchange = "ec_selected_AP = this.value;" > 145 {html_options options=$add_pages} 146 </select> 147 </label> 148 </li> 149 </ul> 107 {'Page for unknown code'|@translate} 108 </td> 109 <td> 110 <label for = "ec_unknown_0_id" onclick = "ec_mark_action('ec_unknown_0_id');"> 111 <input type = "radio" name = "ec_unknown" value = "0" id = "ec_unknown_0_id" /> 112 {'Home'|@translate} 113 </label><br /> 114 <label for = "ec_unknown_1_id" onclick = "ec_mark_action('ec_unknown_1_id');"> 115 <input type = "radio" name = "ec_unknown" value = "1" id = "ec_unknown_1_id" /> 116 {'Access denied'|@translate} 117 </label><br /> 118 {* <!-- Additionnal Page, provided the plugin is activated and at least one Add. P. is available --> *} 119 <label class = "ec_block" for = "ec_in_up_aps_id" {if !$ec_ap_ok or count($add_pages) == 0} style = "display:none;" {/if} 120 onclick = "ec_mark_action('ec_unknown_2_id');" 121 > 122 <input type = "radio" name = "ec_unknown" value = "2" id = "ec_unknown_2_id" for = "ec_in_up_aps_id" /> 123 {'Additional Page'|@translate}<br /> 124 <select class = "categoryList" name = "ec_in_up_aps" size="30" id = "ec_in_up_aps_id" onchange = "ec_selected_AP = this.value;" > 125 {html_options options=$add_pages} 126 </select> 127 </label> 150 128 </td> 151 129 </tr> … … 158 136 <tr> 159 137 <td style = "text-align:right; font-weight:bold;"> 160 {'Comments display'|@translate} 161 </td> 162 <td> 163 <ul style = "list-style-type:none; list-style-position:inside; padding-left: 0.5em;"> 164 <li style = "margin-bottom:0;"> 165 <label for = "ec_comments_0_id"> 166 <input type = "radio" name = "ec_comments" value = "0" id = "ec_comments_0_id" 167 {if $ec_conf.comment_display == '0'} checked = "checked" {/if} 168 > 169 {'As tooltip'|@translate} 170 </label> 171 </li> 172 <li style = "margin-bottom:0;"> 173 <label for = "ec_comments_1_id"> 174 <input type = "radio" name = "ec_comments" value = "1" id = "ec_comments_1_id" 175 {if $ec_conf.comment_display == '1'} checked = "checked" {/if} 176 > 177 {'In a row'|@translate} 178 </label> 179 </li> 180 </ul> 138 {'Comments display'|@translate} 139 </td> 140 <td> 141 <label for = "ec_comments_0_id"> 142 <input type = "radio" name = "ec_comments" value = "0" id = "ec_comments_0_id" 143 {if $ec_conf.comment_display == '0'} checked = "checked" {/if} 144 /> 145 {'As tooltip'|@translate} 146 </label><br /> 147 <label for = "ec_comments_1_id"> 148 <input type = "radio" name = "ec_comments" value = "1" id = "ec_comments_1_id" 149 {if $ec_conf.comment_display == '1'} checked = "checked" {/if} 150 /> 151 {'In a row'|@translate} 152 </label> 181 153 </td> 182 154 <td> </td><td> </td><td> </td> {* <!-- sorry :-\ --> *} 183 155 <td style = "text-align:right; font-weight:bold;"> 184 {'Help banner'|@translate} 185 </td> 186 <td> 187 <ul style = "list-style-type:none; list-style-position:inside; padding-left: 0.5em;"> 188 <li style = "margin-bottom:0;"> 189 <label for = "ec_2help_banner_1_id"> 190 <input type = "radio" name = "ec_help_banner_onoff2" value = "1" id = "ec_2help_banner_1_id" 191 onclick = "ec_mark_help('ec_help_banner_1');" 192 > 193 {'Banner on'|@translate} 194 </label> 195 </li> 196 <li style = "margin-bottom:0;"> 197 <label for = "ec_2help_banner_0_id"> 198 <input type = "radio" name = "ec_help_banner_onoff2" value = "0" id = "ec_2help_banner_0_id" 199 onclick = "ec_mark_help('ec_help_banner_0');" 200 > 201 {'Banner off'|@translate} 202 </label> 203 </li> 204 </ul> 205 </td> 156 {'Help banner'|@translate} 157 </td> 158 <td> 159 <label for = "ec_2help_banner_1_id"> 160 <input type = "radio" name = "ec_help_banner_onoff2" value = "1" id = "ec_2help_banner_1_id" 161 onclick = "ec_mark_help('ec_help_banner_1');" 162 /> 163 {'Banner on'|@translate} 164 </label><br /> 165 <label for = "ec_2help_banner_0_id"> 166 <input type = "radio" name = "ec_help_banner_onoff2" value = "0" id = "ec_2help_banner_0_id" 167 onclick = "ec_mark_help('ec_help_banner_0');" 168 /> 169 {'Banner off'|@translate} 170 </label> 206 171 <td> </td><td> </td><td> </td> {* <!-- sorry :-\ --> *} 207 172 <td style = "text-align:right; font-weight:bold;"> 208 {$ec_display_connect_conf} 209 </td> 210 <td> 211 <ul style = "list-style-type:none; list-style-position:inside; padding-left: 0.5em;"> 212 <li style = "margin-bottom:0;"> 213 <label for = "ec_connection_1_id"> 214 <input type = "radio" name = "ec_connection" value = "1" id = "ec_connection_1_id" 215 {if $ec_conf.display_connection == '1'} checked = "checked" {/if} 216 > 217 {'Yes'|@translate} 218 </label> 219 </li> 220 <li style = "margin-bottom:0;"> 221 <label for = "ec_connection_0_id"> 222 <input type = "radio" name = "ec_connection" value = "0" id = "ec_connection_0_id" 223 {if $ec_conf.display_connection == '0'} checked = "checked" {/if} 224 > 225 {'No'|@translate} 226 </label> 227 </li> 228 </ul> 173 {$ec_display_connect_conf} 174 </td> 175 <td> 176 <label for = "ec_connection_1_id"> 177 <input type = "radio" name = "ec_connection" value = "1" id = "ec_connection_1_id" 178 {if $ec_conf.display_connection == '1'} checked = "checked" {/if} 179 /> 180 {'Yes'|@translate} 181 </label><br /> 182 <label for = "ec_connection_0_id"> 183 <input type = "radio" name = "ec_connection" value = "0" id = "ec_connection_0_id" 184 {if $ec_conf.display_connection == '0'} checked = "checked" {/if} 185 /> 186 {'No'|@translate} 187 </label> 229 188 </td> 230 189 </table> … … 232 191 233 192 <div style = "text-align:center;"> 234 <input class = "submit" type = "submit" name = "ec_conf_submit" value = "{'Submit'|@translate}" >193 <input class = "submit" type = "submit" name = "ec_conf_submit" value = "{'Submit'|@translate}" /> 235 194 </div> 236 195 -
extensions/event_cats/admin/template/duplication.tpl
r7832 r8956 1 1 {* <!-- Event Cats (event categories) LucMorizur June 2009 - ... --> *} 2 2 3 {* <!-- Keeps file coded in UTF-8 without BOM : é --> *}3 {* <!-- Keeps file coded in UTF-8 without BOM : é --> *} 4 4 5 5 {include file=$HeaderIncTPL} … … 22 22 //--></script> 23 23 24 <!-- A cknowledgement25 A lot of below code has simply been copied-pasted from file cat_perm.tpl . 26 Many thanks to people who wrote it ! 27 -- >24 <!-- Aknowledgement ---------------------------------------------------------- 25 | A lot of below code has simply been copied-pasted from file cat_perm.tpl . | 26 | Many thanks to people who wrote it ! | 27 -----------------------------------------------------------------------------> 28 28 29 29 {* <!-- Duplication configuration parameters --> *} 30 <form action = "" method = "post" class = "titrePage" {* name = "ec_duplic_conf" *}>30 <form action = "" method = "post" class = "titrePage" name = "ec_duplic_conf"> 31 31 <fieldset> 32 32 <legend>{'Configuration'|@translate}</legend> … … 34 34 <tr> 35 35 <td style = "text-align:right; font-weight:bold;"> 36 {'Duplication allowance'|@translate} 36 {'Duplication allowance'|@translate} 37 37 </td> 38 38 <td> 39 <ul style = "list-style-type:none; list-style-position:inside; padding-left: 0.5em;"> 40 <li style = "margin-bottom:0;"> 41 <label for = "ec_dup_conf_none_id"> 42 <input 43 type = "radio" name = "ec_dup_conf" value = "0" id = "ec_dup_conf_none_id" 44 {if $ec_conf.dup_allow == '0'} checked = "checked" {/if} 45 > 46 {'No account'|@translate} 47 </label> 48 </li> 49 <li style = "margin-bottom:0;"> 50 <label for = "ec_dup_conf_group_id"> 51 <input 52 type = "radio" name = "ec_dup_conf" value = "2" id = "ec_dup_conf_group_id" 53 {if $ec_conf.dup_allow == '2'} checked = "checked" {/if} 54 > 55 {'Selection per group'|@translate} 56 </label> 57 </li> 58 <li style = "margin-bottom:0;"> 59 <label for = "ec_dup_conf_all_id"> 60 <input 61 type = "radio" name = "ec_dup_conf" value = "1" id = "ec_dup_conf_all_id" 62 {if $ec_conf.dup_allow == '1'} checked = "checked" {/if} 63 > 64 {'All accounts'|@translate} 65 </label> 66 </li> 67 </ul> 39 <label for = "ec_dup_conf_none_id"> 40 <input 41 type = "radio" name = "ec_dup_conf" value = "0" id = "ec_dup_conf_none_id" 42 {if $ec_conf.dup_allow == '0'} checked = "checked" {/if} 43 /> 44 {'No account'|@translate} 45 </label><br /> 46 <label for = "ec_dup_conf_group_id"> 47 <input 48 type = "radio" name = "ec_dup_conf" value = "2" id = "ec_dup_conf_group_id" 49 {if $ec_conf.dup_allow == '2'} checked = "checked" {/if} 50 /> 51 {'Selection per group'|@translate} 52 </label><br /> 53 <label for = "ec_dup_conf_all_id"> 54 <input 55 type = "radio" name = "ec_dup_conf" value = "1" id = "ec_dup_conf_all_id" 56 {if $ec_conf.dup_allow == '1'} checked = "checked" {/if} 57 /> 58 {'All accounts'|@translate} 59 </label> 68 60 </td> 69 61 <td> </td><td> </td><td> </td> {* <!-- sorry :-\ --> *} 70 62 <td style = "text-align:right; font-weight:bold;"> 71 {$ec_dup_link_conf} 63 {$ec_dup_link_conf} 72 64 </td> 73 65 <td> 74 <ul style = "list-style-type:none; list-style-position:inside; padding-left: 0.5em;"> 75 <li style = "margin-bottom:0;"> 76 <label for = "ec_dup_disp_normal_id"> 77 <input 78 type = "radio" name = "ec_dup_disp" value = "0" id = "ec_dup_disp_normal_id" 79 {if $ec_conf.duplic_display == '0'} checked = "checked" {/if} 80 > 81 {'No account'|@translate} 82 </label> 83 </li> 84 <li style = "margin-bottom:0;"> 85 <label for = "ec_dup_disp_but_gen_id"> 86 <input 87 type = "radio" name = "ec_dup_disp" value = "2" id = "ec_dup_disp_but_gen_id" 88 {if $ec_conf.duplic_display == '2'} checked = "checked" {/if} 89 > 90 {'All but generics'|@translate} 91 </label> 92 </li> 93 <li style = "margin-bottom:0;"> 94 <label for = "ec_dup_disp_dup_id"> 95 <input 96 type = "radio" name = "ec_dup_disp" value = "1" id = "ec_dup_disp_dup_id" 97 {if $ec_conf.duplic_display == '1'} checked = "checked" {/if} 98 > 99 {'All accounts'|@translate} 100 </label> 101 </li> 102 </ul> 66 <label for = "ec_dup_disp_normal_id"> 67 <input 68 type = "radio" name = "ec_dup_disp" value = "0" id = "ec_dup_disp_normal_id" 69 {if $ec_conf.duplic_display == '0'} checked = "checked" {/if} 70 /> 71 {'No account'|@translate} 72 </label><br /> 73 <label for = "ec_dup_disp_but_gen_id"> 74 <input 75 type = "radio" name = "ec_dup_disp" value = "2" id = "ec_dup_disp_but_gen_id" 76 {if $ec_conf.duplic_display == '2'} checked = "checked" {/if} 77 /> 78 {'All but generics'|@translate} 79 </label><br /> 80 <label for = "ec_dup_disp_dup_id"> 81 <input 82 type = "radio" name = "ec_dup_disp" value = "1" id = "ec_dup_disp_dup_id" 83 {if $ec_conf.duplic_display == '1'} checked = "checked" {/if} 84 /> 85 {'All accounts'|@translate} 86 </label><br /> 103 87 </td> 104 88 </tr> 105 </table> <br>106 <input class = "submit" type = "submit" name = "ec_duplic_conf_submit" value = "{'Save dup. config btn'|@translate}" >89 </table> 90 <input class = "submit" type = "submit" name = "ec_duplic_conf_submit" value = "{'Save dup. config btn'|@translate}" /> 107 91 </fieldset> 108 92 </form> 109 93 110 94 {* <!-- Duplication settings by groups / types / user ids --> *} 111 <form action = "" method = "post" {* name = "ec_duplic_set" *}id="categoryPermissions">95 <form action = "" method = "post" name = "ec_duplic_set" id="categoryPermissions"> 112 96 113 97 <h4>{'Groups'|@translate}</h4> … … 117 101 <ul> 118 102 {foreach from=$groups_granted_ids item=id} 119 <li><label><input type = "checkbox" name = "deny_groups[]" value = "{$id}" > {$all_groups[$id]}</label></li>103 <li><label><input type = "checkbox" name = "deny_groups[]" value = "{$id}" /> {$all_groups[$id]}</label></li> 120 104 {/foreach} 121 </ul> <br>122 <input class = "submit" type = "submit" name = "deny_groups_submit" value = "{'Deny to groups btn'|@translate}" >105 </ul> 106 <input class = "submit" type = "submit" name = "deny_groups_submit" value = "{'Deny to groups btn'|@translate}" /> 123 107 </fieldset> 124 108 … … 129 113 <li><label><input type = "checkbox" name = "grant_groups[]" value = "{$id}"> {$all_groups[$id]}</label></li> 130 114 {/foreach} 131 </ul> <br>132 <input class = "submit" type = "submit" name = "grant_groups_submit" value = "{'Grant to groups btn'|@translate}" >115 </ul> 116 <input class = "submit" type = "submit" name = "grant_groups_submit" value = "{'Grant to groups btn'|@translate}" /> 133 117 </fieldset> 134 118 … … 139 123 <ul> 140 124 {if $ec_gen_granted} 141 <li><label><input type = "checkbox" name = "deny_generic"> {'user_status_generic'|@translate}</label><br></li> 125 <li><label><input type = "checkbox" name = "deny_generic" /> {'user_status_generic'|@translate}</label></li> 126 <br /> 142 127 {/if} 143 128 {foreach from=$types_granted_ids item=id} 144 <li><label><input type = "checkbox" name = "deny_types[]" value = "{$id}" > {$all_types[$id]}</label></li>129 <li><label><input type = "checkbox" name = "deny_types[]" value = "{$id}" /> {$all_types[$id]}</label></li> 145 130 {/foreach} 146 </ul> <br>147 <input class = "submit" type = "submit" name = "deny_types_submit" value = "{'Deny to types btn'|@translate}" >131 </ul> 132 <input class = "submit" type = "submit" name = "deny_types_submit" value = "{'Deny to types btn'|@translate}" /> 148 133 </fieldset> 149 134 … … 152 137 <ul> 153 138 {if !$ec_gen_granted} 154 <li><label><input type = "checkbox" name = "grant_generic" > {'user_status_generic'|@translate}</label></li>155 <br >139 <li><label><input type = "checkbox" name = "grant_generic" /> {'user_status_generic'|@translate}</label></li> 140 <br /> 156 141 {/if} 157 142 {foreach from=$types_denied_ids item=id} 158 <li><label><input type = "checkbox" name = "grant_types[]" value = "{$id}" > {$all_types[$id]}</label></li>143 <li><label><input type = "checkbox" name = "grant_types[]" value = "{$id}" /> {$all_types[$id]}</label></li> 159 144 {/foreach} 160 </ul> <br>161 <input class = "submit" type = "submit" name = "grant_types_submit" value = "{'Grant to types btn'|@translate}" >145 </ul> 146 <input class = "submit" type = "submit" name = "grant_types_submit" value = "{'Grant to types btn'|@translate}" /> 162 147 </fieldset> 163 148 … … 168 153 <ul> 169 154 {foreach from=$users_granted_direct_ids item=id} 170 <li><label><input type = "checkbox" name = "deny_users[]" value = "{$id}" > {$all_users[$id]}</label></li>155 <li><label><input type = "checkbox" name = "deny_users[]" value = "{$id}" /> {$all_users[$id]}</label></li> 171 156 {/foreach} 172 </ul> <br>173 <input class = "submit" type = "submit" name = "deny_users_submit" value = "{'Deny to users btn'|@translate}" >157 </ul> 158 <input class = "submit" type = "submit" name = "deny_users_submit" value = "{'Deny to users btn'|@translate}" /> 174 159 </fieldset> 175 160 … … 191 176 <li><label><input type = "checkbox" name = "grant_users[]" value = "{$id}"> {$all_users[$id]}</label></li> 192 177 {/foreach} 193 </ul> <br>194 <input class = "submit" type = "submit" name = "grant_users_submit" value = "{'Grant to users btn'|@translate}" >178 </ul> 179 <input class = "submit" type = "submit" name = "grant_users_submit" value = "{'Grant to users btn'|@translate}" /> 195 180 </fieldset> 196 181 -
extensions/event_cats/admin/template/footer.inc.tpl
r7864 r8956 1 1 {* <!-- Event Cats (event categories) LucMorizur June 2009 - ... --> *} 2 2 3 {* <!-- Keeps file coded in UTF-8 without BOM : é --> *}3 {* <!-- Keeps file coded in UTF-8 without BOM : é --> *} 4 4 5 5 {* <!-- Common Event Cats admin pages footer --> *} … … 7 7 {* <!-- For help banner --> *} 8 8 {if isset($ec_help_banner_in_foot)} 9 <br>10 9 <script type = "text/javascript"><!-- 11 10 ec_help_banner_in_foot = true; 12 11 //--></script> 13 <div id = "ec_help_banner0" style = "border-top: 1px solid #666666; border-bottom: 1px solid #666666;"> 12 <div id = "ec_help_banner0"> 13 <hr width = 100% size = 1 /> 14 14 <div id = "ec_help_banner1" style = "text-align:left; display:block;"></div> 15 <hr width = 100% size = 1 /> 15 16 </div> 16 17 {else} -
extensions/event_cats/admin/template/header.inc.tpl
r7864 r8956 1 1 {* <!-- Event Cats (event categories) LucMorizur June 2009 - ... --> *} 2 2 3 {* <!-- Keeps file coded in UTF-8 without BOM : é --> *}3 {* <!-- Keeps file coded in UTF-8 without BOM : é --> *} 4 4 5 5 {* <!-- Common Event Cats admin pages "header" --> *} … … 12 12 {* <!-- JavaScript warning message --> *} 13 13 <div id = "ec_js_warn"> 14 {'JS needed'|@translate}<br ><br>14 {'JS needed'|@translate}<br /><br /> 15 15 </div> 16 16 <script type = "text/javascript"><!-- // Removes JavaScript warning message … … 23 23 {'Acknowledgement'|@translate} 24 24 </div> 25 <br >25 <br /> 26 26 {/if} 27 27 28 28 {* <!-- Help banner --> *} 29 29 {if !isset($ec_help_banner_in_foot)} 30 <div id = "ec_help_banner0"> 31 <div style = "text-align:right; font-style:italic; border-top: 1px solid #666666;"> 30 <span id = "ec_help_banner0"> 31 <hr width = 100% size = 1 /> 32 <div style = "text-align:right; font-style:italic;"> 32 33 {'Help banner'|@translate} 33 34 <label for = "ec_help_banner_1" onclick = "ec_mark_help('ec_help_banner_1');"> … … 41 42 </label> 42 43 </div> 43 <span id = "ec_help_banner1" style = "text-align:left; display:block; border-bottom: 1px solid #666666; padding-bottom:0.5em;"></span> 44 </div> 44 <span id = "ec_help_banner1" style = "text-align:left; display:block;"></span> 45 <hr width = 100% size = 1 /> 46 </span> 45 47 {/if} 46 48 -
extensions/event_cats/admin/template/header.js
r7832 r8956 1 1 /* Event Cats Javascript functions LucMorizur June 2009 - ... */ 2 2 3 // Keeps file coded in UTF-8 without BOM : é3 // Keeps file coded in UTF-8 without BOM : é 4 4 5 5 // All variables declarations … … 35 35 if (!ec_help_banner_in_foot) { 36 36 document.getElementById('ec_help_banner_0').checked = 'checked'; 37 document.getElementById('ec_help_ban').innerHTML = '<br >';37 document.getElementById('ec_help_ban').innerHTML = '<br />'; 38 38 document.getElementById('ec_help_banner2').style.display = ''; 39 39 } -
extensions/event_cats/include/ec_conf.inc.php
r7832 r8956 23 23 // +-----------------------------------------------------------------------+ 24 24 25 // Keeps file coded in UTF-8 without BOM : é25 // Keeps file coded in UTF-8 without BOM : é 26 26 27 27 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 28 28 29 global $ec_conf, $page, $ec_conf_index, $ec_conf_possible_values, $ec_debug; 30 31 // --------------------------------------------------------------------------- 32 // $ec_conf initalization 33 // --------------------------------------------------------------------------- 34 35 // ----- Introduction 36 // Not sure I'm very proud of this quite complex configuration initialization 37 // part :-/ ... 38 // The reason of the complexity is the inital intention of building a 39 // configuration management allowing to use in the rest of the script only 40 // two functions: change_ec_conf() and read_ec_conf() . 41 // change_ec_conf() updates the DB systematically. The initialization part 42 // has the only function of determining what is the value of $ec_conf, which 43 // is the root configuration parameters provider. 44 // ----- 29 global $ec_conf, $page, $ec_conf_index, $ec_conf_default, 30 $ec_conf_possible_values; 31 32 // $ec_conf initalization 45 33 46 34 // $ec_conf has numeric indexes (instead of string keys like 'activated', 47 35 // 'howto'...) because of its first reading, done with the "explode" function. 48 // It would be very easy to build a string keys indexed array, thanks to36 // It would be very easy to build a string keys indexed array, thanks to 49 37 // following instructions : 50 38 /* 51 $t = pwg_db_fetch_row(pwg_query("39 $t = mysql_fetch_row(pwg_query(" 52 40 SELECT `value` 53 41 FROM `".CONFIG_TABLE."` … … 63 51 64 52 //---------------------------------------------------------------------------- 65 66 // Give possible $ec_conf values. In case values cannot be predicted, just 67 // provide an empty array : array() . 53 // The following lines allow to change the number of configuration items, the 54 // default values they can have, and also their possible other values, very 55 // quickly. 56 57 // Gives configuration items names and default values. Only strings. 58 $ec_conf_default = array( // PLUGIN CONFIGURATION ($ec_conf) : 59 // --------------------------------- 60 'activated' // plugin activated, 0 or 1 61 => '0', // 62 // 63 'howto' // whether the small aknowledgement message has 64 => '0', // already been displayed, 0 or 1 65 // 66 'dup_allow' // duplication allowance : 67 => '2', // 0 : no account ; 68 // 1 : all accounts ; 69 // 2 : specified by group and user ids ; 70 // 71 'duplic_display' // duplication link display in the menubar : 72 => '2', // 0 : "Register" for everybody ; 73 // 1 : "Duplicate" for everybody ; 74 // 2 : "Register" only for generic accounts, 75 // "Duplicate" for all other accounts ; 76 // 77 'auto_code_dg_nb' // number of digits when creating a new code 78 => '10', // automatically, several values 79 // 80 'unknown_code' // what to do in case an unknown code is used with 81 => '1', // "autolog" parameter : 82 // 0 : nothing (display home page, index.php (not 83 // logged in of course)) ; 84 // 1 : display "access denied" page ; 85 // 2 : display an Additional Page precised below. 86 // 87 'unknown_code_ap_id' // the id of the Additional Page which must be used 88 => '0', // in case of usage of an unknow code, several vals. 89 // 90 'comment_display' // the way the comment is displayed in "entries" 91 => '1', // tab : 0, as tooltip ; 1, on a line under code 92 // 93 'in_help_display' // whether the help banner is displayed. 94 => '1', // 0: not displayed ; 1 : displayed (surprising !) 95 // 96 'display_connection' // whether the "Connection" link must be displayed 97 => '0', // for generic users, 0 or 1. 98 ); 99 100 // Gives possible values. In case values cannot be predicted, just provide an 101 // empty array : array() . 68 102 $ec_conf_possible_values = array( 69 'activated' => array('0', '1'), // 0 70 // plugin activated 71 'howto' => array('0', '1'), // 1 72 // whether the small aknowledgement message has already been displayed 73 'dup_allow' => array('0', '1', '2'), // 2 74 // duplication allowance : 75 // 0 : no account; 76 // 1 : all accounts; 77 // 2 : specified by group, type, and user ids (default). 78 // If Event Cats is in "simple mode", get the value of 79 // $conf['ec_dup_allow'] if it is set; and an allowance to duplicate only 80 // generic accounts will be defined if the value is 2. 81 'duplic_display' => array('0', '1', '2'), // 3 82 // duplication link display in the menubar : 83 // 0 : "Register" for everybody; 84 // 1 : "Duplicate" for everybody; 85 // 2 : "Register" only for generic accounts, 86 // "Duplicate" for all other accounts (default); 87 // If Event Cats is in "simple mode", takes the value of 88 // $conf['ec_duplic_display'] if it's set. 89 'auto_code_dg_nb' => array( '4', '5', '8', '10', '12', '15', 90 '16', '20', '24', '25', '30', '32'), // 4 91 // number of digits when creating a new code automatically, several values 92 // (default: 10) 93 // If Event Cats is in "simple mode", get the value of 94 // $conf['ec_auto_code_dg_nb'] if set. 95 'unknown_code' => array('0', '1', '2'), // 5 96 // what to do in case an unknown code is used with "autolog" parameter : 97 // 0 : nothing (display home page, index.php (not logged in of course)); 98 // 1 : display "access denied" page (default); 99 // 2 : display an A. P. precised below. 100 'unknown_code_ap_id' => array(), // 6 101 // the id of the Additional Page which must be used in case of usage of an 102 // unknow code; several vals (default: 0). 103 'comment_display' => array('0', '1'), // 7 104 // the way the comment is displayed in "entries" tab: 105 // 0, as tooltip; 1 (default), on a line under code 106 // If Event Cats is in "simple mode", get the value of 107 // $conf['ec_comment_display'] if set. 108 'in_help_display' => array('0', '1'), // 8 109 // whether the help banner is displayed (default: 1). 110 'display_connection' => array('0', '1'), // 9 111 // whether the "Connection" link must be displayed for generic users 112 // (default: 1) 113 // If Event Cats is in "simple mode", takes the value of 114 // $conf['ec_display_connection'] if set. 115 'simple_mode_on' => array('0', '1'), // 10 116 // whether the presentation of the plugin is in "simple mode" or not. 117 // (default: 1) 118 // The default value can be modified to 0 (normal view) if Event Cats was 119 // already installed previously. 120 'display_full_button' => array('0', '1'), // 11 121 // whether the "Show full features" button must be displayed (default: 1). 122 // The default value can be modified to 0 (don't display) if 123 // $conf['ec_display_full_button'] is set, and false. 103 'activated' => array('0', '1'), 104 'howto' => array('0', '1'), 105 'dup_allow' => array('0', '1', '2'), 106 'duplic_display' => array('0', '1', '2'), 107 'auto_code_dg_nb' => array( '4', '5', '8', '10', '12', '15', 108 '16', '20', '24', '25', '30', '32'), 109 'unknown_code' => array('0', '1', '2'), 110 'unknown_code_ap_id' => array(), 111 'comment_display' => array('0', '1'), 112 'in_help_display' => array('0', '1'), 113 'display_connection' => array('0', '1'), 124 114 ); 125 115 126 // $ec_conf_index is an array of the indexes of $ec_conf. Thus does it allow 127 // to check if X exists when asking for $ec_conf[X]. 128 $ec_conf_index = array_flip(array_keys($ec_conf_possible_values)); 129 130 // Get current value of $ec_conf, if the entry in the DB exists. 131 $t = array(); $u = '0'; $v = false; $w = false; $ec_conf = array(); $s = '0'; 132 if ($w = ( // $w becomes true if the query succeeds <=> if EC was already in 133 // $t gets event_cats config value (array to be "exploded") 134 ($t = pwg_db_fetch_row(pwg_query(" 116 // Once these lines have been updated, you don't need to change anything 117 // else. Everything is managed by the code ; the only effect being that 118 // existing configuration values in the DB are reset to their default 119 // values -- normally not a harmful effect. 120 //---------------------------------------------------------------------------- 121 122 $ec_conf_index = array_flip(array_keys($ec_conf_default)); 123 124 $t = array(); $u = '0'; $v = false; 125 if ($v = ( 126 ($t = mysql_fetch_row(pwg_query(" 135 127 SELECT `value` 136 128 FROM `".CONFIG_TABLE."` … … 139 131 ) { 140 132 $v = (count($ec_conf = explode(',', $t[0])) == count($ec_conf_index)); 141 $u = $ec_conf[$ec_conf_index['activated']]; 142 $s = ($v) ? $ec_conf[$ec_conf_index['howto']] : '0'; // the aknowledgement 143 // message is displayed again if the configuration changes 144 } 145 if ($v and !$w) die('$v true with $w false in ec_conf.inc.php'); 146 // $w is false if the entry in the table doesn't exist; 147 // $v is false if the entry in the table doesn't exist; or exists, but its 148 // number of parameters is different than the number of default parameters. 149 // $u is '0' if the plugin is not activated, '1' if it is. 150 // $s allows to display the aknowledgement message when config changes. 151 // If $v or $w are false, all $ec_conf values are set to default values. But 152 // default values must first take values specified in $conf, if they are set. 153 154 // Determine whether simple mode is ON or OFF: simple mode must be on if Event 155 // Cats is just installed, or if it was ON previously, or if 156 // $conf['ec_display_full_button'] is set and is false. 157 $simple_mode_on = ( 158 (!$v and !$w) or ( 159 isset($ec_conf[$ec_conf_index['simple_mode_on']]) and 160 $ec_conf[$ec_conf_index['simple_mode_on']] == '1' 161 ) or ( 162 isset($conf['ec_display_full_button']) and 163 $conf['ec_display_full_button'] == false 164 ) 165 ); 166 167 // Change $ec_conf values if needed 168 if (!$v or $simple_mode_on) { 169 170 // Perform repetitve work 171 function test_conf($tbl, $k, $k2 = NULL) { 172 global $ec_conf_possible_values; 173 if (!isset($k2)) $k2 = $k; 174 return (isset($tbl[$k]) and 175 in_array($tbl[$k], $ec_conf_possible_values[$k2])); 176 } 177 178 // Avoid that $conf (very big) is passed as argument to function test_conf 179 $conf_temp = array(); 180 foreach ($ec_conf_possible_values as $key => $val) 181 if (isset($conf['ec_'.$key])) $conf_temp[$key] = $conf['ec_'.$key]; 182 183 if (!$v) { 184 // Determine default values of $ec_conf 185 $ec_conf = array( 186 $ec_conf_index['activated'] => $u, 187 $ec_conf_index['howto'] => $s, 188 $ec_conf_index['dup_allow'] => 189 ($simple_mode_on and test_conf($conf_temp, 'dup_allow')) ? 190 $conf_temp['dup_allow'] 191 : (test_conf($ec_conf, $ec_conf_index['dup_allow'], 'dup_allow')) ? 192 $ec_conf[$ec_conf_index['dup_allow']] 193 : '2', 194 $ec_conf_index['duplic_display'] => 195 ($simple_mode_on and test_conf($conf_temp, 'duplic_display')) ? 196 $conf_temp['duplic_display'] 197 : (test_conf($ec_conf, $ec_conf_index['duplic_display'], 198 'duplic_display')) ? 199 $ec_conf[$ec_conf_index['duplic_display']] 200 : '2', 201 $ec_conf_index['auto_code_dg_nb'] => 202 ($simple_mode_on and test_conf($conf_temp, 'auto_code_dg_nb')) ? 203 $conf_temp['auto_code_dg_nb'] 204 : (test_conf($ec_conf, $ec_conf_index['auto_code_dg_nb'], 205 'auto_code_dg_nb')) ? 206 $ec_conf[$ec_conf_index['auto_code_dg_nb']] 207 : '10', 208 $ec_conf_index['unknown_code'] => 209 (test_conf($ec_conf, $ec_conf_index['unknown_code'], 210 'unknown_code')) ? 211 $ec_conf[$ec_conf_index['unknown_code']] 212 : '1', 213 $ec_conf_index['unknown_code_ap_id'] => 214 (isset($ec_conf[$ec_conf_index['unknown_code_ap_id']])) ? 215 $ec_conf[$ec_conf_index['unknown_code_ap_id']] 216 : '0', 217 $ec_conf_index['comment_display'] => 218 ($simple_mode_on and test_conf($conf_temp, 'comment_display')) ? 219 $conf_temp['comment_display'] 220 : (test_conf($ec_conf, $ec_conf_index['comment_display'], 221 'comment_display')) ? 222 $ec_conf[$ec_conf_index['comment_display']] 223 : '1', 224 $ec_conf_index['in_help_display'] => 225 (test_conf($ec_conf, $ec_conf_index['in_help_display'], 226 'in_help_display')) ? 227 $ec_conf[$ec_conf_index['in_help_display']] 228 : '1', 229 $ec_conf_index['display_connection'] => 230 ($simple_mode_on and test_conf($conf_temp, 'display_connection')) ? 231 $conf_temp['display_connection'] 232 : (test_conf($ec_conf, $ec_conf_index['display_connection'], 233 'display_connection')) ? 234 $ec_conf[$ec_conf_index['display_connection']] 235 : '1', 236 $ec_conf_index['simple_mode_on'] => 237 ($simple_mode_on) ? '1' : '0', 238 $ec_conf_index['display_full_button'] => 239 ($simple_mode_on and test_conf($conf_temp, 'display_full_button')) ? 240 $conf_temp['display_full_button'] 241 : (test_conf($ec_conf, $ec_conf_index['display_full_button'], 242 'display_full_button')) ? 243 $ec_conf[$ec_conf_index['display_full_button']] 244 : '1', 245 ); 246 change_ec_conf('activated', $u); // write in the DB 247 } 248 else { // $simple_mode_on is true ; check $conf values for Event Cats 249 foreach ($ec_conf_possible_values as $key => $val) 250 if (test_conf($conf_temp, $key)) 251 change_ec_conf($key, $conf_temp[$key]); 252 } 253 unset($conf_temp); 133 $u = $ec_conf[0]; 134 } 135 // $v is false 136 // _ if the entry in the table doesn't exist ; 137 // _ if the entry in the table exists, but its number of parameters is 138 // different than the number of default parameters. 139 // $u is '0' if the plugin has not yet been activated, '1' if it has been. 140 if (!$v) { 141 $ec_conf = array_values($ec_conf_default); 142 change_ec_conf('activated', $u); // writes in the DB 254 143 } 255 144 // now : 256 145 // _ the number of parameters is the same in the DB as the number of 257 // possible parameters; 258 // _ the parameters have the default values if needed; 259 // _ the plugin shows it is active if it is the case; 260 // _ correct values will be returned when using procedure read_ec_conf($c). 261 262 unset($s, $t, $u, $v, $w, $simple_mode_on); 263 // And NOW can change_ec_conf and read_ec_conf be used properly... 264 265 // --------------------------------------------------------------------------- 266 // End of $ec_conf initalization 267 // --------------------------------------------------------------------------- 146 // default parameters ; 147 // _ the parameters have the default values if needed ; 148 // _ the plugin shows it is active if it is the case. 149 unset($t, $u, $v); 268 150 269 151 /* … … 273 155 * 274 156 * @param 275 * $c : conf value to update ;157 * $c : conf value to update ; 276 158 * $v : value to give to $ec_conf[$c]. 277 159 * @return … … 280 162 function change_ec_conf($c, $v) { 281 163 global $ec_conf, $page, $ec_conf_index, $ec_conf_possible_values; 282 283 164 if (array_key_exists($c, $ec_conf_index)) { 284 165 if ( … … 309 190 * 310 191 * @param 311 * $c : conf value to update ;192 * $c : conf value to update ; 312 193 * @return 313 194 * $ec_conf value -
extensions/event_cats/include/evntcats_admin_funcs.inc.php
r7832 r8956 23 23 // +-----------------------------------------------------------------------+ 24 24 25 // Keeps file coded in UTF-8 without BOM : é25 // Keeps file coded in UTF-8 without BOM : é 26 26 27 27 // *************************************************************************** … … 77 77 function ec_end2($n) { 78 78 global $page; 79 my_error(sprintf(l10n('ec_DB_problem'), $n), false); 79 $page['errors'][] = 80 sprintf(l10n('ec_DB_problem'), $n). 81 'MySQL error '.mysql_errno().', "'.mysql_error().'"'; 80 82 return false; 81 83 } … … 135 137 $t2 = 0; $t3 = false; $t4 = false; 136 138 while ( // The check is executed once at minimum 137 !($t3 = pwg_db_fetch_row(pwg_query("139 !($t3 = mysql_fetch_row(pwg_query(" 138 140 SELECT `id` 139 141 FROM `".GROUPS_TABLE."` … … 149 151 $page['infos'][] = 150 152 sprintf(l10n('ec_group_create_OK'), $_POST['groupname']); 151 if (!$t3) my_error(sprintf(l10n('ec_group_create_pb'), 152 $_POST['groupname']).' (1) ', false); 153 if (!$t3) 154 $page['errors'][] = 155 sprintf(l10n('ec_group_create_pb'), $_POST['groupname']).' (1) : '. 156 'MySQL error '.mysql_errno().', "'.mysql_error().'"'; 153 157 if ( 154 158 pwg_query(" … … 156 160 VALUES ('".$ec_user_id."', '".$t3[0]."'); 157 161 ") === false 158 ) my_error(sprintf(l10n('ec_group_create_pb'), 159 $_POST['groupname']).' (2) ', false); 162 ) $page['errors'][] = 163 sprintf(l10n('ec_group_create_pb'), $_POST['groupname']).' (2) : '. 164 'MySQL error '.mysql_errno().', "'.mysql_error().'"'; 160 165 else $page['infos'][] = sprintf( 161 166 l10n('ec_group_create_OK2'), … … 171 176 array_key_exists($_POST['ec_in_up_cat'], $ec_lists['categories']) 172 177 ) { 173 if ( pwg_db_num_rows(pwg_query("178 if (mysql_num_rows(pwg_query(" 174 179 SELECT `id` 175 180 FROM `".CATEGORIES_TABLE."` … … 197 202 $_POST['groupname'],$ec_lists['categories'][$_POST['ec_in_up_cat']] 198 203 ); 199 else my_error(sprintf( 204 else 205 $page['errors'][] = sprintf( 200 206 l10n('ec_assoc_pb'), 201 $_POST['groupname'], 202 ), false);207 $_POST['groupname'],$ec_lists['categories'][$_POST['ec_in_up_cat']] 208 ).' : MySQL error '.mysql_errno().', "'.mysql_error().'"'; 203 209 } 204 210 } … … 231 237 SET `title` = '".implode('/user_id=', $t_user)."' 232 238 WHERE `id` = ".$_POST['ec_in_up_aps']."; 233 ") === false) my_error(sprintf( 239 ") === false) 240 $page['errors'][] = sprintf( 234 241 l10n('ec_assoc_pb'), 235 $_POST['groupname'], 236 ), false);242 $_POST['groupname'],$ec_lists['add_pages'][$_POST['ec_in_up_aps']] 243 ).' : MySQL error '.mysql_errno().', "'.mysql_error().'"'; 237 244 else $page['infos'][] = sprintf( 238 245 l10n('ec_group_create_OK2'), … … 267 274 AND `user_id` = '$ec_user_id'; 268 275 "); 269 while ($row = pwg_db_fetch_assoc($result))276 while ($row = mysql_fetch_array($result)) 270 277 $granteds[$row['cat_id']][] = $row['user_id']; 271 278 $inserts = array(); … … 283 290 $_POST['login'], $ec_lists['categories'][$_POST['ec_in_up_cat']] 284 291 ); 285 else my_error(sprintf( 292 else 293 $page['errors'][] = sprintf( 286 294 l10n('ec_assoc_pb'), 287 295 $_POST['login'], $ec_lists['categories'][$_POST['ec_in_up_cat']] 288 ), false);296 ).' : MySQL error '.mysql_errno().', "'.mysql_error().'"'; 289 297 } 290 298 } … … 395 403 if ( 396 404 !isset($_POST['ec_in_up_code']) or 397 ! preg_match('/^[a-zA-Z0-9_-]{4,32}$/', $_POST['ec_in_up_code'])405 !ereg('^[a-zA-Z0-9_-]{4,32}$', $_POST['ec_in_up_code']) 398 406 ) return ec_end1('ec_in_up_code', 'Improper code : '); 399 407 else $ec_code = $_POST['ec_in_up_code']; … … 545 553 $arg2p = ($arg2 == 'NULL') ? 'IS NULL' : ' = '.$arg2; 546 554 $ec_user_idp = ($ec_user_id == 'NULL') ? 'IS NULL' : ' = '.$ec_user_id; 547 if (($t1 = pwg_db_fetch_row(pwg_query("555 if (($t1 = mysql_fetch_row(pwg_query(" 548 556 SELECT `id` 549 557 FROM `".EVNTCATS_TABLE."` … … 563 571 if ($del_other) { 564 572 if (( 565 $t1 = pwg_db_fetch_row(pwg_query("573 $t1 = mysql_fetch_row(pwg_query(" 566 574 SELECT `code` 567 575 FROM `".EVNTCATS_TABLE."` … … 573 581 FROM `".EVNTCATS_TABLE."` 574 582 WHERE `code` = '".$t1[0]."' 575 AND `action` IS NOT NULL576 583 AND `id` <> ".$_POST['ec_entry_sel'] 577 584 ); 578 while ($t2 = pwg_db_fetch_row($r)) if (!ec_delete_entry_OK($t2[0]))585 while ($t2 = mysql_fetch_row($r)) if (!ec_delete_entry_OK($t2[0])) 579 586 return false; 580 587 } … … 599 606 ") === false 600 607 ) { 601 my_error(l10n('ec_entry_create_pb'), false); 608 $page['errors'][] = 609 l10n('ec_entry_create_pb').' : '. 610 'MySQL error '.mysql_errno().', "'.mysql_error().'"' 611 ; 602 612 $ret = false; 603 613 } 604 614 else { 605 $t5 = pwg_db_insert_id(EVNTCATS_TABLE);606 615 build_ec_lists(); // Don't remember exactly why, but must be done here 607 616 $forced = ($forced == 'false') ? '' : l10n('ec_cnfrm_forced'); 608 617 $page['infos'][] = 609 sprintf(l10n('ec_entry_create_OK'), $t5).618 sprintf(l10n('ec_entry_create_OK'), mysql_insert_id()). 610 619 $ec_code.' => '. 611 620 $ec_lists['user_ids'][$ec_user_id].$forced … … 628 637 ") === false 629 638 ) { 630 my_error(l10n('ec_entry_create_pb'), false); 639 $page['errors'][] = 640 l10n('ec_entry_create_pb').' : '. 641 'MySQL error '.mysql_errno().', "'.mysql_error().'"' 642 ; 631 643 $ret = false; 632 644 } … … 650 662 function ec_delete_entry_OK($ec_id) { 651 663 global $page; 652 if (count($t = pwg_db_fetch_row(pwg_query("664 if (count($t = mysql_fetch_row(pwg_query(" 653 665 SELECT `code` 654 666 FROM `".EVNTCATS_TABLE."` … … 662 674 WHERE `id` = ".$ec_id 663 675 ) === false) { 664 my_error(sprintf(l10n('ec_entry_del_nok'), $ec_id), false); 676 $page['errors'][] = 677 sprintf(l10n('ec_entry_del_nok'), 678 $ec_id). 679 'MySQL error '.mysql_errno().', "'.mysql_error().'"'; 665 680 return false; 666 681 } -
extensions/event_cats/include/evntcats_main_funcs.inc.php
r7663 r8956 77 77 */ 78 78 function ec_image_exists($cat, $img) { 79 return ( pwg_db_fetch_row(pwg_query("79 return (mysql_fetch_row(pwg_query(" 80 80 SELECT * 81 81 FROM `".IMAGE_CATEGORY_TABLE."` … … 88 88 * str_from_var($var) 89 89 * returns a string easing array var informations displaying in Piwigo : 90 * _ the string return value starts with"<p style = "text-align:left;">" ;90 * _ the string return value starts with"<p align="left">" ; 91 91 * _ all "TAB" characters (chr(10)) are replaced by "<br>" ; 92 92 * _ all spaces are replaced by " ". … … 99 99 function str_from_var($var) { 100 100 return 101 '<p style = "text-align:left;">'.101 '<p align="left">'. 102 102 str_replace( 103 103 chr(10),'<br>', … … 190 190 if (defined('ADD_PAGES_TABLE')) { 191 191 $res = pwg_query("SELECT `id`, `title` FROM `".ADD_PAGES_TABLE."`;"); 192 while ($r = pwg_db_fetch_assoc($res)) {192 while ($r = mysql_fetch_array($res)) { 193 193 $a = (is_in($r['title'], '/user_id=')) ? 194 194 explode('/user_id=' , $r['title']) : array($r['title']); … … 261 261 SELECT * 262 262 FROM `".EVNTCATS_TABLE."` 263 WHERE `code` IS NOT NULL 264 AND `action` IS NOT NULL 263 WHERE `code` IS NOT NULL 265 264 ORDER BY `id` 266 265 "); 267 while ($r = pwg_db_fetch_assoc($q))266 while ($r = mysql_fetch_assoc($q)) 268 267 $ec_lists['ec_table'][intval($r['id'])] = $r; 269 268 … … 332 331 * the global array variable $ec_lists. 333 332 * @return 334 * true or false whether duplication based on user type exists 335 * (user types are guest (0), contact (1), friend (2), family (4), and 336 * admin should be 8, but is not used, as admins can't duplicate; 8 is used 337 * for generic users, and is managed slightly differently as it is not 338 * actually a "user type") 333 * (no return value) 339 334 */ 340 335 function build_dup_groups() { … … 383 378 // certain group (in groups, level (friends, family, contacts), 384 379 // or user status (generic)) 385 $types_entry_exists = (($t = pwg_db_fetch_row(pwg_query("380 $types_entry_exists = (($t = mysql_fetch_row(pwg_query(" 386 381 SELECT `arg2` 387 382 FROM `".EVNTCATS_TABLE."` … … 483 478 AND `user_id` > 2; 484 479 "); 485 while ($row = pwg_db_fetch_assoc($result)) {480 while ($row = mysql_fetch_array($result)) { 486 481 if (!isset($user_granted_from_type[$row['level']])) { 487 482 $user_granted_from_type[$row['level']] = array(); … … 522 517 AND `user_id` > 2; 523 518 "); 524 while ($row = pwg_db_fetch_assoc($result)) {519 while ($row = mysql_fetch_array($result)) { 525 520 if (!isset($granted_groups[$row['group_id']])) { 526 521 $granted_groups[$row['group_id']] = array(); -
extensions/event_cats/language/en_UK/duplic.lang.php
r7832 r8956 7 7 */ 8 8 9 // Keeps file coded in UTF-8 without BOM : é9 // Keeps file coded in UTF-8 without BOM : é 10 10 11 11 $lang['Duplicate'] = 'Duplicate'; -
extensions/event_cats/language/en_UK/plugin.lang.php
r7847 r8956 7 7 */ 8 8 9 // Keeps file coded in UTF-8 without BOM : é9 // Keeps file coded in UTF-8 without BOM : é 10 10 11 11 // Convenient … … 19 19 // "Header" 20 20 $lang['Admin page title'] = 'Event Categories'; 21 $lang['Acknowledgement'] = 'the purpose of this extension is to allow automatic logging of an account ("autolog"), and duplication of the account with which the visitor is currently logged in ("duplication").<br ><br>Many thanks to the Forum, plg, ddtddt, flipflip, VDigital, Gotcha for the tests, P@t for the main code :-) !';22 $lang['JS needed'] = 'Java Script MUST be activated for this page to work properly!';21 $lang['Acknowledgement'] = 'the purpose of this extension is to allow automatic logging of an account ("autolog"), and duplication of the account with which the visitor is currently logged in ("duplication").<br /><br />Many thanks to the Forum, plg, ddtddt, flipflip, VDigital, Gotcha for the tests, P@t for the main code :-) !'; 22 $lang['JS needed'] = 'Javascript MUST be activated for this page to work properly !'; 23 23 $lang['Show'] = 'show'; 24 24 $lang['Hide'] = 'hide'; 25 25 26 26 // Autolog page 27 $lang['Additional Pages active'] = 'Additional Pages plugin : activated';28 $lang['Additional Pages inactive'] = $t_ap2.' plugin (display a text page) : not activated';27 $lang['Additional Pages active'] = 'Additional Pages plugin : activated'; 28 $lang['Additional Pages inactive'] = $t_ap2.' plugin (display a text page) : not activated'; 29 29 $lang['Autolog entries'] = '"Autolog" entries'; 30 30 $lang['Place title on top ttip'] = 'Display this title in the head of the page'; … … 37 37 $lang['Tools'] = 'Tools'; 38 38 $lang['Selected entry'] = 'Selected entry'; 39 $lang['URL'] = 'URL : ';39 $lang['URL'] = 'URL : '; 40 40 $lang['Test'] = 'Test'; 41 41 $lang['Delete'] = 'Delete'; … … 55 55 $lang['New entry'] = 'New entry'; 56 56 $lang['Full auto'] = 'Full auto (select first a page to display)'; 57 $lang['New code'] = 'New code :';57 $lang['New code'] = 'New code :'; 58 58 $lang['Auto code button'] = 'Generate a code'; 59 59 $lang['Auto code mid'] = 'having'; … … 63 63 $lang['Comment'] = 'Comment'; 64 64 $lang['Optional'] = 'Personal memo displayed only in administration pages'; 65 $lang['Existing code'] = 'Existing code :';65 $lang['Existing code'] = 'Existing code :'; 66 66 $lang['Identified user'] = 'Identified user'; 67 67 $lang['No user'] = 'None (outdated entry)'; … … 69 69 $lang['New username'] = 'Username'; 70 70 $lang['New password'] = 'Password'; 71 $lang['Confirm password'] = 'Confirm pwd :';71 $lang['Confirm password'] = 'Confirm pwd :'; 72 72 $lang['New group'] = 'New group'; 73 73 $lang['Generate username'] = 'Generate a username (select first a page to display)'; 74 $lang['Existing user'] = 'Existing user :';74 $lang['Existing user'] = 'Existing user :'; 75 75 $lang['Displayed page'] = 'Displayed page'; 76 76 $lang['Forced'] = 'Forced'; … … 80 80 $lang['Home'] = 'Home'; 81 81 $lang['Access denied'] = 'Access denied'; 82 $lang['Validity date'] = 'Validity date';83 $lang['Activate'] = 'Activate';84 $lang['Now + 2 mn'] = 'Now + 2 mn';85 $lang['Now button tooltip'] = 'Validity period can\'t be less than 1 mn. Considering processing time, 2 mn are required here.';86 $lang['Set time to'] = 'Set time to';87 $lang['Hours field tooltip'] = 'Format: hh:mm or h:m';88 $lang['Add'] = 'Add';89 $lang['Add button tooltip'] = 'Add following period to above selected date';90 $lang['Minutes'] = 'minute(s)';91 $lang['Hours'] = 'hour(s)';92 $lang['Days'] = 'day(s)';93 $lang['Months'] = 'month(s)';94 $lang['Years'] = 'year(s)';95 $lang['Do notify'] = 'When the code has<br>expired, notify';96 $lang['Notify label tooltip'] = 'This checkbox is ticked when one of the next checkboxes is';97 $lang['The user'] = 'the user';98 $lang['The webmaster'] = 'the webmaster';99 $lang['All administrators'] = 'all administrators';100 $lang['Page once code outdated'] = 'Page to assign to the code,<br>once it has expired';101 82 102 83 // Duplication page … … 107 88 $lang['Selection per group'] = 'Selection by group'; 108 89 $lang['All accounts'] = 'All accounts'; 109 $lang['Register replacement'] = 'Register link :%1$s for all accounts that can be duplicated,%1$s replace "%2$s" with "%3$s"';110 // %1$s : line feed; %2$s: "register"; %3$s: "duplicate"90 $lang['Register replacement'] = 'Register link :%1$s for all accounts that can be duplicated,%1$s replace "%2$s" with "%3$s"'; 91 // %1$s : nice line feed ; %2$s : "register" ; %3$s : "duplicate" 111 92 $lang['All but generics'] = 'All accounts but generic ones'; 112 93 $lang['Duplication allowed'] = 'Duplication allowed'; … … 133 114 $lang['Banner off'] = 'Desactivated'; 134 115 $lang['Display connection'] = 'Display "%2$s" link%1$s to generic users'; 135 // %1$s : line feed; %2$s: "Connection"116 // %1$s : nice line feed ; %2$s : "Connection" 136 117 137 118 // JS messages 138 $lang['ec_confirm_test'] = "Really test the selected code ?\n\rThis will terminate your administration session.";139 $lang['ec_confirm_delete'] = "Do you really want to delete the selected entry ?";140 $lang['ec_confirm_disable'] = "Do you really want to make the selected entry outdated ?\n\rThis will delete all other entries using the same code, if any.";141 $lang['ec_confirm_force'] = "Do you really want to force the displayed page for the selected entry ?\n\rThis will delete all other entries using the same code, if any.";119 $lang['ec_confirm_test'] = "Really test the selected code ?\n\rThis will terminate your administration session."; 120 $lang['ec_confirm_delete'] = "Do you really want to delete the selected entry ?"; 121 $lang['ec_confirm_disable'] = "Do you really want to make the selected entry outdated ?\n\rThis will delete all other entries using the same code, if any."; 122 $lang['ec_confirm_force'] = "Do you really want to force the displayed page for the selected entry ?\n\rThis will delete all other entries using the same code, if any."; 142 123 $lang['ec_confirm_del_other'] = "This will delete all other entries using the same code, if any.\n\rOK?"; 143 124 $lang['ec_confirm_change_user'] = "Username modification will delete\n\rall other entries using the same code, if any. OK?"; … … 184 165 $lang['ec_image_miss'] = 'image doesn\'t exist (probably deleted)'; 185 166 $lang['ec_add_page_miss'] = 'Additional Pages page doesn\'t exist (probably deleted)'; 186 $lang['ec_entry_del_nok'] = 'Problem when deleting entry %s : ';167 $lang['ec_entry_del_nok'] = 'Problem when deleting entry %s : '; 187 168 $lang['ec_user_create_pb'] = 'New user creation impossible'; 188 169 $lang['ec_user_generic_pb'] = 'Problem when making user "%s" generic'; … … 193 174 $lang['ec_entry_dont_exist'] = 'Entry %s doesn\'t exist'; 194 175 $lang['ec_assoc_pb'] = 'Impossible to link "%1$s" to "%2$s"'; 195 $lang['ec_DB_problem'] = 'Database access problem (position %s) : ';176 $lang['ec_DB_problem'] = 'Database access problem (position %s) : '; 196 177 197 178 // Entries table … … 203 184 $lang['ec_nok'] = 'NO'; 204 185 $lang['ec_nok_ap_pb'] = 'NO'; 205 $lang['ec_nok_userid_miss'] = 'NO : user unknown';206 $lang['ec_nok_action_pb'] = 'NO : "action" corrupted';207 $lang['ec_nok_userid_pb'] = 'NO : "user_id" corrupted';186 $lang['ec_nok_userid_miss'] = 'NO : user unknown'; 187 $lang['ec_nok_action_pb'] = 'NO : "action" corrupted'; 188 $lang['ec_nok_userid_pb'] = 'NO : "user_id" corrupted'; 208 189 // Username can't be displayed 209 190 $lang['ec_dspl_nok_actn'] = '"action" unusable'; … … 211 192 $lang['ec_dspl_nok_usr'] = 'User n°%s doesn\'t exist'; 212 193 // displayed pages 213 $lang['ec_dspl_ok_cat'] = 'Category n°%1$s : %2$s';214 // %1$s : category id, %2$s: name215 $lang['ec_dspl_ok_img2'] = 'image n°%1$s : %2$s (%3$s)';216 // %1$s : image id, %2$s: name, %3$s: filename217 $lang['ec_dspl_ok_ap'] = 'Additional Page n°%1$s : %2$s';218 // %1$s : add. p. id, %2$s: name194 $lang['ec_dspl_ok_cat'] = 'Category n°%1$s : %2$s'; 195 // %1$s : category id, %2$s : name 196 $lang['ec_dspl_ok_img2'] = 'image n°%1$s : %2$s (%3$s)'; 197 // %1$s : image id, %2$s : name, %3$s : filename 198 $lang['ec_dspl_ok_ap'] = 'Additional Page n°%1$s : %2$s'; 199 // %1$s : add. p. id, %2$s : name 219 200 $lang['ec_dspl_nok_ap'] = ' (Additional Page n°%s doesn\'t exist)'; 220 201 $lang['ec_dspl_nok_cat'] = ' (catégorie n°%s doesn\'t exist)'; 221 202 $lang['ec_dspl_nok_img2'] = ' (image n°%1$s doesn\'t exist in category n°%2$s)'; 222 // %1$s : image id, %2$s: category id203 // %1$s : image id, %2$s : category id 223 204 224 205 // Help banner … … 233 214 234 215 // Modify entry tab, general case 235 $lang['ec_help_banner1_new_m'] = 'Select a <span class = "help_bi">code</span> to change the corresponding <span class = "help_bi">identified user</span> and / or the <span class = "help_bi">page to be displayed</span>. If you <span class = "help_b">force</span> the page to be displayed, or change the identified user, other entries using the same code will be deleted. Choosing <span class = "help_b">None</span> as identified user, or <span class = "help_b">Access denied</span> as page to display, will render the entry "outdated" : no identification, but you can display a personalized page to give an explanation. To <span class = "help_b">generate a username</span>, select first the <span class = "help_bi">page to display</span>, as the username based on the name of the page to display.';216 $lang['ec_help_banner1_new_m'] = 'Select a <span class = "help_bi">code</span> to change the corresponding <span class = "help_bi">identified user</span> and / or the <span class = "help_bi">page to be displayed</span>. If you <span class = "help_b">force</span> the page to be displayed, or change the identified user, other entries using the same code will be deleted. Choosing <span class = "help_b">None</span> as identified user, or <span class = "help_b">Access denied</span> as page to display, will render the entry "outdated" : no identification, but you can display a personalized page to give an explanation. To <span class = "help_b">generate a username</span>, select first the <span class = "help_bi">page to display</span>, as the username based on the name of the page to display.'; 236 217 237 218 // Modify entry tab, disable case … … 242 223 243 224 // Configuration tab 244 $lang['ec_help_banner1_config'] = '<span class = "help_i">Duplicate an account</span> when a user is already identified, creates another account having exactly the same permissions: no need to wait for an administrator\'s validation. — Select the page you want to be displayed in case of an unknown code usage (for instance, a code you have deleted). — In the "Autolog entries" tab, the comments can be displayed as tooltips, or on a new line under the code. — As you\'re currently reading it, the help banner is currently active ;-) ! —Display the "Connection" link to generic users, allows users already registered on your gallery to log in easily.';225 $lang['ec_help_banner1_config'] = '<span class = "help_i">Duplicate an account</span> when a user is already identified, creates another account having exactly the same permissions: no need to wait for an administrator\'s validation. — Select the page you want to be displayed in case of an unknown code usage (for instance, a code you have deleted). — In the "Autolog entries" tab, the comments can be displayed as tooltips, or on a new line under the code. — As you\'re currently reading it, the help banner is currently active ;-) ! — Display the "Connection" link to generic users, allows users already registered on your gallery to log in easily.'; 245 226 246 227 -
extensions/event_cats/language/fr_FR/duplic.lang.php
r7832 r8956 7 7 */ 8 8 9 // Keeps file coded in UTF-8 without BOM : é9 // Keeps file coded in UTF-8 without BOM : é 10 10 11 11 $lang['Duplicate'] = 'Dupliquer'; -
extensions/event_cats/language/fr_FR/plugin.lang.php
r7847 r8956 7 7 */ 8 8 9 // Keeps file coded in UTF-8 without BOM : é9 // Keeps file coded in UTF-8 without BOM : é 10 10 11 11 // Convenient … … 19 19 // "Header" 20 20 $lang['Admin page title'] = 'Event Categories'; 21 $lang['Acknowledgement'] = 'Event Categories, pour catégories événementielles :<br>cette extension permet d\'identifier automatiquement un compte ("autolog"), et de dupliquer le compte sous lequel un visiteur est identifié ("duplication").<br><br>Merci au Forum, plg, ddtddt, flipflip, VDigital, Gotcha pour les tests, P@t pour le code principal :-) !';22 $lang['JS needed'] = 'Java Script DOIT être activé sur votre navigateur pour un fonctionnement correct de cette page !';21 $lang['Acknowledgement'] = 'Event Categories, pour catégories événementielles :<br />cette extension permet d\'identifier automatiquement un compte ("autolog"), et de dupliquer le compte sous lequel un visiteur est identifié ("duplication").<br /><br />Merci au Forum, plg, ddtddt, flipflip, VDigital, Gotcha pour les tests, P@t pour le code principal :-) !'; 22 $lang['JS needed'] = 'Javascript DOIT être activé sur votre navigateur pour un fonctionnement correct de cette page !'; 23 23 $lang['Show'] = 'montrer'; 24 24 $lang['Hide'] = 'cacher'; 25 25 26 26 // Autolog page 27 $lang['Additional Pages active'] = 'Plugin Additional Pages : actif';28 $lang['Additional Pages inactive'] = 'Plugin '.$t_ap2.' (afficher une page de texte) : inactif';27 $lang['Additional Pages active'] = 'Plugin Additional Pages : actif'; 28 $lang['Additional Pages inactive'] = 'Plugin '.$t_ap2.' (afficher une page de texte) : inactif'; 29 29 $lang['Autolog entries'] = 'Entrées du paramètre "autolog"'; 30 30 $lang['Place title on top ttip'] = 'Placer ce titre en haut de la page'; … … 33 33 $lang['Code'] = 'Code'; 34 34 $lang['Username'] = 'Utilisateur'; 35 $lang['Identification'] = 'Identification ?';35 $lang['Identification'] = 'Identification ?'; 36 36 $lang['Displayed page'] = 'Page affichée'; 37 37 $lang['Tools'] = 'Outils'; 38 38 $lang['Selected entry'] = 'Entrée sélectionnée'; 39 $lang['URL'] = 'URL : ';39 $lang['URL'] = 'URL : '; 40 40 $lang['Test'] = 'Tester'; 41 41 $lang['Delete'] = 'Supprimer'; … … 55 55 $lang['New entry'] = 'Nouvelle entrée'; 56 56 $lang['Full auto'] = 'Tout automatique (sélectionnez d\'abord une page à afficher)'; 57 $lang['New code'] = 'Nouveau code :';57 $lang['New code'] = 'Nouveau code :'; 58 58 $lang['Auto code button'] = 'Générer un code'; 59 59 $lang['Auto code mid'] = 'de'; … … 63 63 $lang['Comment'] = 'Commentaire'; 64 64 $lang['Optional'] = 'Note personnelle visible uniquement dans l\'administration'; 65 $lang['Existing code'] = 'Code existant :';65 $lang['Existing code'] = 'Code existant :'; 66 66 $lang['Identified user'] = 'Utilisateur identifié'; 67 67 $lang['No user'] = 'Aucun (entrée périmée)'; 68 $lang['New generic user'] = 'Nouvel utilisateur (créer un compte générique) :';68 $lang['New generic user'] = 'Nouvel utilisateur (créer un compte générique) :'; 69 69 $lang['New username'] = 'Nom d\'utilisateur'; 70 70 $lang['New password'] = 'Mot de passe'; 71 $lang['Confirm password'] = 'Confirmez :';71 $lang['Confirm password'] = 'Confirmez :'; 72 72 $lang['New group'] = 'Nouveau groupe'; 73 73 $lang['Generate username'] = 'Générer un nom d\'utilisateur (sélectionnez d\'abord une page à afficher)'; 74 $lang['Existing user'] = 'Utilisateur existant :';74 $lang['Existing user'] = 'Utilisateur existant :'; 75 75 $lang['Displayed page'] = 'Page affichée'; 76 76 $lang['Forced'] = 'Forcée'; … … 80 80 $lang['Home'] = 'Accueil'; 81 81 $lang['Access denied'] = 'Accès refusé'; 82 $lang['Validity date'] = 'Date de validité';83 $lang['Activate'] = 'Activer';84 $lang['Now + 2 mn'] = 'Maintenant + 2 mn';85 $lang['Now button tooltip'] = 'La période de validité ne peut être inférieure à 1 mn. Compte tenu des temps de traitement, 2 mn sont nécessaires ici.';86 $lang['Set time to'] = 'Régler l\'heure à';87 $lang['Hours field tooltip'] = 'Format : hh:mm ou h:m';88 $lang['Add'] = 'Ajouter';89 $lang['Add button tooltip'] = 'Ajouter la période de temps choisie à la date ci-dessus';90 $lang['Minutes'] = 'minute(s)';91 $lang['Hours'] = 'heure(s)';92 $lang['Days'] = 'jour(s)';93 $lang['Months'] = 'mois';94 $lang['Years'] = 'année(s)';95 $lang['Do notify'] = 'Lorsque le code<br>a expiré, notifier';96 $lang['Notify label tooltip'] = 'Cette case est cochée lorsqu\'une des cases ci-contre l\'est';97 $lang['The user'] = 'l\'utilisateur';98 $lang['The webmaster'] = 'le webmestre';99 $lang['All administrators'] = 'tous les administrateurs';100 $lang['Page once code outdated'] = 'Page à affecter au code,<br>une fois qu\'il a expiré';101 82 102 83 // Duplication page … … 107 88 $lang['Selection per group'] = 'Sélection par groupes'; 108 89 $lang['All accounts'] = 'Tous les comptes'; 109 $lang['Register replacement'] = 'Affichage du lien d\'enregistrement :%1$s pour les comptes pouvant être dupliqués,%1$s remplacer "%2$s" par "%3$s"';110 // %1$s : line feed ; %2$s : "register" ; %3$s : "duplicate"90 $lang['Register replacement'] = 'Affichage du lien d\'enregistrement :%1$s pour les comptes pouvant être dupliqués,%1$s remplacer "%2$s" par "%3$s"'; 91 // %1$s : nice line feed ; %2$s : "register" ; %3$s : "duplicate" 111 92 $lang['All but generics'] = 'Tous les comptes sauf les génériques'; 112 93 $lang['Duplication allowed'] = 'Duplication autorisée'; … … 133 114 $lang['Banner off'] = 'Désactivé'; 134 115 $lang['Display connection'] = 'Afficher le lien "%2$s"%1$s pour les utilisateurs génériques'; 135 // %1$s : line feed ; %2$s : "Connection"116 // %1$s : nice line feed ; %2$s : "Connection" 136 117 137 118 // JS messages … … 184 165 $lang['ec_image_miss'] = 'image inexistante (probablement supprimée)'; 185 166 $lang['ec_add_page_miss'] = 'page Additional Pages inexistante (probablement supprimée)'; 186 $lang['ec_entry_del_nok'] = 'Problème avec suppression entrée %s : ';167 $lang['ec_entry_del_nok'] = 'Problème avec suppression entrée %s : '; 187 168 $lang['ec_user_create_pb'] = 'Création nouvel utilisateur impossible'; 188 169 $lang['ec_user_generic_pb'] = 'Problème passage générique utilisateur "%s"'; … … 193 174 $lang['ec_entry_dont_exist'] = 'Entrée %s inexistante'; 194 175 $lang['ec_assoc_pb'] = 'Association "%1$s" à "%2$s" impossible'; 195 $lang['ec_DB_problem'] = 'Problème d\'accès à la base (position %s) : ';176 $lang['ec_DB_problem'] = 'Problème d\'accès à la base (position %s) : '; 196 177 197 178 // Entries table … … 203 184 $lang['ec_nok'] = 'NON'; 204 185 $lang['ec_nok_ap_pb'] = 'NON'; 205 $lang['ec_nok_userid_miss'] = 'NON : utilisateur inconnu';206 $lang['ec_nok_action_pb'] = 'NON : "action" corrompu';207 $lang['ec_nok_userid_pb'] = 'NON : "user_id" corrompu';186 $lang['ec_nok_userid_miss'] = 'NON : utilisateur inconnu'; 187 $lang['ec_nok_action_pb'] = 'NON : "action" corrompu'; 188 $lang['ec_nok_userid_pb'] = 'NON : "user_id" corrompu'; 208 189 // Username can't be displayed 209 190 $lang['ec_dspl_nok_actn'] = '"action" inutilisable'; … … 211 192 $lang['ec_dspl_nok_usr'] = 'Utilisateur n°%s n\'existe pas'; 212 193 // displayed pages 213 $lang['ec_dspl_ok_cat'] = 'Catégorie n°%1$s : %2$s';194 $lang['ec_dspl_ok_cat'] = 'Catégorie n°%1$s : %2$s'; 214 195 // %1$s : category id, %2$s : name 215 $lang['ec_dspl_ok_img2'] = 'image n°%1$s : %2$s (%3$s)';196 $lang['ec_dspl_ok_img2'] = 'image n°%1$s : %2$s (%3$s)'; 216 197 // %1$s : image id, %2$s : name, %3$s : filename 217 $lang['ec_dspl_ok_ap'] = 'Additional Page n°%1$s : %2$s';198 $lang['ec_dspl_ok_ap'] = 'Additional Page n°%1$s : %2$s'; 218 199 // %1$s : add. p. id, %2$s : name 219 200 $lang['ec_dspl_nok_ap'] = ' (Additional Page n°%s n\'existe pas)'; … … 224 205 // Help banner 225 206 // Entries tab 226 $lang['ec_help_banner1_entries'] = '<ul><li style = "list-style-image:url(plugins/event_cats/icon/disable.png);"><span class = "help_b">Rendre l\'entrée périmée</span> : pour désactiver un code, mais en affichant un message personnalisé ;</li><li style = "list-style-image:url(plugins/event_cats/icon/nforced.png);"><span class = "help_b">Forcer</span> : pour empêcher les utilisateurs d\'essayer d\'atteindre d\'autres pages en modifiant l\'URL ;<li style = "list-style-image:url(plugins/event_cats/icon/forced.png);"><span class = "help_b">Ne plus forcer</span> : pour pouvoir proposer plusieurs pages à afficher en utilisant le même code ;</li><li style = "list-style-image:url(plugins/event_cats/icon/duplicate.png);"><span class = "help_b">Recopier</span> : pour créer une autre entrée qui utilise le même code, mais redirige vers une autre page ;</li><li style = "list-style-image:url(plugins/event_cats/icon/url2.png);"><span class = "help_b">Tester</span> : pour voir si ça fonctionne ;-) ;</li><li style = "list-style-image:url(plugins/event_cats/icon/delete.png);"><span class = "help_b">Supprimer</span> : supprimer l\'entrée ;</li><li style = "list-style-image:url(plugins/event_cats/icon/modify.png);"><span class = "help_b">Modifier</span> : modifier l\'entrée.</ul>';207 $lang['ec_help_banner1_entries'] = '<ul><li style = "list-style-image:url(plugins/event_cats/icon/disable.png);"><span class = "help_b">Rendre l\'entrée périmée</span> : pour désactiver un code, mais en affichant un message personnalisé ;</li><li style = "list-style-image:url(plugins/event_cats/icon/nforced.png);"><span class = "help_b">Forcer</span> : pour empêcher les utilisateurs d\'essayer d\'atteindre d\'autres pages en modifiant l\'URL ;<li style = "list-style-image:url(plugins/event_cats/icon/forced.png);"><span class = "help_b">Ne plus forcer</span> : pour pouvoir proposer plusieurs pages à afficher en utilisant le même code ;</li><li style = "list-style-image:url(plugins/event_cats/icon/duplicate.png);"><span class = "help_b">Recopier</span> : pour créer une autre entrée qui utilise le même code, mais redirige vers une autre page ;</li><li style = "list-style-image:url(plugins/event_cats/icon/url2.png);"><span class = "help_b">Tester</span> : pour voir si ça fonctionne ;-) ;</li><li style = "list-style-image:url(plugins/event_cats/icon/delete.png);"><span class = "help_b">Supprimer</span> : supprimer l\'entrée ;</li><li style = "list-style-image:url(plugins/event_cats/icon/modify.png);"><span class = "help_b">Modifier</span> : modifier l\'entrée.</ul>'; 227 208 228 209 // New entry tab, general case … … 233 214 234 215 // Modify entry tab, general case 235 $lang['ec_help_banner1_new_m'] = 'Sélectionnez un <span class = "help_bi">code</span> pour en changer l\'<span class = "help_bi">utilisateur à identifier</span> et / ou la <span class = "help_bi">page à afficher</span>. Si vous <span class = "help_b">forcez</span> l\'affichage ou si vous changez d\'utilisateur, toutes les autres entrées utilisant le même code seront supprimées. Choisir <span class = "help_b">aucun utilisateur</span>, ou <span class = "help_b">accès refusé</span> comme page à afficher, rend l\'entrée sélectionnée "périmée" : pas d\'utilisateur identifié, mais possibilité d\'afficher une page personnalisée pour donner une explication. Pour <span class = "help_b">générer un nom d\'utilisateur</span>, sélectionnez d\'abord la <span class = "help_bi">page à afficher</span> car le nom d\'utilisateur est construit sur la base du nom de cette page.';216 $lang['ec_help_banner1_new_m'] = 'Sélectionnez un <span class = "help_bi">code</span> pour en changer l\'<span class = "help_bi">utilisateur à identifier</span> et / ou la <span class = "help_bi">page à afficher</span>. Si vous <span class = "help_b">forcez</span> l\'affichage ou si vous changez d\'utilisateur, toutes les autres entrées utilisant le même code seront supprimées. Choisir <span class = "help_b">aucun utilisateur</span>, ou <span class = "help_b">accès refusé</span> comme page à afficher, rend l\'entrée sélectionnée "périmée" : pas d\'utilisateur identifié, mais possibilité d\'afficher une page personnalisée pour donner une explication. Pour <span class = "help_b">générer un nom d\'utilisateur</span>, sélectionnez d\'abord la <span class = "help_bi">page à afficher</span> car le nom d\'utilisateur est construit sur la base du nom de cette page.'; 236 217 237 218 // Modify entry tab, disable case … … 239 220 240 221 // Duplicate tab 241 $lang['ec_help_banner1_duplic'] = '<span class = "help_i">Dupliquer un compte</span> alors qu\'un utilisateur est déjà identifié, crée un autre compte avec exactement les mêmes accès, immédiatement : pas besoin d\'attendre la validation d\'un administrateur. Sélectionnez les <span class = "help_bi">groupes</span>, <span class = "help_bi">types</span>, et / ou directement les <span class = "help_bi">utilisateurs</span> qui pourront dupliquer leur compte. Affichez "<span class = "help_b">S\'enregistrer</span>" pour les comptes génériques afin que la duplication leur soit transparente (voir <a href="popuphelp.php?page=help" onclick="popuphelp(this.href); return false;" title="Aide"><img src="admin/template/goto/theme/clear/icon/help.png" class="button" alt="(?)"> la page d\'aide</a> pour plus de détails).';222 $lang['ec_help_banner1_duplic'] = '<span class = "help_i">Dupliquer un compte</span> alors qu\'un utilisateur est déjà identifié, crée un autre compte avec exactement les mêmes accès, immédiatement : pas besoin d\'attendre la validation d\'un administrateur. Sélectionnez les <span class = "help_bi">groupes</span>, <span class = "help_bi">types</span>, et / ou directement les <span class = "help_bi">utilisateurs</span> qui pourront dupliquer leur compte. Affichez "<span class = "help_b">S\'enregistrer</span>" pour les comptes génériques afin que la duplication leur soit transparente (voir <a href="popuphelp.php?page=help" onclick="popuphelp(this.href); return false;" title="Aide"><img src="admin/template/goto/theme/clear/icon/help.png" class="button" alt="(?)"> la page d\'aide</a> pour plus de détails).'; 242 223 243 224 // Configuration tab 244 $lang['ec_help_banner1_config'] = '<span class = "help_i">Dupliquer un compte</span> alors qu\'on est déjà identifié, crée un autre compte avec exactement les mêmes accès, immédiatement : pas besoin d\'attendre la validation d\'un administrateur. — Sélectionnez la page que vous voulez afficher lors de l\'utilisation d\'un code "autolog" inexistant (par exemple, que vous aurez supprimé). — Dans l\'onglet "entrées", les commentaires peuvent être affichés en info-bulle ou en-dessous du code. — Puisque vous êtes en train de le lire, le bandeau d\'aide est actuellement actif ;-) ! —Afficher le lien "Connection" pour les utilisateurs génériques permet aux visiteurs déjà enregistrés sur votre galerie de s\'identifier facilement.';225 $lang['ec_help_banner1_config'] = '<span class = "help_i">Dupliquer un compte</span> alors qu\'on est déjà identifié, crée un autre compte avec exactement les mêmes accès, immédiatement : pas besoin d\'attendre la validation d\'un administrateur. — Sélectionnez la page que vous voulez afficher lors de l\'utilisation d\'un code "autolog" inexistant (par exemple, que vous aurez supprimé). — Dans l\'onglet "entrées", les commentaires peuvent être affichés en info-bulle ou en-dessous du code. — Puisque vous êtes en train de le lire, le bandeau d\'aide est actuellement actif ;-) ! — Afficher le lien "Connection" pour les utilisateurs génériques permet aux visiteurs déjà enregistrés sur votre galerie de s\'identifier facilement.'; 245 226 246 227 -
extensions/event_cats/main.inc.php
r7165 r8956 3 3 /* 4 4 Plugin Name: Event Cats 5 Version: 2.0.dev5 Version: 1.2.3 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 7 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=326 … … 32 32 // +-----------------------------------------------------------------------+ 33 33 34 // Keeps file coded in UTF-8 without BOM : é34 // Keeps file coded in UTF-8 without BOM : é 35 35 36 36 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); … … 43 43 44 44 define( // ------------------------------------------------------------------- 45 'EVNTCATS_INFO_VERSION', // VERSION HISTORY: 46 '2.0.dev' // Currently developping ;-) 45 'EVNTCATS_INFO_VERSION', // VERSION HISTORY : 46 '1.2.4' // Fix bug 2135: Constant ROOT_URL already defined; replaced by 47 // // EC_ROOT_URL 47 48 // '1.2.3' // Re-fix bug 1432 :-/ ... 48 49 // '2.1.0' // When done, will simplfy and allow EC management from categories … … 51 52 // '1.2.1' // Improve EN translation thanks to Tosca 52 53 // '1.2.0' // Add feature 1335, Possibility to display the 'Connection' 53 // // link in identification block menu for generic users ;54 // // link in identification block menu for generic users ; 54 55 // // finish (yes !) english translation 55 56 // '1.1.5' // Fix bugs 1324 and 1325 56 57 // '1.1.4' // Improve help banner 57 // '1.1.3' // Better help banner management ; finalize banner texts58 // '1.1.2' // Better help banner example : some examples59 // '1.1.1' // Better help banner example ; but still no text in it60 // '1.1.0' // First bugs (1305 and 1306) corrected ;58 // '1.1.3' // Better help banner management ; finalize banner texts 59 // '1.1.2' // Better help banner example : some examples 60 // '1.1.1' // Better help banner example ; but still no text in it 61 // '1.1.0' // First bugs (1305 and 1306) corrected ; 61 62 // add newly created user/group association with cat/AP (was 62 // forgotten) ; begin help banner63 // forgotten) ; begin help banner 63 64 // '1.0.0' // Conception version 64 65 ); // ------------------------------------------------------------------------ … … 72 73 ); 73 74 define( 74 ' ROOT_URL',75 'EC_ROOT_URL', 75 76 get_absolute_root_url() 76 77 ); … … 81 82 // Sets the administration panel of the plugin 82 83 function plugin_admin_menu($menu) { 83 // to be removed in final version :84 global $template;85 $template->delete_compiled_templates();86 84 array_push($menu, 87 85 array( … … 107 105 return ( 108 106 $help_content = (is_admin() and $page == 'help') ? 109 load_language($page.'.html', EVNTCATS_PATH,array('return' => true)) : false107 load_language($page.'.html', EVNTCATS_PATH, array('return' => true)) : false 110 108 ) ? $popup_help_content.$help_content : $popup_help_content; 111 109 } … … 116 114 * 117 115 * auto_log_user() 118 * the function uses the value of the argument "autolog" of the posted URL, 119 * as a codeto know which username has to be logged in.116 * the function uses the value of the argument "autolog" of the posted URL, as a code 117 * to know which username has to be logged in. 120 118 * 121 119 * @param no parameter … … 132 130 $ec_img = NULL; 133 131 134 if (isset($_GET['autolog']) and (read_ec_conf('activated') == '1')) {132 if (isset($_GET['autolog']) and (read_ec_conf('activated') == 1)) { 135 133 if (!is_a_guest()) { 136 134 $url = ''; … … 170 168 if (isset($ec_img)) { 171 169 if (ec_image_exists($ec_cat, $ec_img)) { 172 redirect(PHPWG_ROOT_PATH.'picture.php?/'.$ec_img.'/category/'.$ec_cat);170 redirect(PHPWG_ROOT_PATH.'picture.php?/'.$ec_img.'/category/'.$ec_cat); 173 171 } 174 172 } … … 234 232 global $user; 235 233 236 if (read_ec_conf('activated') == '1') { 237 if ( 238 !is_a_guest() and !is_admin() and ( 239 read_ec_conf('dup_allow') == '1' or ( 240 read_ec_conf('dup_allow') == '2' and ( 241 dup_allowed($user['id']) or ( 242 read_ec_conf('simple_mode_on') == '1' and 243 is_generic() 244 ) 245 ) 246 ) 247 ) 248 ) { 249 // User access 250 $result = pwg_query(" 251 SELECT `cat_id` 252 FROM `".USER_ACCESS_TABLE."` 253 WHERE `user_id` = ".$user['id']."; 254 "); 255 $insert = array(); 256 while ($row = pwg_db_fetch_assoc($result)) 257 $insert[] = "(".$new_user['id'].",".$row['cat_id'].")"; 258 if (!empty($insert)) pwg_query(" 259 INSERT INTO `".USER_ACCESS_TABLE."` 260 VALUES ".implode(',', $insert)."; 261 "); 262 263 // User groups 264 $result = pwg_query(" 265 SELECT `group_id` 266 FROM `".USER_GROUP_TABLE."` 267 WHERE `user_id` = ".$user['id']."; 268 "); 269 $insert = array(); 270 while ($row = pwg_db_fetch_assoc($result)) 271 $insert[] = "(".$new_user['id'].",".$row['group_id'].")"; 272 if (!empty($insert)) pwg_query(" 273 INSERT INTO `".USER_GROUP_TABLE."` 274 VALUES ".implode(',', $insert)."; 275 "); 276 277 // User infos 278 $result = pwg_query(" 279 SELECT `level` 280 FROM `".USER_INFOS_TABLE."` 281 WHERE `user_id` = ".$user['id']."; 282 "); 283 $insert = array(); 284 while ($row = pwg_db_fetch_assoc($result)) 285 $insert[] = "(".$new_user['id'].",".$row['level'].")"; 286 if (!empty($insert)) pwg_query(" 287 UPDATE `".USER_INFOS_TABLE."` 288 SET `level` = ".$user['level']." 289 WHERE `user_id` = ".$new_user['id']."; 290 "); 291 } 234 if (!is_a_guest() and !is_admin()) if ( 235 read_ec_conf('dup_allow') == '1' or ( 236 read_ec_conf('dup_allow') == '2' and 237 dup_allowed($user['id']) 238 ) 239 ) { 240 // User access 241 $result = pwg_query(" 242 SELECT `cat_id` 243 FROM `".USER_ACCESS_TABLE."` 244 WHERE `user_id` = ".$user['id']."; 245 "); 246 $insert = array(); 247 while ($row = mysql_fetch_assoc($result)) 248 $insert[] = "(".$new_user['id'].",".$row['cat_id'].")"; 249 if (!empty($insert)) pwg_query(" 250 INSERT INTO `".USER_ACCESS_TABLE."` 251 VALUES ".implode(',', $insert)."; 252 "); 253 254 // User groups 255 $result = pwg_query(" 256 SELECT `group_id` 257 FROM `".USER_GROUP_TABLE."` 258 WHERE `user_id` = ".$user['id']."; 259 "); 260 $insert = array(); 261 while ($row = mysql_fetch_assoc($result)) 262 $insert[] = "(".$new_user['id'].",".$row['group_id'].")"; 263 if (!empty($insert)) pwg_query(" 264 INSERT INTO `".USER_GROUP_TABLE."` 265 VALUES ".implode(',', $insert)."; 266 "); 267 268 // User infos 269 $result = pwg_query(" 270 SELECT `level` 271 FROM `".USER_INFOS_TABLE."` 272 WHERE `user_id` = ".$user['id']."; 273 "); 274 $insert = array(); 275 while ($row = mysql_fetch_assoc($result)) 276 $insert[] = "(".$new_user['id'].",".$row['level'].")"; 277 if (!empty($insert)) pwg_query(" 278 UPDATE `".USER_INFOS_TABLE."` 279 SET `level` = ".$user['level']." 280 WHERE `user_id` = ".$new_user['id']."; 281 "); 292 282 } 293 283 } … … 325 315 global $lang, $template, $user; 326 316 327 if (read_ec_conf('activated') == '1') { 328 if (version_compare(PHPWG_VERSION, '2.1.0', '<')) { 329 // Makes the "quick connect" fieldset able to redirect to current page 330 // after user identification, just as does the "connection" link. 331 $template->assign(array('U_REDIRECT' => $_SERVER['REQUEST_URI'])); 332 $template->set_prefilter('menubar', 'ec_duplicate_prefilter'); 333 } 334 335 // Add duplication link, if needed 317 if (version_compare(PHPWG_VERSION, '2.1.0', '<')) { 318 // Makes the "quick connect" fieldset able to redirect to current page 319 // after user identification, just as does the "connection" link. 320 $template->assign(array('U_REDIRECT' => $_SERVER['REQUEST_URI'])); 321 $template->set_prefilter('menubar', 'ec_duplicate_prefilter'); 322 } 323 324 // Adds duplication link, if needed 325 if (!is_admin() and !is_a_guest()) if ( 326 read_ec_conf('dup_allow') == '1' or ( 327 read_ec_conf('dup_allow') == '2' and 328 dup_allowed($user['id']) 329 ) 330 ) { 331 $template->assign('U_REGISTER', get_root_url().'register.php'); 336 332 if ( 337 !is_admin() and !is_a_guest() and ( 338 read_ec_conf('dup_allow') == '1' or ( 339 read_ec_conf('dup_allow') == '2' and ( 340 dup_allowed($user['id']) or ( 341 read_ec_conf('simple_mode_on') == '1' and 342 is_generic() 343 ) 344 ) 345 ) 333 read_ec_conf('duplic_display') == '1' or ( 334 read_ec_conf('duplic_display') == '2' and 335 !is_generic() 346 336 ) 347 337 ) { 348 $template->assign('U_REGISTER', get_root_url().'register.php'); 349 if ( 350 read_ec_conf('duplic_display') == '1' or ( 351 read_ec_conf('duplic_display') == '2' and 352 !is_generic() 353 ) 354 ) { 355 $lang['Register'] = $lang['Duplicate']; 356 $lang['Create a new account'] = 357 $lang['Create a new account with same properties']; 358 } 359 } 360 361 // Adds connection link, if needed 362 if (read_ec_conf('display_connection') == '1' and is_generic()) { 363 // Adds connection link 364 $template->assign( 365 'U_LOGIN', 366 get_root_url().'identification.php?redirect='.$_SERVER['REQUEST_URI'] 367 ); 368 } 338 $lang['Register'] = $lang['Duplicate']; 339 $lang['Create a new account'] = 340 $lang['Create a new account with same properties']; 341 } 342 } 343 344 // Adds connection link, if needed 345 if (read_ec_conf('display_connection') == '1' and is_generic()) { 346 // Adds connection link 347 $template->assign( 348 'U_LOGIN', 349 get_root_url().'identification.php?redirect='.$_SERVER['REQUEST_URI'] 350 ); 369 351 } 370 352 } -
extensions/event_cats/maintain.inc.php
r7098 r8956 23 23 // +-----------------------------------------------------------------------+ 24 24 25 // Keeps file coded in UTF-8 without BOM : é25 // Keeps file coded in UTF-8 without BOM : é 26 26 27 27 // *********************************************************************** 28 // ** maintain.inc.php : Installation page for Piwigo plugin Event Cats**28 // ** maintain.inc.php : Installation page for Piwigo plugin Event Cats ** 29 29 // *********************************************************************** 30 30 … … 42 42 global $prefixeTable; 43 43 44 pwg_query(" 45 DELETE IGNORE FROM `".CONFIG_TABLE."` WHERE `param` = 'event_cats' LIMIT 1; 46 "); 44 pwg_query("DELETE FROM `".CONFIG_TABLE."` WHERE `param` = 'event_cats' LIMIT 1;"); 47 45 return pwg_query('DROP TABLE IF EXISTS `'.$prefixeTable.'event_cats`;'); 48 46 } … … 74 72 75 73 /* 76 Explanations on table structure :74 Explanations on table structure : 77 75 78 code : the code used as "autolog" argument. If thie code provided by the 79 visitor does not exist in the table, the administrator can choose 80 whether the visitor is redirected to the home page (nothing 81 happens) or to the "access denied" page; 82 user_id: the account concerned in following values; 83 action : the action to perform: 84 ec_nok: code disabled: account not logged in, visitor (guest) redirected 85 to an explaining Additional Page (arg2 field). If Additional Page 86 plugin is not activated, redirection to the "access denied" page; 87 ec_ok : code OK, account logged in. Redirection depends on arg1 and arg2 88 values. There are four cases: 89 arg1 and arg2 are both NULL: home page; 90 arg1 not NULL and arg2 NULL: category; 91 arg1 NULL and arg2 not NULL: Additional Page; 92 arg1 and arg2 both not NULL: Image page. 93 If arg1 is a valid category id, and arg2 is not a valid image id, 94 redirection to category. In all other cases where the arg1 or arg2 95 is not valid, redirection to home page. 96 arg1 : (described above); 97 arg2 : (described above); 98 forced : allows the administrator to impose that, for certain codes, the 99 settings specified in the database ("action", "arg1", "arg2") are 100 applied, whatever can be the arguments given in the URL; 101 comment: a reminder for the webmaster. 76 code : the code used as "autolog" argument. If thie code provided by the 77 visitor does not exist in the table, the administrator can choose 78 whether the visitor is redirected to the home page (nothing 79 happens) or to the "access denied" page ; 80 user_id : the account concerned in following values ; 81 action : the action to perform : 82 ec_nok : code disabled : account not logged in, visitor (guest) redirected 83 to an explaining Additional Page (arg2 field). If Additional Page 84 plugin is not activated, redirection to the "access denied" page ; 85 ec_ok : code OK, account logged in. Redirection depends on arg1 and arg2 86 values. There are four cases : 87 arg1 and arg2 are both NULL : home page ; 88 arg1 not NULL and arg2 NULL : category ; 89 arg1 NULL and arg2 not NULL : Additional Page ; 90 arg1 and arg2 both not NULL : Image page. 91 If arg1 is a valid category id, and arg2 is not a valid image id, 92 redirection to category. In all other cases where the arg1 or arg2 93 is not valid, redirection to home page. 94 arg1 : (described above) ; 95 arg2 : (described above) ; 96 forced : allows the administrator to impose that, for certain codes, the 97 settings specified in the database ("action", "arg1", "arg2") are 98 applied, whatever can be the arguments given in the URL. 102 99 103 * As a precision :100 * As a precision : 104 101 in the PHP code, the "action" can also have the following values, so to 105 display accurate messages in the admin page :106 ec_nok_action_pb : the same "code" is used in more than one entries in the107 DB (which is allowed) and is not always associated to108 the same action ('ec_ok' in one or more entries, and109 'ec_nok' in one or more other entries). This is110 confusing and makes impossible to log in using this111 code;112 ec_nok_userid_pb : the same "code" is used in more than one entries in the113 DB (which is allowed) and is not always associated to114 the same user id. This is confusing and makes115 impossible to log in using this code;116 ec_nok_userid_miss : the user id associated to this code does not exist in117 the user ids table;118 ec_nok_ap_pb : not valid Additional Page id -> access denied;119 ec_ok_ap_pb : not valid Additional Page id -> home page;120 ec_ok_cat_pb : not valid category id -> home page;121 ec_ok_img_pb : not valid image id -> category page;102 display accurate messages in the admin page : 103 ec_nok_action_pb : the same "code" is used in more than one entries in the 104 DB (which is allowed) and is not always associated to 105 the same action ('ec_ok' in one or more entries, and 106 'ec_nok' in one or more other entries). This is 107 confusing and makes impossible to log in using this 108 code ; 109 ec_nok_userid_pb : the same "code" is used in more than one entries in the 110 DB (which is allowed) and is not always associated to 111 the same user id. This is confusing and makes 112 impossible to log in using this code ; 113 ec_nok_userid_miss : the user id associated to this code does not exist in 114 the user ids table ; 115 ec_nok_ap_pb : not valid Additional Page id -> access denied ; 116 ec_ok_ap_pb : not valid Additional Page id -> home page ; 117 ec_ok_cat_pb : not valid category id -> home page ; 118 ec_ok_img_pb : not valid image id -> category page ; 122 119 123 120 _ the two main fields are "user_id" and "code", as the main purpose of the … … 127 124 _ though, even if "action", "user_id" and "code" are important, all of them 128 125 can be omitted (thus can be NULL), and both "user_id" and "code" can be 129 repeated (thus are not UNIQUE). This because :126 repeated (thus are not UNIQUE). This because : 130 127 _ the same code can automatically log in ("autolog") the same account 131 128 following several ways, depending on "cat", "img", and "ap" arguments of 132 the URL ; and thus different ways can be stored in the DB;129 the URL ; and thus different ways can be stored in the DB ; 133 130 _ a "disabled" code (the user tries to "autolog", but (s)he's not allowed 134 to) does not need a corresponding "user_id", thus "user_id" can be NULL ;131 to) does not need a corresponding "user_id", thus "user_id" can be NULL ; 135 132 _ "user_id" field is used to store groups ids when "code" is NULL, to 136 identify groups authorized to duplication ;133 identify groups authorized to duplication ; 137 134 _ "code" does not have the MySQL UNIQUE attribute, but it has to be unique 138 135 when the "forced" Event Cats parameter is true, which is the case when this
Note: See TracChangeset
for help on using the changeset viewer.