]> git.mxchange.org Git - mailer.git/commitdiff
More EL code, some templates renamed:
authorRoland Häder <roland@mxchange.org>
Thu, 28 Jul 2011 23:32:06 +0000 (23:32 +0000)
committerRoland Häder <roland@mxchange.org>
Thu, 28 Jul 2011 23:32:06 +0000 (23:32 +0000)
- Templates renamed to conform with naming convention
- Some PHP code converted in EL code
- TODOs.txt updated

.gitattributes
DOCS/TODOs.txt
inc/modules/member/what-order.php
inc/modules/member/what-reflist.php
inc/referal-functions.php
templates/de/html/member/member_list_referal.tpl [new file with mode: 0644]
templates/de/html/member/member_list_referal_level.tpl [new file with mode: 0644]
templates/de/html/member/member_list_referal_row.tpl [new file with mode: 0644]
templates/de/html/member/member_ref_list.tpl
templates/de/html/member/member_ref_list_level.tpl
templates/de/html/member/member_ref_list_row.tpl

index e161a0089b4973935acc3be4e7316a9634f0cfb1..40a522f9cfdf4d8aa8693cbe72003705d5273703 100644 (file)
@@ -1709,6 +1709,9 @@ 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
 templates/de/html/member/member_list_refback_row.tpl svneol=native#text/plain
+templates/de/html/member/member_list_referal.tpl svneol=native#text/plain
+templates/de/html/member/member_list_referal_level.tpl svneol=native#text/plain
+templates/de/html/member/member_list_referal_row.tpl svneol=native#text/plain
 templates/de/html/member/member_list_reflinks.tpl svneol=native#text/plain
 templates/de/html/member/member_list_reflinks_row.tpl svneol=native#text/plain
 templates/de/html/member/member_list_surfbar.tpl svneol=native#text/plain
index ee7c8bee0bdb35fb53c73617ae987c0c33476231..689c4ab723b8e231b0557fec7bd6b8b6c3d753f1 100644 (file)
 ./inc/modules/member/what-beg.php:63:// @TODO No more needed? define('__BEG_USERID_TIMEOUT', createFancyTime(getBegUseridTimeout()));
 ./inc/modules/member/what-categories.php:131:          // @TODO Rewrite this to use $OUT .= ...
 ./inc/modules/member/what-logout.php:17: * @TODO Rewrite the code to a filter                                   *
-./inc/modules/member/what-order.php:488:                       // @TODO Rewrite this to a filter
-./inc/modules/member/what-order.php:85:                // @TODO Rewrite this to SQL_FETCHARRAY()
+./inc/modules/member/what-order.php:485:                       // @TODO Rewrite this to a filter
+./inc/modules/member/what-order.php:82:                // @TODO Rewrite this to SQL_FETCHARRAY()
 ./inc/modules/member/what-payout.php:194:                                      // @TODO Rewrite this to a filter
 ./inc/modules/member/what-points.php:55:// @TODO Should we rewrite this to a filter?
 ./inc/modules/member/what-rallyes.php:89:      // @TODO Reactivate this: $content['admin'] = '<a href="{%url=modules.php?module=index&amp;what=impressum&amp;admin=' . $content['admin_id'] . '%}">' . $content['login'] . '</a>';
 ./templates/de/html/member/member_refback_list.tpl:1:<!-- @DEPRECATED //-->
 ./templates/de/html/member/member_reflinks_row.tpl:1:<!-- @DEPRECATED //-->
 ./templates/de/html/member/member_reflinks_table.tpl:1:<!-- @DEPRECATED //-->
+./templates/de/html/member/member_ref_list_level.tpl:1:<!-- @DEPRECATED //-->
+./templates/de/html/member/member_ref_list_row.tpl:1:<!-- @DEPRECATED //-->
+./templates/de/html/member/member_ref_list.tpl:1:<!-- @DEPRECATED //-->
 ./templates/de/html/member/member_surfbar_book_dynamic.tpl:1:<!-- @DEPRECATED //-->
 ./templates/de/html/member/member_surfbar_book_static.tpl:1:<!-- @DEPRECATED //-->
 ./templates/de/html/member/member_surfbar_list_form.tpl:1:<!-- @DEPRECATED //-->
