Changeset 14640
- Timestamp:
- 06/28/07 08:03:27 (1 year ago)
- Files:
-
- wp-email/trunk/email/email.php (modified) (2 diffs)
- wp-email/trunk/email/wp-email.mo (modified) (previous)
- wp-email/trunk/email/wp-email.pot (modified) (7 diffs)
- wp-email/trunk/readme.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
wp-email/trunk/email/email.php
r14476 r14640 556 556 function get_emails_failed($echo = true) { 557 557 global $wpdb; 558 $totalemails_failed = $wpdb->get_var("SELECT COUNT(email_id) FROM $wpdb->email WHERE email_status = '". __('Failed', 'wp-email')."'");558 $totalemails_failed = $wpdb->get_var("SELECT COUNT(email_id) FROM $wpdb->email WHERE email_status = '".__('Failed', 'wp-email')."'"); 559 559 if($echo) { 560 560 echo number_format($totalemails_failed); … … 971 971 } 972 972 */ 973 974 975 ### Function: Plug Into WP-Stats 976 if(strpos(get_option('stats_url'), $_SERVER['REQUEST_URI']) || strpos($_SERVER['REQUEST_URI'], 'stats-options.php')) { 977 add_filter('wp_stats_page_admin_plugins', 'email_page_admin_general_stats'); 978 add_filter('wp_stats_page_admin_most', 'email_page_admin_most_stats'); 979 add_filter('wp_stats_page_plugins', 'email_page_general_stats'); 980 add_filter('wp_stats_page_most', 'email_page_most_stats'); 981 } 982 983 984 ### Function: Add WP-EMail General Stats To WP-Stats Page Options 985 function email_page_admin_general_stats($content) { 986 $stats_display = get_option('stats_display'); 987 if($stats_display['email'] == 1) { 988 $content .= '<input type="checkbox" name="stats_display[]" value="email" checked="checked" /> '.__('WP-EMail', 'wp-email').'<br />'."\n"; 989 } else { 990 $content .= '<input type="checkbox" name="stats_display[]" value="email" /> '.__('WP-EMail', 'wp-email').'<br />'."\n"; 991 } 992 return $content; 993 } 994 995 996 ### Function: Add WP-EMail Top Most/Highest Stats To WP-Stats Page Options 997 function email_page_admin_most_stats($content) { 998 $stats_display = get_option('stats_display'); 999 $stats_mostlimit = intval(get_option('stats_mostlimit')); 1000 if($stats_display['emailed_most'] == 1) { 1001 $content .= '<input type="checkbox" name="stats_display[]" value="emailed_most" checked="checked" /> '.$stats_mostlimit.' '.__('Most Emailed Posts', 'wp-email').'<br />'."\n"; 1002 } else { 1003 $content .= '<input type="checkbox" name="stats_display[]" value="emailed_most" /> '.$stats_mostlimit.' '.__('Most Emailed Posts', 'wp-email').'<br />'."\n"; 1004 } 1005 return $content; 1006 } 1007 1008 1009 ### Function: Add WP-EMail General Stats To WP-Stats Page 1010 function email_page_general_stats($content) { 1011 global $wpdb; 1012 $stats_display = get_option('stats_display'); 1013 if($stats_display['email'] == 1) { 1014 $email_stats = $wpdb->get_results("SELECT email_status, COUNT(email_id) AS email_total FROM $wpdb->email GROUP BY email_status"); 1015 if($email_stats) { 1016 $email_stats_array = array(); 1017 $email_stats_array['total'] = 0; 1018 foreach($email_stats as $email_stat) { 1019 $email_stats_array[$email_stat->email_status] = intval($email_stat->email_total); 1020 $email_stats_array['total'] += intval($email_stat->email_total); 1021 } 1022 } 1023 $content .= '<p><strong>'.__('WP-EMail', 'wp-email').'</strong></p>'."\n"; 1024 $content .= '<ul>'."\n"; 1025 $content .= '<li><strong>'.number_format($email_stats_array['total']).'</strong> '.__('Emails Were Sent.', 'wp-email').'</li>'."\n"; 1026 $content .= '<li><strong>'.number_format($email_stats_array[__('Success', 'wp-email')]).'</strong> '.__('Emails Were Sent Successfully.', 'wp-email').'</li>'."\n"; 1027 $content .= '<li><strong>'.number_format($email_stats_array[__('Failed', 'wp-email')]).'</strong> '.__('Emails Failed To Send.', 'wp-email').'</li>'."\n"; 1028 $content .= '</ul>'."\n"; 1029 } 1030 return $content; 1031 } 1032 1033 1034 ### Function: Add WP-EMail Top Most/Highest Stats To WP-Stats Page 1035 function email_page_most_stats($content) { 1036 $stats_display = get_option('stats_display'); 1037 $stats_mostlimit = intval(get_option('stats_mostlimit')); 1038 if($stats_display['emailed_most'] == 1) { 1039 $content .= '<p><strong>'.$stats_mostlimit.' '.__('Most Emailed Post', 'wp-email').'</strong></p>'."\n"; 1040 $content .= '<ul>'."\n"; 1041 $content .= get_mostemailed('post', $stats_mostlimit, 0, false); 1042 $content .= '</ul>'."\n"; 1043 } 1044 return $content; 1045 } 973 1046 974 1047 wp-email/trunk/email/wp-email.pot
r14476 r14640 3 3 "Project-Id-Version: WP-EMail 2.20\n" 4 4 "POT-Creation-Date: \n" 5 "PO-Revision-Date: 2007-06-2 5 00:08+0800\n"5 "PO-Revision-Date: 2007-06-28 16:03+0800\n" 6 6 "Last-Translator: Lester 'GaMerZ' Chan <gamerz84@hotmail.com>\n" 7 7 "Language-Team: Lester Chan <gamerz84@hotmail.com>\n" … … 96 96 #: email.php:819 97 97 #: email.php:867 98 #: email.php:1026 98 99 msgid "Success" 99 100 msgstr "" … … 102 103 #: email.php:558 103 104 #: email.php:831 105 #: email.php:1027 104 106 msgid "Failed" 105 107 msgstr "" … … 299 301 300 302 #: email-options.php:121 301 #: email.php:10 25303 #: email.php:1098 302 304 msgid "E-Mail '%EMAIL_POST_TITLE%' To A Friend" 303 305 msgstr "" 304 306 305 307 #: email-options.php:124 306 #: email.php:10 26308 #: email.php:1099 307 309 msgid "Email a copy of <strong>'%EMAIL_POST_TITLE%'</strong> to a friend" 308 310 msgstr "" 309 311 310 312 #: email-options.php:127 311 #: email.php:10 00313 #: email.php:1073 312 314 msgid "Recommended Article By %EMAIL_YOUR_NAME%: %EMAIL_POST_TITLE%" 313 315 msgstr "" … … 337 339 338 340 #: email-options.php:139 339 #: email.php:10 12341 #: email.php:1085 340 342 msgid "An Error Has Occured When Trying To Send The E-Mail" 341 343 msgstr "" 342 344 343 345 #: email-options.php:142 344 #: email.php:10 13346 #: email.php:1086 345 347 msgid "An Error Has Occured" 346 348 msgstr "" … … 903 905 msgstr "" 904 906 907 #: email.php:988 908 #: email.php:990 909 #: email.php:1023 910 msgid "WP-EMail" 911 msgstr "" 912 905 913 #: email.php:1001 914 #: email.php:1003 915 msgid "Most Emailed Posts" 916 msgstr "" 917 918 #: email.php:1025 919 msgid "Emails Were Sent." 920 msgstr "" 921 922 #: email.php:1026 923 msgid "Emails Were Sent Successfully." 924 msgstr "" 925 926 #: email.php:1027 927 msgid "Emails Failed To Send." 928 msgstr "" 929 930 #: email.php:1039 931 msgid "Most Emailed Post" 932 msgstr "" 933 934 #: email.php:1074 906 935 msgid "<p>Hi <strong>%EMAIL_FRIEND_NAME%</strong>,<br />Your friend, <strong>%EMAIL_YOUR_NAME%</strong>, has recommended this article entitled '<strong>%EMAIL_POST_TITLE%</strong>' to you.</p><p><strong>Here is his/her remark:</strong><br />%EMAIL_YOUR_REMARKS%</p><p><strong>%EMAIL_POST_TITLE%</strong><br />Posted By %EMAIL_POST_AUTHOR% On %EMAIL_POST_DATE% In %EMAIL_POST_CATEGORY%</p>%EMAIL_POST_CONTENT%<p>Article taken from %EMAIL_BLOG_NAME% - <a href=\"%EMAIL_BLOG_URL%\">%EMAIL_BLOG_URL%</a><br />URL to article: <a href=\"%EMAIL_PERMALINK%\">%EMAIL_PERMALINK%</a></p>" 907 936 msgstr "" 908 937 909 #: email.php:10 02938 #: email.php:1075 910 939 msgid "Hi %EMAIL_FRIEND_NAME%," 911 940 msgstr "" 912 941 913 #: email.php:10 02914 #: email.php:10 04915 #: email.php:10 06916 #: email.php:10 07917 #: email.php:10 08918 #: email.php:10 09942 #: email.php:1075 943 #: email.php:1077 944 #: email.php:1079 945 #: email.php:1080 946 #: email.php:1081 947 #: email.php:1082 919 948 msgid "\n" 920 949 msgstr "" 921 950 922 #: email.php:10 03951 #: email.php:1076 923 952 msgid "Your friend, %EMAIL_YOUR_NAME%, has recommended this article entitled '%EMAIL_POST_TITLE%' to you." 924 953 msgstr "" 925 954 926 #: email.php:10 03927 #: email.php:10 05955 #: email.php:1076 956 #: email.php:1078 928 957 msgid "" 929 958 "\n" … … 931 960 msgstr "" 932 961 933 #: email.php:10 04962 #: email.php:1077 934 963 msgid "Here is his/her remarks:" 935 964 msgstr "" 936 965 937 #: email.php:10 05966 #: email.php:1078 938 967 msgid "%EMAIL_YOUR_REMARKS%" 939 968 msgstr "" 940 969 941 #: email.php:10 06970 #: email.php:1079 942 971 msgid "%EMAIL_POST_TITLE%" 943 972 msgstr "" 944 973 945 #: email.php:10 07974 #: email.php:1080 946 975 msgid "Posted By %EMAIL_POST_AUTHOR% On %EMAIL_POST_DATE% In %EMAIL_POST_CATEGORY%" 947 976 msgstr "" 948 977 949 #: email.php:10 08978 #: email.php:1081 950 979 msgid "%EMAIL_POST_CONTENT%" 951 980 msgstr "" 952 981 953 #: email.php:10 09982 #: email.php:1082 954 983 msgid "Article taken from %EMAIL_BLOG_NAME% - %EMAIL_BLOG_URL%" 955 984 msgstr "" 956 985 957 #: email.php:10 10986 #: email.php:1083 958 987 msgid "URL to article: %EMAIL_PERMALINK%" 959 988 msgstr "" 960 989 961 #: email.php:10 11990 #: email.php:1084 962 991 msgid "Article: <strong>%EMAIL_POST_TITLE%</strong> Has Been Sent To <strong>%EMAIL_FRIEND_NAME% (%EMAIL_FRIEND_EMAIL%)</strong></p>" 963 992 msgstr "" 964 993 965 #: email.php:10 20994 #: email.php:1093 966 995 msgid "Email This Post" 967 996 msgstr "" 968 997 969 #: email.php:10 20998 #: email.php:1093 970 999 msgid "Email This Page" 971 1000 msgstr "" wp-email/trunk/readme.html
r14476 r14640 293 293 <li>NEW: Most Emailed Widget Added</li> 294 294 <li>NEW: Ability To Uninstall WP-EMail</li> 295 <li>NEW: Uses WP-Stats Filter To Add Stats Into WP-Stats Page</li> 295 296 </ul> 296 297 </li>
