From bd13da550348ba1963a434be7ceb9f1675aecadd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 15 Jul 2011 11:10:01 +0000 Subject: [PATCH] Extensions fixed/improved: - ext-rallye: A lot templates renamed and member-related added for better naming, language strings swapped out to language file - ext-active: Fixed missing variable $last - TODOs.txt updated --- .gitattributes | 10 +++ DOCS/TODOs.txt | 6 ++ inc/language/rallye_de.php | 5 +- inc/libs/rallye_functions.php | 12 ++-- inc/modules/guest/what-active.php | 8 +-- inc/modules/guest/what-rallyes.php | 8 +-- inc/modules/member/what-rallyes.php | 8 +-- templates/de/html/guest/guest_active_row.tpl | 6 +- .../de/html/guest/guest_active_table.tpl | 27 +------- templates/de/html/guest/guest_list_active.tpl | 26 ++++++++ .../de/html/guest/guest_list_active_row.tpl | 5 ++ .../html/guest/guest_list_active_row_none.tpl | 10 +++ templates/de/html/guest/guest_list_rallye.tpl | 20 ++++++ .../de/html/guest/guest_list_rallye_row.tpl | 6 ++ templates/de/html/guest/guest_no_rallyes.tpl | 17 +----- templates/de/html/guest/guest_rallye.tpl | 21 +------ templates/de/html/guest/guest_rallye_404.tpl | 10 +++ templates/de/html/guest/guest_rallye_row.tpl | 7 +-- templates/de/html/guest/guest_rallye_show.tpl | 60 +----------------- templates/de/html/guest/guest_show_rallye.tpl | 61 +++++++++++++++++++ .../de/html/member/member_list_rallye.tpl | 20 ++++++ .../de/html/member/member_list_rallye_row.tpl | 6 ++ .../de/html/member/member_rallye_404.tpl | 10 +++ 23 files changed, 218 insertions(+), 151 deletions(-) create mode 100644 templates/de/html/guest/guest_list_active.tpl create mode 100644 templates/de/html/guest/guest_list_active_row.tpl create mode 100644 templates/de/html/guest/guest_list_active_row_none.tpl create mode 100644 templates/de/html/guest/guest_list_rallye.tpl create mode 100644 templates/de/html/guest/guest_list_rallye_row.tpl create mode 100644 templates/de/html/guest/guest_rallye_404.tpl create mode 100644 templates/de/html/guest/guest_show_rallye.tpl create mode 100644 templates/de/html/member/member_list_rallye.tpl create mode 100644 templates/de/html/member/member_list_rallye_row.tpl create mode 100644 templates/de/html/member/member_rallye_404.tpl diff --git a/.gitattributes b/.gitattributes index 576fc54534..daf30353e9 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1562,6 +1562,11 @@ templates/de/html/guest/guest_footer.tpl svneol=native#text/plain templates/de/html/guest/guest_frametester.tpl svneol=native#text/plain templates/de/html/guest/guest_goto_top.tpl svneol=native#text/plain templates/de/html/guest/guest_header.tpl svneol=native#text/plain +templates/de/html/guest/guest_list_active.tpl svneol=native#text/plain +templates/de/html/guest/guest_list_active_row.tpl svneol=native#text/plain +templates/de/html/guest/guest_list_active_row_none.tpl svneol=native#text/plain +templates/de/html/guest/guest_list_rallye.tpl svneol=native#text/plain +templates/de/html/guest/guest_list_rallye_row.tpl svneol=native#text/plain templates/de/html/guest/guest_login.tpl svneol=native#text/plain templates/de/html/guest/guest_menu_bottom.tpl svneol=native#text/plain templates/de/html/guest/guest_menu_content.tpl svneol=native#text/plain @@ -1571,12 +1576,14 @@ templates/de/html/guest/guest_menu_title.tpl svneol=native#text/plain templates/de/html/guest/guest_nickname_login.tpl svneol=native#text/plain templates/de/html/guest/guest_no_rallyes.tpl svneol=native#text/plain templates/de/html/guest/guest_rallye.tpl svneol=native#text/plain +templates/de/html/guest/guest_rallye_404.tpl svneol=native#text/plain templates/de/html/guest/guest_rallye_row.tpl svneol=native#text/plain templates/de/html/guest/guest_rallye_show.tpl svneol=native#text/plain templates/de/html/guest/guest_receive_table.tpl svneol=native#text/plain templates/de/html/guest/guest_register.tpl svneol=native#text/plain templates/de/html/guest/guest_register_refid.tpl svneol=native#text/plain templates/de/html/guest/guest_register_refid_hide.tpl svneol=native#text/plain +templates/de/html/guest/guest_show_rallye.tpl svneol=native#text/plain templates/de/html/guest/guest_sponsor_act_row.tpl svneol=native#text/plain templates/de/html/guest/guest_sponsor_activate.tpl svneol=native#text/plain templates/de/html/guest/guest_sponsor_infos.tpl svneol=native#text/plain @@ -1673,6 +1680,8 @@ templates/de/html/member/member_list_beg.tpl svneol=native#text/plain templates/de/html/member/member_list_beg_row.tpl svneol=native#text/plain templates/de/html/member/member_list_coupon.tpl svneol=native#text/plain templates/de/html/member/member_list_coupon_row.tpl svneol=native#text/plain +templates/de/html/member/member_list_rallye.tpl svneol=native#text/plain +templates/de/html/member/member_list_rallye_row.tpl svneol=native#text/plain templates/de/html/member/member_list_refback.tpl svneol=native#text/plain templates/de/html/member/member_list_refback_deleted_row.tpl svneol=native#text/plain templates/de/html/member/member_list_refback_level.tpl svneol=native#text/plain @@ -1730,6 +1739,7 @@ templates/de/html/member/member_primera_mode_list.tpl svneol=native#text/plain templates/de/html/member/member_primera_mode_list_row.tpl svneol=native#text/plain templates/de/html/member/member_primera_mode_pay.tpl svneol=native#text/plain templates/de/html/member/member_profile_outdated.tpl svneol=native#text/plain +templates/de/html/member/member_rallye_404.tpl svneol=native#text/plain templates/de/html/member/member_receive_table.tpl svneol=native#text/plain templates/de/html/member/member_ref_list.tpl svneol=native#text/plain templates/de/html/member/member_ref_list_level.tpl svneol=native#text/plain diff --git a/DOCS/TODOs.txt b/DOCS/TODOs.txt index b382914394..e8a948b47d 100644 --- a/DOCS/TODOs.txt +++ b/DOCS/TODOs.txt @@ -314,6 +314,12 @@ ./templates/de/html/admin/admin_list_user_sort_form.tpl:1: ./templates/de/html/admin/admin_reset_pass_done.tpl:1: ./templates/de/html/admin/admin_send_reset_link.tpl:1: +./templates/de/html/guest/guest_active_row.tpl:1: +./templates/de/html/guest/guest_active_table.tpl:1: +./templates/de/html/guest/guest_no_rallyes.tpl:1: +./templates/de/html/guest/guest_rallye_row.tpl:1: +./templates/de/html/guest/guest_rallye_show.tpl:1: +./templates/de/html/guest/guest_rallye.tpl:1: ./templates/de/html/member/member_refback_edit.tpl:1: ./templates/de/html/member/member_refback_list_level.tpl:1: ./templates/de/html/member/member_refback_list_row_deleted.tpl:1: diff --git a/inc/language/rallye_de.php b/inc/language/rallye_de.php index f85446e806..aa37b12181 100644 --- a/inc/language/rallye_de.php +++ b/inc/language/rallye_de.php @@ -107,7 +107,7 @@ addMessages(array( 'RALLYE_NEW_REFS' => "Neue Refs", 'RALLYE_STOP_AUTO_ADD_NOW' => "Auto-Beitreten neuer Mitglieder deaktivieren", 'RALLYE_START_AUTO_ADD_NOW' => "Auto-Beitreten neuer Mitglieder aktivieren", - 'RALLYE_GUEST_REFS' => "Geworbene Mitglieder", + 'RALLYE_REFS' => "Geworbene Mitglieder", '_RALLYE_PRICE' => "Platz", 'RALLYE_EXPIRE_ONE_DAY' => "Rallye endet in weniger als 24 Stunden.", 'RALLYE_HAS_EXPIRED' => "Diese Referal-Rallye ist beendet.", @@ -143,6 +143,9 @@ addMessages(array( 'RALLYE_REMOVE_PRICES' => "Rallye-Preis(e) entfernen", 'RALLYE_NO_TEMPLATES_FOUND' => "Keine Templates gefunden.", 'ADMIN_LIST_RALLYES_PRICING' => "Auflisten von Referal-Rallyes - Preise einrichten", + 'GUEST_RALLYE_HAS_STARTED_TITLE' => "{?MAIN_TITLE?} - Referal-Rallye gestartet", + 'RALLYE_NONE_ACTIVE_TITLE' => "Keine Referal-Rallyes aktiv", + 'RALLYE_NONE_ACTIVE' => "Derzeit ist noch keine Rallye im Gange. Bitte kommen Sie später noch einmal wieder.", )); // [EOF] diff --git a/inc/libs/rallye_functions.php b/inc/libs/rallye_functions.php index 13bc3b07de..8be338a066 100644 --- a/inc/libs/rallye_functions.php +++ b/inc/libs/rallye_functions.php @@ -222,7 +222,7 @@ ORDER BY } // -function addReferalRallyeTopUsers ($rallye, $default=0) { +function addReferalRallyeTopUsers ($mode, $rallye, $default=0) { // Init variables $min_users = 0; $min_prices = 0; @@ -333,7 +333,7 @@ LIMIT 1", ); // Load row template and switch color - $OUT .= loadTemplate('guest_rallye_row', true, $content); + $OUT .= loadTemplate($mode . '_list_rallye_row', true, $content); } // END - for // Add min_prices/users @@ -342,7 +342,7 @@ LIMIT 1", $content['min_users'] = bigintval($min_users); // And finnally return the output - return loadTemplate('guest_rallye', true, $content); + return loadTemplate($mode . '_list_rallye', true, $content); } // Run this function only when a new member has confirmed his email address! @@ -702,7 +702,7 @@ LIMIT 1", } // @TODO This function does not load min_users, min_prices, please encapsulate loading rallye data with e.g. getRallyeDataFromId() -function addReferalRallyeWinners ($rallye, $default=0) { +function addReferalRallyeWinners ($mode, $rallye, $default=0) { // First check how many prices are set $prices = countSumTotalData(bigintval($rallye), 'rallye_prices', 'id', 'rallye_id', true); @@ -749,7 +749,7 @@ function addReferalRallyeWinners ($rallye, $default=0) { ); // Load row template - $OUT .= loadTemplate('guest_rallye_row', true, $content); + $OUT .= loadTemplate($mode . '_list_rallye_row', true, $content); } // END - for // Prepare content @@ -760,7 +760,7 @@ function addReferalRallyeWinners ($rallye, $default=0) { ); // Load main template and finnally return the output - return loadTemplate('guest_rallye', true, $content); + return loadTemplate($mode . '_list_rallye', true, $content); } // diff --git a/inc/modules/guest/what-active.php b/inc/modules/guest/what-active.php index af4246cebd..1c4e001ed7 100644 --- a/inc/modules/guest/what-active.php +++ b/inc/modules/guest/what-active.php @@ -71,18 +71,18 @@ if (!SQL_HASZERONUMS($result)) { } // END - if // Translate comma - $content['last_online'] = generateDateTime($last, 2); + $content['last_online'] = generateDateTime($content['last_online'], '2'); // Load template - $OUT .= loadTemplate('guest_active_row', true, $content); + $OUT .= loadTemplate('guest_list_active_row', true, $content); } // END - while } else { // No member was online today! :-( - $OUT = loadTemplate('guest_active_none_row', true); + $OUT = loadTemplate('guest_list_active_row_none', true); } // Load template -loadTemplate('guest_active_table', false, $OUT); +loadTemplate('guest_list_active', false, $OUT); // [EOF] ?> diff --git a/inc/modules/guest/what-rallyes.php b/inc/modules/guest/what-rallyes.php index 7a47b42e70..41f784ed30 100644 --- a/inc/modules/guest/what-rallyes.php +++ b/inc/modules/guest/what-rallyes.php @@ -111,20 +111,20 @@ if (SQL_NUMROWS($result) == 1) { $content['min_prices'] = determineReferalRallyeMinimumPrices($min_prices); if ($expired === true) { - $content['prices'] = addReferalRallyeWinners($id); + $content['prices'] = addReferalRallyeWinners('guest', $id); $content['top_users'] = '
' . $content['extras'] . '
'; $content['can_win_this'] = '{--RALLYE_OUR_WINNERS_ARE--}'; } else { $content['prices'] = addReferalRallyePrices($id, 'html'); - $content['top_users'] = addReferalRallyeTopUsers($id, getMemberId()); + $content['top_users'] = addReferalRallyeTopUsers('guest', $id, getMemberId()); $content['can_win_this'] = '{--RALLYE_YOU_CAN_WIN--}'; } // And load final template - loadTemplate('guest_rallye_show', false, $content); + loadTemplate('guest_show_rallye', false, $content); } else { // No rallye found so far - loadTemplate('guest_no_rallyes'); + loadTemplate('guest_rallye_404'); } // Close the div tag diff --git a/inc/modules/member/what-rallyes.php b/inc/modules/member/what-rallyes.php index 88bf9bb768..dc29eac5eb 100644 --- a/inc/modules/member/what-rallyes.php +++ b/inc/modules/member/what-rallyes.php @@ -103,20 +103,20 @@ if (SQL_NUMROWS($result) == 1) { $content['end'] = generateDateTime($content['end_time'] , 1); if ($expired === true) { - $content['prices'] = addReferalRallyeWinners($content['id']); + $content['prices'] = addReferalRallyeWinners('member', $content['id']); $content['top_users'] = '
' . $content['extras'] . '
'; $content['can_win_this'] = '{--RALLYE_OUR_WINNERS_ARE--}'; } else { $content['prices'] = addReferalRallyePrices($content['id'], 'html'); - $content['top_users'] = addReferalRallyeTopUsers($content['id'], getMemberId()); + $content['top_users'] = addReferalRallyeTopUsers('member', $content['id'], getMemberId()); $content['can_win_this'] = '{--RALLYE_YOU_CAN_WIN--}'; } // And load final template - loadTemplate('guest_rallye_show', false, $content); + loadTemplate('member_show_rallye', false, $content); } else { // No rallye found so far - loadTemplate('guest_no_rallyes'); + loadTemplate('member_rallye_404'); } // Free result diff --git a/templates/de/html/guest/guest_active_row.tpl b/templates/de/html/guest/guest_active_row.tpl index be39d2aa9a..11f5d85d80 100644 --- a/templates/de/html/guest/guest_active_row.tpl +++ b/templates/de/html/guest/guest_active_row.tpl @@ -1,5 +1 @@ - - $content[userid] ({%user,nickname,fixEmptyContentToDashes=$content[userid]%}) - {%pipe,getTotalPoints,translateComma=$content[userid]%} - $content[last_online] - + diff --git a/templates/de/html/guest/guest_active_table.tpl b/templates/de/html/guest/guest_active_table.tpl index 7d6a92e8ef..11f5d85d80 100644 --- a/templates/de/html/guest/guest_active_table.tpl +++ b/templates/de/html/guest/guest_active_table.tpl @@ -1,26 +1 @@ -
- - - - - - - - - - $content - - - -
- {--GUEST_ACTIVE_HEADER--} -
- {--_USERID--}: - - {--TOTAL_POINTS--}: - - {--LAST_ONLINE_SHORT--}: -
-
+ diff --git a/templates/de/html/guest/guest_list_active.tpl b/templates/de/html/guest/guest_list_active.tpl new file mode 100644 index 0000000000..7d6a92e8ef --- /dev/null +++ b/templates/de/html/guest/guest_list_active.tpl @@ -0,0 +1,26 @@ +
+ + + + + + + + + + $content + + + +
+ {--GUEST_ACTIVE_HEADER--} +
+ {--_USERID--}: + + {--TOTAL_POINTS--}: + + {--LAST_ONLINE_SHORT--}: +
+
diff --git a/templates/de/html/guest/guest_list_active_row.tpl b/templates/de/html/guest/guest_list_active_row.tpl new file mode 100644 index 0000000000..be39d2aa9a --- /dev/null +++ b/templates/de/html/guest/guest_list_active_row.tpl @@ -0,0 +1,5 @@ + + $content[userid] ({%user,nickname,fixEmptyContentToDashes=$content[userid]%}) + {%pipe,getTotalPoints,translateComma=$content[userid]%} + $content[last_online] + diff --git a/templates/de/html/guest/guest_list_active_row_none.tpl b/templates/de/html/guest/guest_list_active_row_none.tpl new file mode 100644 index 0000000000..ceeb3c4f74 --- /dev/null +++ b/templates/de/html/guest/guest_list_active_row_none.tpl @@ -0,0 +1,10 @@ + + + + + + +
{--GUEST_ACTIVE_NO_MEMER_ONLINE_TODAY--} +
+ + diff --git a/templates/de/html/guest/guest_list_rallye.tpl b/templates/de/html/guest/guest_list_rallye.tpl new file mode 100644 index 0000000000..5366463256 --- /dev/null +++ b/templates/de/html/guest/guest_list_rallye.tpl @@ -0,0 +1,20 @@ +
+ + + + + + +$content[rows] + + + +
{--_RALLYE_PRICE--}{--_USERID--}{--RALLYE_REFS--}
+
diff --git a/templates/de/html/guest/guest_list_rallye_row.tpl b/templates/de/html/guest/guest_list_rallye_row.tpl new file mode 100644 index 0000000000..d88f39fb4d --- /dev/null +++ b/templates/de/html/guest/guest_list_rallye_row.tpl @@ -0,0 +1,6 @@ + + $content[idx]. + $content[start].{%pipe,fixEmptyContentToDashes=$content[userid]%}.$content[end] + $content[start].{%pipe,fixEmptyContentToDashes=$content[ref]%}.$content[end] + $content[start].{%pipe,fixEmptyContentToDashes=$content[infos]%}.$content[end] + diff --git a/templates/de/html/guest/guest_no_rallyes.tpl b/templates/de/html/guest/guest_no_rallyes.tpl index 4fb4b299df..11f5d85d80 100644 --- a/templates/de/html/guest/guest_no_rallyes.tpl +++ b/templates/de/html/guest/guest_no_rallyes.tpl @@ -1,16 +1 @@ -
- - - - - - - -
- Keine Referal-Rallyes aktiv! -
-
- Derzeit ist noch keine Rallye im Gange! Bitte kommen Sie später noch einmal wieder! -
-
-
+ diff --git a/templates/de/html/guest/guest_rallye.tpl b/templates/de/html/guest/guest_rallye.tpl index 2650ca0fcc..11f5d85d80 100644 --- a/templates/de/html/guest/guest_rallye.tpl +++ b/templates/de/html/guest/guest_rallye.tpl @@ -1,20 +1 @@ -
- - - - - - -$content[rows] - - - -
{--_RALLYE_PRICE--}{--_USERID--}{--RALLYE_GUEST_REFS--}
-
+ diff --git a/templates/de/html/guest/guest_rallye_404.tpl b/templates/de/html/guest/guest_rallye_404.tpl new file mode 100644 index 0000000000..74a52f59dc --- /dev/null +++ b/templates/de/html/guest/guest_rallye_404.tpl @@ -0,0 +1,10 @@ +
+
+
+ {--RALLYE_NONE_ACTIVE_TITLE--} +
+
+ {--RALLYE_NONE_ACTIVE--} +
+
+
diff --git a/templates/de/html/guest/guest_rallye_row.tpl b/templates/de/html/guest/guest_rallye_row.tpl index d88f39fb4d..11f5d85d80 100644 --- a/templates/de/html/guest/guest_rallye_row.tpl +++ b/templates/de/html/guest/guest_rallye_row.tpl @@ -1,6 +1 @@ - - $content[idx]. - $content[start].{%pipe,fixEmptyContentToDashes=$content[userid]%}.$content[end] - $content[start].{%pipe,fixEmptyContentToDashes=$content[ref]%}.$content[end] - $content[start].{%pipe,fixEmptyContentToDashes=$content[infos]%}.$content[end] - + diff --git a/templates/de/html/guest/guest_rallye_show.tpl b/templates/de/html/guest/guest_rallye_show.tpl index f836a809c6..11f5d85d80 100644 --- a/templates/de/html/guest/guest_rallye_show.tpl +++ b/templates/de/html/guest/guest_rallye_show.tpl @@ -1,59 +1 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Referal-Rallye gestartet! -
-
    -
  • Titel: $content[title]
  • -
  • Start: $content[start]
  • -
  • Ende : $content[end]
  • -
