From 1e6a6da913a6c4cc58b4360aa2283aedb2a6744c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 30 Jun 2010 04:54:59 +0000 Subject: [PATCH] Fixed missed [sw] things in a lot templates, added more EL: - Fixed a lot broken switch_swX in templates to make use of EL function {%template,ColorSwitch%} - More usage of fixEmptyContentToDashes() e.g. for nicknames - TODOs.txt updated --- DOCS/TODOs.txt | 21 +++++++++---------- inc/modules/admin/what-adminedit.php | 9 +------- .../member/member_transfer_recipient.tpl | 2 +- .../emails/member/member_transfer_sender.tpl | 2 +- .../de/html/admin/admin_menu_overview_row.tpl | 8 +++---- .../de/html/admin/admin_surfbar_stats_row.tpl | 6 +++--- .../admin/admin_surfbar_url_stats_row.tpl | 6 +++--- templates/de/html/guest/guest_cat_row.tpl | 4 ++-- .../de/html/guest/guest_extensions_row.tpl | 2 +- .../de/html/member/member_bonus_turbo_row.tpl | 6 +++--- templates/de/html/member/member_pool_row.tpl | 18 ++++++++-------- templates/de/html/member/member_stats_row.tpl | 18 ++++++++-------- .../de/html/member/member_transfer_row2.tpl | 10 ++++----- 13 files changed, 52 insertions(+), 60 deletions(-) diff --git a/DOCS/TODOs.txt b/DOCS/TODOs.txt index 5953193f64..c794be08b0 100644 --- a/DOCS/TODOs.txt +++ b/DOCS/TODOs.txt @@ -49,8 +49,8 @@ ./inc/functions.php:178:// @TODO Rewrite this to an extension 'smtp' ./inc/functions.php:2244: // @TODO This is still very static, rewrite it somehow ./inc/install-functions.php:63: // @TODO DEACTIVATED: changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'OUTPUT-MODE', "setConfigEntry('OUTPUT_MODE', '", "');", postRequestParameter('omode'), 0); -./inc/language/de.php:1141:// @TODO Rewrite these two constants -./inc/language/de.php:1156:// @TODO Rewrite these three constants +./inc/language/de.php:1143:// @TODO Rewrite these two constants +./inc/language/de.php:1158:// @TODO Rewrite these three constants ./inc/language/de.php:309: // @TODO Following two are unused? ./inc/language/de.php:836:// @TODO Are these constants longer used? ./inc/language-functions.php:234: // @TODO These are all valid languages, again hard-coded @@ -74,9 +74,9 @@ ./inc/libs/register_functions.php:372: // @TODO Rewrite this to a filter ./inc/libs/register_functions.php:379: // @TODO Rewrite this whole if() block to addPointsThroughReferalSystem(). This will also make following if() block obsolete ./inc/libs/register_functions.php:380: // @TODO Wether the registration bonus should only be added to user directly or through referal system should be configurable -./inc/libs/surfbar_functions.php:1534: // @TODO This can be somehow rewritten +./inc/libs/surfbar_functions.php:1540: // @TODO This can be somehow rewritten ./inc/libs/surfbar_functions.php:712:// @TODO Can't we use our new expression language instead of this ugly code? -./inc/libs/surfbar_functions.php:950: // @TODO Invalid salt should be refused +./inc/libs/surfbar_functions.php:953: // @TODO Invalid salt should be refused ./inc/libs/task_functions.php:241: // @TODO These can be rewritten to filter ./inc/libs/task_functions.php:53:// @TODO Move all extension-dependent queries into filters ./inc/libs/theme_functions.php:95: // @TODO Can't this be rewritten to an API function? @@ -185,13 +185,13 @@ ./inc/reset/reset_beg.php:51:// @TODO This should be converted in a daily beg rallye ./inc/reset/reset_birthday.php:91: // @TODO 4 is hard-coded here, should we move it out in config? ./inc/revision-functions.php:153:// @TODO Please describe this function -./inc/template-functions.php:1155: // @TODO This can be easily moved out after the merge from EL branch to this is complete -./inc/template-functions.php:1188: // @TODO Add a little more infos here -./inc/template-functions.php:1473:// @TODO Lame description for this function -./inc/template-functions.php:1492: // @TODO Move this in a filter +./inc/template-functions.php:1153: // @TODO This can be easily moved out after the merge from EL branch to this is complete +./inc/template-functions.php:1186: // @TODO Add a little more infos here +./inc/template-functions.php:1474:// @TODO Lame description for this function +./inc/template-functions.php:1493: // @TODO Move this in a filter ./inc/template-functions.php:280: // @TODO Remove this sanity-check if all is fine -./inc/template-functions.php:595:// @TODO $simple/$constants are deprecated -./inc/template-functions.php:622: // @TODO Do only use $content and deprecate $GLOBALS and $DATA in templates +./inc/template-functions.php:593:// @TODO $simple/$constants are deprecated +./inc/template-functions.php:620: // @TODO Do only use $content and deprecate $GLOBALS and $DATA in templates ./inc/wrapper-functions.php:127:// @TODO Implement $compress ./inc/wrapper-functions.php:134:// @TODO Implement $decompress ./inc/wrapper-functions.php:455:// @TODO Do some more sanity check here @@ -227,7 +227,6 @@ ./templates/de/html/guest/guest_stats_member.tpl:21: @TODO We have to fix these counters. ./templates/de/html/member/member_unconfirmed_table_nopoints.tpl:11: ./templates/de/html/surfbar/surfbar_frame_textlinks.tpl:5: -./templates/de/html/surfbar/surfbar_frame_top.tpl:32:// @TODO Try to rewrite this JavaScript to js.php?js=surfbar_frame_top (wouldn't be easy) ### ### DEPRECATION FOLLOWS: ### ### ./inc/modules/admin/admin-inc.php:439:// @DEPRECATED ### ### template-warnings.log follows: ### ### diff --git a/inc/modules/admin/what-adminedit.php b/inc/modules/admin/what-adminedit.php index b4eb53902f..8e6b10bc6e 100644 --- a/inc/modules/admin/what-adminedit.php +++ b/inc/modules/admin/what-adminedit.php @@ -231,7 +231,7 @@ WHERE ".$AND." AND `id`=%s LIMIT 1", $content['sub'] = $SUB; // Init variables - $OUT = ''; $SW = 2; $cnt = '0'; + $OUT = ''; $cnt = '0'; // Process all entries while ($data = SQL_FETCHARRAY($result)) { @@ -251,18 +251,11 @@ WHERE ".$AND." AND `id`=%s LIMIT 1", $data['navi'] = '{--HIGHER--}/{--LOWER--}'; } - // Fix empty elements for constant (fixes display bugs in Firefox) - if (empty($data['action'])) $data['action'] = ' '; - if (empty($data['what'])) $data['what'] = ' '; - if (empty($data['title'])) $data['title'] = ' '; - // Add more data to $data - $data['sw'] = $SW; $data['mode'] = 'admin'; // Load row template and switch colors $OUT .= loadTemplate('admin_menu_overview_row', true, $data); - $SW = 3 - $SW; } // END - switch // Remember all rows diff --git a/templates/de/emails/member/member_transfer_recipient.tpl b/templates/de/emails/member/member_transfer_recipient.tpl index 2845e5d7ed..e2cddb8bd6 100644 --- a/templates/de/emails/member/member_transfer_recipient.tpl +++ b/templates/de/emails/member/member_transfer_recipient.tpl @@ -8,7 +8,7 @@ Ihr Mitglieder-Id ist: $content[recipient][userid] ------------------------------ -- Daten des Absenders: -- ------------------------------ -Mitglieder-Id: $content[sender][userid] ($content[sender][nickname]) +Mitglieder-Id: $content[sender][userid] ({%pipe,fixEmptyContentToDashes=$content[sender][nickname]%}) ------------------------------ Verwendungszweck: $content[reason] ------------------------------ diff --git a/templates/de/emails/member/member_transfer_sender.tpl b/templates/de/emails/member/member_transfer_sender.tpl index 20c3c41641..51065f6719 100644 --- a/templates/de/emails/member/member_transfer_sender.tpl +++ b/templates/de/emails/member/member_transfer_sender.tpl @@ -8,7 +8,7 @@ Ihr Mitglieder-Id ist: $content[sender][userid] ------------------------------ -- Daten des Empfaengers: -- ------------------------------ -Mitglieder-Id: $content[recipient][userid] ($content[recipient][nickname]) +Mitglieder-Id: $content[recipient][userid] ({%pipe,fixEmptyContentToDashes=$content[recipient][nickname]%}) ------------------------------ Verwendungszweck: $content[reason] ------------------------------ diff --git a/templates/de/html/admin/admin_menu_overview_row.tpl b/templates/de/html/admin/admin_menu_overview_row.tpl index bb61dc0e46..68e89c22fa 100644 --- a/templates/de/html/admin/admin_menu_overview_row.tpl +++ b/templates/de/html/admin/admin_menu_overview_row.tpl @@ -3,15 +3,15 @@ - $content[action] + {%pipe,fixEmptyContentToDashes=$content[action]%} - $content[what] + {%pipe,fixEmptyContentToDashes=$content[what]%} -   $content[title] + {%pipe,fixEmptyContentToDashes=$content[title]%} -   $content[navi] + $content[navi] diff --git a/templates/de/html/admin/admin_surfbar_stats_row.tpl b/templates/de/html/admin/admin_surfbar_stats_row.tpl index 0e864ead93..726740a97d 100644 --- a/templates/de/html/admin/admin_surfbar_stats_row.tpl +++ b/templates/de/html/admin/admin_surfbar_stats_row.tpl @@ -1,5 +1,5 @@ - {%pipe,generateUserProfileLink=$content[stats_userid]%} - {%pipe,translateComma=$content[visited_urls]%} - {%pipe,translateComma=$content[total_visits]%} + {%pipe,generateUserProfileLink=$content[stats_userid]%} + {%pipe,translateComma=$content[visited_urls]%} + {%pipe,translateComma=$content[total_visits]%} diff --git a/templates/de/html/admin/admin_surfbar_url_stats_row.tpl b/templates/de/html/admin/admin_surfbar_url_stats_row.tpl index dc54b15b2b..9548a6346f 100644 --- a/templates/de/html/admin/admin_surfbar_url_stats_row.tpl +++ b/templates/de/html/admin/admin_surfbar_url_stats_row.tpl @@ -1,5 +1,5 @@ - [{%pipe,generateUserProfileLink=$content[url_userid]%}] - {%pipe,translateComma=$content[total_visits]%} - $content[last_surfed] + [{%pipe,generateUserProfileLink=$content[url_userid]%}] + {%pipe,translateComma=$content[total_visits]%} + $content[last_surfed] diff --git a/templates/de/html/guest/guest_cat_row.tpl b/templates/de/html/guest/guest_cat_row.tpl index 237493a3d8..a3c1cf8b4f 100644 --- a/templates/de/html/guest/guest_cat_row.tpl +++ b/templates/de/html/guest/guest_cat_row.tpl @@ -1,10 +1,10 @@ $content[cat] - + {--YES--} - + {--NO--} diff --git a/templates/de/html/guest/guest_extensions_row.tpl b/templates/de/html/guest/guest_extensions_row.tpl index 074c172dee..77dd256317 100644 --- a/templates/de/html/guest/guest_extensions_row.tpl +++ b/templates/de/html/guest/guest_extensions_row.tpl @@ -1,4 +1,4 @@ -
+
Erweiterung ext-$content[name]
diff --git a/templates/de/html/member/member_bonus_turbo_row.tpl b/templates/de/html/member/member_bonus_turbo_row.tpl index 9089642221..bab00e61f7 100644 --- a/templates/de/html/member/member_bonus_turbo_row.tpl +++ b/templates/de/html/member/member_bonus_turbo_row.tpl @@ -1,5 +1,5 @@ - {%pipe,translateComma=$rows[rank]%}. - $rows[userid] - {%pipe,translateComma=$rows[points]%} + {%pipe,translateComma=$content[rank]%}. + $content[userid] + {%pipe,translateComma=$content[points]%} diff --git a/templates/de/html/member/member_pool_row.tpl b/templates/de/html/member/member_pool_row.tpl index 053c2ee469..cb032fd9d9 100644 --- a/templates/de/html/member/member_pool_row.tpl +++ b/templates/de/html/member/member_pool_row.tpl @@ -1,41 +1,41 @@ - + {--EMAIL_ID--}:
$content[id] - + {--EMAIL_SUBJECT--}:
$content[subject] - + {--EMAIL_TIMESTAMP--}:
$content[timestamp] - + {--EMAIL_PAYMENT--}:
{%pipe,translateComma=$content[payment_id]%} - + {--EMAIL_CATEGORY--}:
{%pipe,getCategory=$content[cat_id]%} - + {--EMAIL_URL--}:
{--MEMBER_TEST_URL--} - + {--EMAIL_RECEIVERS--}:
$content[target_send] - + {--EMAIL_TYPE--}:
{%pipe,translatePoolType=$content[data_type]%} - + {--EMAIL_ZIP--}:
{%pipe,fixEmptyContentToDashes=$content[zip]%} diff --git a/templates/de/html/member/member_stats_row.tpl b/templates/de/html/member/member_stats_row.tpl index e370f26cef..060b281d1d 100644 --- a/templates/de/html/member/member_stats_row.tpl +++ b/templates/de/html/member/member_stats_row.tpl @@ -1,43 +1,43 @@ - + {--EMAIL_SUBJECT--}:
$content[subject] - + {--EMAIL_TIMESTAMP--}:
$content[timestamp_ordered] - + {--EMAIL_PAYMENT--}:
{%pipe,getPaymentTitlePrice,translateComma=$content[payment_id]%} - + {--EMAIL_CATEGORY--}:
{%pipe,getCategory=$content[cat_id]%} - + {--EMAIL_URL--}:
{--MEMBER_TEST_URL--} - + {--EMAIL_END_SEND--}:
$content[timestamp_sent] - + {--EMAIL_RECEIVERS--}:
{%pipe,translateComma=$content[max_rec]%} - + {--EMAIL_CONFIRMED--}:
{%pipe,translateComma=$content[clicks]%} - + {--EMAIL_PERCENT--}:
{%pipe,translateComma=$content[percents]%}% diff --git a/templates/de/html/member/member_transfer_row2.tpl b/templates/de/html/member/member_transfer_row2.tpl index c27dc105db..edc7686c11 100644 --- a/templates/de/html/member/member_transfer_row2.tpl +++ b/templates/de/html/member/member_transfer_row2.tpl @@ -1,17 +1,17 @@ - +
$content[trans_id]
- +
$content[stamp]
- +
$content[userid]
- +
$content[reason]
- +
{%pipe,bigintval=$content[points]%}
-- 2.39.2