index 4189b7d78f6211872c1e04588d1f89a2469c1959..e1587709af2e1c17e41802a676a686f63c50c9ab 100644 (file)
@@ -50,9 +50,6 @@ if ((!isExtensionActive('order')) && (!isAdmin())) {
 
 $url = ''; $id = '0';
 
-// Count unconfirmed mails
-$links = getTotalUnconfirmedMails(getMemberId());
-
 $ALLOWED = getUserData('receive_mails') - getUserData('mail_orders');
 if (getConfig('order_max_full') == 'MAX') $ALLOWED = getUserData('receive_mails');
 
@@ -460,7 +457,7 @@ LIMIT 1",
 } elseif (($ALLOWED == '0') && (getConfig('order_max_full') == 'ORDER')) {
        // No more mail orders allowed
        displayMessage('{--MEMBER_ORDER_ALLOWED_EXHAUSTED--}');
-} elseif ($links < getConfig('unconfirmed')) {
+} elseif (getTotalUnconfirmedMails(getMemberId()) < getConfig('unconfirmed')) {
        // Show only enabled categories to the user ...
        $whereStatement = " WHERE `visible`='Y'";
 
@@ -735,7 +732,7 @@ LIMIT 1",
        }
 } else {
        // Please confirm some mails first
-       displayMessage('<span class="notice">{%message,MEMBER_ORDER_LINKS_LEFT=' . $links . '%}</span>', $links);
+       displayMessage('<span class="notice">{%message,MEMBER_ORDER_LINKS_LEFT=' . getTotalUnconfirmedMails(getMemberId()) . '%}</span>');
 }
 
 if (!empty($url)) {
index 94339e44f0d1eaca5959d6efcc3a89bef6d84918..7542489428338d5b249200391af7d54f57022dd9 100644 (file)
@@ -68,10 +68,10 @@ if (!SQL_HASZERONUMS($result)) {
                // Check for users ref in this level
                foreach (getUserReferalPoints(getMemberId(), $content['level']) as $refRow) {
                        // Add/"translate" more content
-                       $refRow['click_rate']   = translateComma($refRow['click_rate'], true, 1);
+                       $refRow['click_rate'] = translateComma($refRow['click_rate'], true, 1);
 
                        // Load row template
-                       $rows .= loadTemplate('member_ref_list_row', true, $refRow);
+                       $rows .= loadTemplate('member_list_referal_row', true, $refRow);
 
                        // Count this ref and switch color
                        $counter++;
@@ -83,11 +83,11 @@ if (!SQL_HASZERONUMS($result)) {
                $content['rows']     = $rows;
 
                // Load level template
-               $OUT .= loadTemplate('member_ref_list_level', true, $content);
+               $OUT .= loadTemplate('member_list_referal_level', true, $content);
        } // END - while
 
        // Load main template
-       loadTemplate('member_ref_list', false, $OUT);
+       loadTemplate('member_list_referal', false, $OUT);
 } else {
        // No entries
        displayMessage('{--MEMBER_REFBACK_NO_ENTRIES--}');
index 636d88aacbbedf138eac9c5a1bc118ca9777f5ef..001b7724cdb59807f5aa87029fcf86fb31429605 100644 (file)
@@ -373,12 +373,6 @@ ORDER BY
        if (!SQL_HASZERONUMS($result)) {
                // Fetch all entries
                while ($row = SQL_FETCHARRAY($result)) {
-                       // Get total points of this user
-                       $row['points'] = getTotalPoints($row['refid']);
-
-                       // Get unconfirmed mails
-                       $row['unconfirmed'] = getTotalUnconfirmedMails($row['refid']);
-
                        // Init click rate with zero
                        $row['click_rate'] = '0';
 
diff --git a/templates/de/html/member/member_list_referal.tpl b/templates/de/html/member/member_list_referal.tpl
new file mode 100644 (file)
index 0000000..3df765c
--- /dev/null
@@ -0,0 +1,10 @@
+<div align="center">
+<table border="0" cellspacing="0" cellpadding="0" class="table dashed" width="740">
+<tr>
+       <td align="center" class="header_column bottom">
+               <strong>{--MEMBER_REFLIST_TITLE--}</strong>
+       </td>
+</tr>
+$content
+</table>
+</div>
diff --git a/templates/de/html/member/member_list_referal_level.tpl b/templates/de/html/member/member_list_referal_level.tpl
new file mode 100644 (file)
index 0000000..00d94b7
--- /dev/null
@@ -0,0 +1,37 @@
+<tr>
+       <td align="center" style="padding:0px;margin:0px">
+<table border="0" cellspacing="0" cellpadding="0" class="table dashed">
+<tr>
+       <td align="center" class="header_column" colspan="6">
+               <strong>{--MEMBER_REFLIST_LIST_TITLE_1--}$content[level]{--MEMBER_REFLIST_LIST_TITLE_2--}$content[percents]{--MEMBER_REFLIST_LIST_TITLE_3--}</strong>
+       </td>
+</tr>
+<tr>
+       <td align="center" class="header_column bottom right">
+               <strong>{--_USERID--}</strong>
+       </td>
+       <td align="center" class="header_column bottom right">
+               <strong>{--ACCOUNT_STATUS--}</strong>
+       </td>
+       <td align="center" class="header_column bottom right">
+               <strong>{--MEMBER_REFLIST_POINTS--}</strong>
+       </td>
+       <td align="center" class="header_column bottom right">
+               <strong>{--UNCONFIRMED_LINKS--}</strong>
+       </td>
+       <td align="center" class="header_column bottom right">
+               <strong>{--MEMBER_CLICK_RATE--}</strong>
+       </td>
+       <td align="center" class="header_column bottom">
+               <strong>{--MEMBER_REFLIST_ACTIVITY--}</strong>
+       </td>
+</tr>
+$content[rows]
+<tr>
+       <td align="center" class="table_footer" colspan="6">
+               <span class="notice">{%message,MEMBER_REFLIST_COUNTER=$content[counter]%}</span>
+       </td>
+</tr>
+</table>
+       </td>
+</tr>
diff --git a/templates/de/html/member/member_list_referal_row.tpl b/templates/de/html/member/member_list_referal_row.tpl
new file mode 100644 (file)
index 0000000..ca2ba88
--- /dev/null
@@ -0,0 +1,20 @@
+<tr>
+       <td align="center" class="{%template,ColorSwitch%} bottom right">
+               $content[refid] ({%user,nickname,fixEmptyContentToDashes=$content[refid]%})
+       </td>
+       <td align="center" class="{%template,ColorSwitch%} bottom right">
+               {%pipe,translateUserStatus=$content[status]%}
+       </td>
+       <td align="center" class="{%template,ColorSwitch%} bottom right">
+               {%pipe,getTotalPoints,translateComma=$content[refid]%} {?POINTS?}
+       </td>
+       <td align="center" class="{%template,ColorSwitch%} bottom right">
+               {%pipe,getTotalUnconfirmedMails,translateComma=$content[refid]%}
+       </td>
+       <td align="center" class="{%template,ColorSwitch%} bottom right">
+               $content[click_rate]&#37;
+       </td>
+       <td align="center" class="{%template,ColorSwitch%} bottom right">
+               $content[activity]
+       </td>
+</tr>
index b17b537301ee4d2ff5a66116d51e55a84e52e097..11f5d85d80b1ca4d16cf4c19e14af24e5ec2a60f 100644 (file)
@@ -1,8 +1 @@
-<table border="0" cellspacing="0" cellpadding="0" class="table dashed" width="740">
-<tr>
-       <td align="center" class="header_column bottom">
-               <strong>{--MEMBER_REFLIST_TITLE--}</strong>
-       </td>
-</tr>
-$content
-</table>
+<!-- @DEPRECATED //-->
index 00d94b74e87c095bc06e4332b952e9a87552a761..11f5d85d80b1ca4d16cf4c19e14af24e5ec2a60f 100644 (file)
@@ -1,37 +1 @@
-<tr>
-       <td align="center" style="padding:0px;margin:0px">
-<table border="0" cellspacing="0" cellpadding="0" class="table dashed">
-<tr>
-       <td align="center" class="header_column" colspan="6">
-               <strong>{--MEMBER_REFLIST_LIST_TITLE_1--}$content[level]{--MEMBER_REFLIST_LIST_TITLE_2--}$content[percents]{--MEMBER_REFLIST_LIST_TITLE_3--}</strong>
-       </td>
-</tr>
-<tr>
-       <td align="center" class="header_column bottom right">
-               <strong>{--_USERID--}</strong>
-       </td>
-       <td align="center" class="header_column bottom right">
-               <strong>{--ACCOUNT_STATUS--}</strong>
-       </td>
-       <td align="center" class="header_column bottom right">
-               <strong>{--MEMBER_REFLIST_POINTS--}</strong>
-       </td>
-       <td align="center" class="header_column bottom right">
-               <strong>{--UNCONFIRMED_LINKS--}</strong>
-       </td>
-       <td align="center" class="header_column bottom right">
-               <strong>{--MEMBER_CLICK_RATE--}</strong>
-       </td>
-       <td align="center" class="header_column bottom">
-               <strong>{--MEMBER_REFLIST_ACTIVITY--}</strong>
-       </td>
-</tr>
-$content[rows]
-<tr>
-       <td align="center" class="table_footer" colspan="6">
-               <span class="notice">{%message,MEMBER_REFLIST_COUNTER=$content[counter]%}</span>
-       </td>
-</tr>
-</table>
-       </td>
-</tr>
+<!-- @DEPRECATED //-->
index 15a722a3cc8835afc76564301d0e53f9ee324bf2..11f5d85d80b1ca4d16cf4c19e14af24e5ec2a60f 100644 (file)
@@ -1,20 +1 @@
-<tr>
-       <td align="center" class="{%template,ColorSwitch%} bottom right">
-               $content[refid] ({%user,nickname,fixEmptyContentToDashes=$content[refid]%})
-       </td>
-       <td align="center" class="{%template,ColorSwitch%} bottom right">
-               {%pipe,translateUserStatus=$content[status]%}
-       </td>
-       <td align="center" class="{%template,ColorSwitch%} bottom right">
-               {%pipe,translateComma=$content[points]%} {?POINTS?}
-       </td>
-       <td align="center" class="{%template,ColorSwitch%} bottom right">
-               {%pipe,translateComma=$content[unconfirmed]%}
-       </td>
-       <td align="center" class="{%template,ColorSwitch%} bottom right">
-               $content[click_rate]&#37;
-       </td>
-       <td align="center" class="{%template,ColorSwitch%} bottom right">
-               $content[activity]
-       </td>
-</tr>
+<!-- @DEPRECATED //-->