-
- ...:: $content[title] ::... -
-
- $content[descr] -
-
- $content[can_win_this]: -
-
- $content[prices] -
-
- Aktueller Stand der Rallye: -
-
- $content[top_users] -
-
+ diff --git a/templates/de/html/guest/guest_show_rallye.tpl b/templates/de/html/guest/guest_show_rallye.tpl new file mode 100644 index 0000000000..135d033fb4 --- /dev/null +++ b/templates/de/html/guest/guest_show_rallye.tpl @@ -0,0 +1,61 @@ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ {--GUEST_RALLYE_HAS_STARTED_TITLE--} +
+
    +
  • Titel: $content[title]
  • +
  • Start: $content[start]
  • +
  • Ende : $content[end]
  • +
+
+ ...:: $content[title] ::... +
+
+ $content[descr] +
+
+ $content[can_win_this]: +
+
+ $content[prices] +
+
+ Aktueller Stand der Rallye: +
+
+ $content[top_users] +
+
+
diff --git a/templates/de/html/member/member_list_rallye.tpl b/templates/de/html/member/member_list_rallye.tpl new file mode 100644 index 0000000000..5366463256 --- /dev/null +++ b/templates/de/html/member/member_list_rallye.tpl @@ -0,0 +1,20 @@ +
+ + + + + + +$content[rows] + + + +
{--_RALLYE_PRICE--}{--_USERID--}{--RALLYE_REFS--}
+
diff --git a/templates/de/html/member/member_list_rallye_row.tpl b/templates/de/html/member/member_list_rallye_row.tpl new file mode 100644 index 0000000000..d88f39fb4d --- /dev/null +++ b/templates/de/html/member/member_list_rallye_row.tpl @@ -0,0 +1,6 @@ + + $content[idx]. + $content[start].{%pipe,fixEmptyContentToDashes=$content[userid]%}.$content[end] + $content[start].{%pipe,fixEmptyContentToDashes=$content[ref]%}.$content[end] + $content[start].{%pipe,fixEmptyContentToDashes=$content[infos]%}.$content[end] + diff --git a/templates/de/html/member/member_rallye_404.tpl b/templates/de/html/member/member_rallye_404.tpl new file mode 100644 index 0000000000..74a52f59dc --- /dev/null +++ b/templates/de/html/member/member_rallye_404.tpl @@ -0,0 +1,10 @@ +
+
+
+ {--RALLYE_NONE_ACTIVE_TITLE--} +
+
+ {--RALLYE_NONE_ACTIVE--} +
+
+
-- 2.39.5