From e17685c65d1a48c061b7c4f64c7a23c165430460 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 28 Jun 2011 08:09:35 +0000 Subject: [PATCH] Renamed templates, more usage of EL --- .gitattributes | 3 +++ beg.php | 2 +- inc/modules/admin/what-config_autopurge.php | 12 ++++----- inc/modules/admin/what-config_beg.php | 11 +++----- inc/modules/admin/what-config_cats.php | 4 +-- inc/modules/admin/what-config_other.php | 10 +++---- inc/modules/admin/what-config_register2.php | 2 +- inc/modules/admin/what-list_cats.php | 6 ++--- templates/de/html/admin/admin_config_beg.tpl | 6 ++--- templates/de/html/admin/admin_config_cats.tpl | 26 +------------------ .../de/html/admin/admin_config_cats_row.tpl | 15 +---------- .../html/admin/admin_edit_refbanner_row.tpl | 4 ++- templates/de/html/admin/admin_list_cats.tpl | 26 +++++++++++-------- .../de/html/admin/admin_list_cats_404.tpl | 16 +----------- .../de/html/admin/admin_list_cats_row.tpl | 15 ++++++----- .../de/html/admin/admin_list_user_cats.tpl | 21 +++++++++++++++ .../html/admin/admin_list_user_cats_404.tpl | 15 +++++++++++ .../html/admin/admin_list_user_cats_row.tpl | 11 ++++++++ .../de/html/admin/admin_menu_status_row.tpl | 2 +- 19 files changed, 106 insertions(+), 101 deletions(-) create mode 100644 templates/de/html/admin/admin_list_user_cats.tpl create mode 100644 templates/de/html/admin/admin_list_user_cats_404.tpl create mode 100644 templates/de/html/admin/admin_list_user_cats_row.tpl diff --git a/.gitattributes b/.gitattributes index 4e793f2cf1..dc5b4944c6 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1247,6 +1247,9 @@ templates/de/html/admin/admin_list_unconfirmed_row.tpl svneol=native#text/plain templates/de/html/admin/admin_list_unconfirmed_row_404.tpl svneol=native#text/plain templates/de/html/admin/admin_list_user.tpl svneol=native#text/plain templates/de/html/admin/admin_list_user_alpha.tpl svneol=native#text/plain +templates/de/html/admin/admin_list_user_cats.tpl svneol=native#text/plain +templates/de/html/admin/admin_list_user_cats_404.tpl svneol=native#text/plain +templates/de/html/admin/admin_list_user_cats_row.tpl svneol=native#text/plain templates/de/html/admin/admin_list_user_pagenav.tpl svneol=native#text/plain templates/de/html/admin/admin_list_user_row.tpl svneol=native#text/plain templates/de/html/admin/admin_list_user_sort.tpl svneol=native#text/plain diff --git a/beg.php b/beg.php index e9e559138e..9aaef50306 100644 --- a/beg.php +++ b/beg.php @@ -104,7 +104,7 @@ if (isGetRequestParameterSet('userid')) { array(getUserData('userid')), __FILE__, __LINE__); // Check for last entry for userid w/o IP number - $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_beg_ips` WHERE (`timeout` > (UNIX_TIMESTAMP() - {?beg_timeout?}) OR (timeout > (UNIX_TIMESTAMP() - {?beg_userid_timeout?}) AND `userid`=%s)) AND (`remote_ip`='%s' OR `sid`='%s') LIMIT 1", + $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_beg_ips` WHERE (`timeout` > (UNIX_TIMESTAMP() - {?beg_timeout?}) OR (`timeout` > (UNIX_TIMESTAMP() - {?beg_userid_timeout?}) AND `userid`=%s)) AND (`remote_ip`='%s' OR `sid`='%s') LIMIT 1", array(getUserData('userid'), detectRemoteAddr(), session_id()), __FILE__, __LINE__); // Entry not found, points set and not logged in? diff --git a/inc/modules/admin/what-config_autopurge.php b/inc/modules/admin/what-config_autopurge.php index 994886dea6..93e24239cd 100644 --- a/inc/modules/admin/what-config_autopurge.php +++ b/inc/modules/admin/what-config_autopurge.php @@ -60,14 +60,14 @@ if (isFormSent()) { $content['ap_notify_del_mails'] = addSelectionBox('yn', getConfig('ap_dm_notify') , 'ap_dm_notify'); // Output time selection boxes - $content['ap_in_since'] = createTimeSelections(getApInactiveSince() , 'ap_inactive_since' , 'MWDh'); - $content['ap_in_time'] = createTimeSelections(getApInactiveTime() , 'ap_inactive_time' , 'MWDh'); - $content['ap_un_time'] = createTimeSelections(getApUnconfirmedTime(), 'ap_unconfirmed_time', 'MWDh'); - $content['ap_task_time'] = createTimeSelections(getApTasksTime() , 'ap_tasks_time' , 'MWDh'); - $content['ap_del_mails_time'] = createTimeSelections(getApDmTimeout() , 'ap_dm_timeout' , 'MWDh'); + $content['ap_in_since'] = createConfigurationTimeSelections('ap_inactive_since' , 'MWDh'); + $content['ap_in_time'] = createConfigurationTimeSelections('ap_inactive_time' , 'MWDh'); + $content['ap_un_time'] = createConfigurationTimeSelections('ap_unconfirmed_time', 'MWDh'); + $content['ap_task_time'] = createConfigurationTimeSelections('ap_tasks_time' , 'MWDh'); + $content['ap_del_mails_time'] = createConfigurationTimeSelections('ap_dm_timeout' , 'MWDh'); // Mail confirmation links - $content['auto_purge'] = createTimeSelections(getAutoPurge(), 'auto_purge', 'MWD'); + $content['auto_purge'] = createConfigurationTimeSelections('auto_purge', 'MWD'); // Prepare more Y/N selections foreach (array('auto_purge_active') as $entry) { diff --git a/inc/modules/admin/what-config_beg.php b/inc/modules/admin/what-config_beg.php index 84062756e2..bc8872712f 100644 --- a/inc/modules/admin/what-config_beg.php +++ b/inc/modules/admin/what-config_beg.php @@ -56,13 +56,10 @@ if (isFormSent()) { setConfigEntry('beg_rallye_disable_notify', postRequestParameter('beg_rallye_disable_notify')); } else { // Prepare constants for the template - $content['points'] = translateComma(getBegPoints() , false); - $content['points_max'] = translateComma(getBegPointsMax() , false); - $content['notify_bonus'] = translateComma(getBegNotifyBonus() , false); - $content['timeout'] = createTimeSelections(getBegTimeout() , 'beg_timeout' , 'Dhm'); - $content['userid_timeout'] = createTimeSelections(getBegUseridTimeout(), 'beg_userid_timeout', 'Dhm'); - $content['ip_timeout'] = createTimeSelections(getBegIpTimeout() , 'beg_ip_timeout' , 'Dhm'); - $content['wait_selection'] = createTimeSelections(getBegNotifyWait() , 'beg_notify_wait' , 'ms' ); + $content['timeout'] = createConfigurationTimeSelections('beg_timeout' , 'Dhm'); + $content['userid_timeout'] = createConfigurationTimeSelections('beg_userid_timeout', 'Dhm'); + $content['ip_timeout'] = createConfigurationTimeSelections('beg_ip_timeout' , 'Dhm'); + $content['wait_selection'] = createConfigurationTimeSelections('beg_notify_wait' , 'ms' ); // Init all Y/N selections foreach (array('rallye', 'active', 'mode', 'rallye_enable_notify', 'rallye_disable_notify', 'new_member_notify', 'include_own') as $entry) { diff --git a/inc/modules/admin/what-config_cats.php b/inc/modules/admin/what-config_cats.php index a81bf8c1d6..4001380d4b 100644 --- a/inc/modules/admin/what-config_cats.php +++ b/inc/modules/admin/what-config_cats.php @@ -158,14 +158,14 @@ if (isFormSent('add')) { $CATS .= ''; // Load row template and switch color - $OUT .= loadTemplate('admin_config_cats_row', true, $content); + $OUT .= loadTemplate('admin_list_cats_row', true, $content); } // END - while // Free memory SQL_FREERESULT($result); // Load main template - loadTemplate('admin_config_cats', false, $OUT); + loadTemplate('admin_list_cats', false, $OUT); } // END - if // Remember in array diff --git a/inc/modules/admin/what-config_other.php b/inc/modules/admin/what-config_other.php index 84c277f5e7..ae4eaaa0f4 100644 --- a/inc/modules/admin/what-config_other.php +++ b/inc/modules/admin/what-config_other.php @@ -78,11 +78,11 @@ if (isFormSent()) { adminSaveSettingsFromPostData(); } else { // Time selection boxes - $content['online_timeout'] = createTimeSelections(getOnlineTimeout() , 'ip_timeout' , 'ms'); - $content['url_tlock'] = createTimeSelections(getUrlTlock() , 'url_tlock' , 'WDh'); - $content['profile_lock'] = createTimeSelections(getProfileLock() , 'profile_lock' , 'WDh'); - $content['profile_update'] = createTimeSelections(getProfileUpdate() , 'profile_update' , 'YM'); - $content['profile_reupdate'] = createTimeSelections(getResendProfileUpdate(), 'resend_profile_update', 'MWD'); + $content['online_timeout'] = createConfigurationTimeSelections('ip_timeout' , 'ms'); + $content['url_tlock'] = createConfigurationTimeSelections('url_tlock' , 'WDh'); + $content['profile_lock'] = createConfigurationTimeSelections('profile_lock' , 'WDh'); + $content['profile_update'] = createConfigurationTimeSelections('profile_update' , 'YM'); + $content['profile_reupdate'] = createConfigurationTimeSelections('resend_profile_update', 'MWD'); // Prepare more Y/N selections foreach (array('show_points_unconfirmed','show_timings','youre_here','member_menu','guest_menu','order_multi_page','autosend_active','send_prof_update','admin_notify','display_debug_sqls','stats_enabled') as $entry) { diff --git a/inc/modules/admin/what-config_register2.php b/inc/modules/admin/what-config_register2.php index 0dc37b89fc..32f87c17ed 100644 --- a/inc/modules/admin/what-config_register2.php +++ b/inc/modules/admin/what-config_register2.php @@ -55,7 +55,7 @@ if (isFormSent()) { } else { // Remember stuff in constants $content['display_refid'] = addSelectionBox('yn', getDisplayRefid() , 'display_refid'); - $content['ip_timeout'] = createTimeSelections(getIpTimeout() , 'ip_timeout', 'Dhm'); + $content['ip_timeout'] = createConfigurationTimeSelections('ip_timeout', 'Dhm'); $content['check_double_email'] = addSelectionBox('yn', getCheckDoubleEmail() , 'check_double_email'); $content['register_default'] = addSelectionBox('yn', getRegisterDefault() , 'register_default'); $content['register_generate_password_empty'] = addSelectionBox('yn', getRegisterGeneratePasswordEmpty(), 'register_generate_password_empty'); diff --git a/inc/modules/admin/what-list_cats.php b/inc/modules/admin/what-list_cats.php index d7881b9e51..dc82716705 100644 --- a/inc/modules/admin/what-list_cats.php +++ b/inc/modules/admin/what-list_cats.php @@ -79,7 +79,7 @@ if (isGetRequestParameterSet('userid')) { $content['sel'] = $selection; // Load row template and count up - $OUT .= loadTemplate('admin_list_cats_row', true, $content); + $OUT .= loadTemplate('admin_list_user_cats_row', true, $content); $count++; } // END - while @@ -90,10 +90,10 @@ if (isGetRequestParameterSet('userid')) { $content['rows'] = $OUT; // Load main template - loadTemplate('admin_list_cats', false, $content); + loadTemplate('admin_list_user_cats', false, $content); } else { // No categories selected! :-( - loadTemplate('admin_list_cats_404', false, $content); + loadTemplate('admin_list_user_cats_404', false, $content); } } else { // User not found diff --git a/templates/de/html/admin/admin_config_beg.tpl b/templates/de/html/admin/admin_config_beg.tpl index d7957cad00..638390d3bb 100644 --- a/templates/de/html/admin/admin_config_beg.tpl +++ b/templates/de/html/admin/admin_config_beg.tpl @@ -11,7 +11,7 @@ {--ADMIN_BEG_POINTS--}: - + @@ -19,7 +19,7 @@ {--ADMIN_BEG_POINTS_MAX--}: - + @@ -155,7 +155,7 @@ {--ADMIN_BEG_NOTIFY_BONUS--} - + diff --git a/templates/de/html/admin/admin_config_cats.tpl b/templates/de/html/admin/admin_config_cats.tpl index 24b68aab15..11f5d85d80 100644 --- a/templates/de/html/admin/admin_config_cats.tpl +++ b/templates/de/html/admin/admin_config_cats.tpl @@ -1,25 +1 @@ -
-
- - - - - - - - - - - $content - - - -
- {--ADMIN_CONFIG_CATEGORIES_TITLE--} -
{--ID_SELECT--}{--CATEGORY_NAME--}{--ADMIN_IS_VISIBLE--}{--SORTING_KEY--}
-
-
+ diff --git a/templates/de/html/admin/admin_config_cats_row.tpl b/templates/de/html/admin/admin_config_cats_row.tpl index 211ba4e756..11f5d85d80 100644 --- a/templates/de/html/admin/admin_config_cats_row.tpl +++ b/templates/de/html/admin/admin_config_cats_row.tpl @@ -1,14 +1 @@ - - - - - - {%pipe,getCategory=$content[id]%} - - - {%pipe,translateComma=$content[visible]%} - - - $content[sort] - - + diff --git a/templates/de/html/admin/admin_edit_refbanner_row.tpl b/templates/de/html/admin/admin_edit_refbanner_row.tpl index 80015df6c5..d822520433 100644 --- a/templates/de/html/admin/admin_edit_refbanner_row.tpl +++ b/templates/de/html/admin/admin_edit_refbanner_row.tpl @@ -13,5 +13,7 @@ {--ADMIN_SELECT_REFERAL_BANNER_ACTIVE--}: - $content[visible] + + $content[visible] + diff --git a/templates/de/html/admin/admin_list_cats.tpl b/templates/de/html/admin/admin_list_cats.tpl index 52e6650b0b..24b68aab15 100644 --- a/templates/de/html/admin/admin_list_cats.tpl +++ b/templates/de/html/admin/admin_list_cats.tpl @@ -1,21 +1,25 @@
+
- - $content[rows] - + + + + + $content + +
- {--USER_ID--}: $content[userid] - ($content[email]) + + {--ADMIN_CONFIG_CATEGORIES_TITLE--}
{--ID_SELECT--}{--CATEGORY_NAME--}{--ADMIN_IS_VISIBLE--}{--SORTING_KEY--}
+
diff --git a/templates/de/html/admin/admin_list_cats_404.tpl b/templates/de/html/admin/admin_list_cats_404.tpl index 66c6b97b69..11f5d85d80 100644 --- a/templates/de/html/admin/admin_list_cats_404.tpl +++ b/templates/de/html/admin/admin_list_cats_404.tpl @@ -1,15 +1 @@ -
-
-
- {--ADMIN_MEMBER_NO_CATEGORIES_1--}$content[userid]{--ADMIN_MEMBER_NO_CATEGORIES_2--} -
-
-
- {--ADMIN_MEMBER_FUNCTIONS--}: -
-
- {%pipe,generateMemberAdminActionLinks=$content[userid]%} -
-
-
-
+ diff --git a/templates/de/html/admin/admin_list_cats_row.tpl b/templates/de/html/admin/admin_list_cats_row.tpl index 6f9a7cb40f..8f17ff13ef 100644 --- a/templates/de/html/admin/admin_list_cats_row.tpl +++ b/templates/de/html/admin/admin_list_cats_row.tpl @@ -1,11 +1,14 @@ - - $content[cnt]. + + - - $content[cat] + + {%pipe,getCategory=$content[id]%} - - $content[sel] + + {%pipe,translateYesNo=$content[visible]%} + + + $content[sort] diff --git a/templates/de/html/admin/admin_list_user_cats.tpl b/templates/de/html/admin/admin_list_user_cats.tpl new file mode 100644 index 0000000000..52e6650b0b --- /dev/null +++ b/templates/de/html/admin/admin_list_user_cats.tpl @@ -0,0 +1,21 @@ +
+ + + + + $content[rows] + + + +
+ {--USER_ID--}: $content[userid] + ($content[email]) +
+
diff --git a/templates/de/html/admin/admin_list_user_cats_404.tpl b/templates/de/html/admin/admin_list_user_cats_404.tpl new file mode 100644 index 0000000000..66c6b97b69 --- /dev/null +++ b/templates/de/html/admin/admin_list_user_cats_404.tpl @@ -0,0 +1,15 @@ +
+
+
+ {--ADMIN_MEMBER_NO_CATEGORIES_1--}$content[userid]{--ADMIN_MEMBER_NO_CATEGORIES_2--} +
+
+
+ {--ADMIN_MEMBER_FUNCTIONS--}: +
+
+ {%pipe,generateMemberAdminActionLinks=$content[userid]%} +
+
+
+
diff --git a/templates/de/html/admin/admin_list_user_cats_row.tpl b/templates/de/html/admin/admin_list_user_cats_row.tpl new file mode 100644 index 0000000000..6f9a7cb40f --- /dev/null +++ b/templates/de/html/admin/admin_list_user_cats_row.tpl @@ -0,0 +1,11 @@ + + + $content[cnt]. + + + $content[cat] + + + $content[sel] + + diff --git a/templates/de/html/admin/admin_menu_status_row.tpl b/templates/de/html/admin/admin_menu_status_row.tpl index ad2aaf11d2..8397481a29 100644 --- a/templates/de/html/admin/admin_menu_status_row.tpl +++ b/templates/de/html/admin/admin_menu_status_row.tpl @@ -9,7 +9,7 @@ {--ADMIN_IS_VISIBLE--}: $content[visible] - + {--ADMIN_MENU_IS_LOCKED--}: $content[locked] -- 2.30.2