Changeset 7717
- Timestamp:
- 01/30/07 12:46:42 (1 year ago)
- Files:
-
- wp-email/trunk/email/email.php (modified) (7 diffs)
- 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
r7644 r7717 182 182 183 183 ### Function: Snippet Text 184 function snippet_text($text, $length = 0) { 185 $words = preg_split('/\s+/', ltrim($text), $length + 1); 186 if(count($words) > $length) { 187 return rtrim(substr($text, 0, strlen($text) - strlen(end($words)))).' ...'; 188 } else { 189 return $text; 190 } 191 } 192 184 if(!function_exists('snippet_chars')) { 185 function snippet_chars($text, $length = 0) { 186 $text = htmlspecialchars_decode($text); 187 if (strlen($text) > $length){ 188 return htmlspecialchars(substr($text,0,$length)).'...'; 189 } else { 190 return htmlspecialchars($text); 191 } 192 } 193 } 194 195 196 ### Function: HTML Special Chars Decode 197 if (!function_exists('htmlspecialchars_decode')) { 198 function htmlspecialchars_decode($text) { 199 return strtr($text, array_flip(get_html_translation_table(HTML_SPECIALCHARS))); 200 } 201 } 193 202 194 203 ### Function: E-Mail Page Title … … 218 227 $email_snippet = intval(get_option('email_snippet')); 219 228 if($email_snippet > 0) { 220 return snippet_ text($content , $email_snippet);229 return snippet_chars($content , $email_snippet); 221 230 } else { 222 231 return $content; … … 233 242 $email_snippet = intval(get_option('email_snippet')); 234 243 if($email_snippet > 0) { 235 return snippet_ text($content , $email_snippet);244 return snippet_chars($content , $email_snippet); 236 245 } else { 237 246 return $content; … … 414 423 415 424 416 ### Function: Log E-Mail417 function email_log($email_query = '') {418 global $wpdb;419 $log_email_sending = $wpdb->query("INSERT INTO $wpdb->email VALUES(".$email_query.')');420 return $log_email_sending;421 }422 423 424 425 ### Function: Multiple E-Mails 425 426 function email_multiple($echo = true) { … … 548 549 ### Function: E-Mail Form 549 550 function email_form($popup = false, $echo = true) { 550 global $post_excerpt, $post_content, $post_content_alt ;551 global $post_excerpt, $post_content, $post_content_alt, $wpdb; 551 552 // Variables 552 553 $email_fields = get_option('email_fields'); … … 748 749 $email_youremail = addslashes($youremail); 749 750 $email_yourremarks = addslashes($yourremarks); 750 $email_postid = get_the_id();751 $email_postid = intval(get_the_id()); 751 752 $email_posttitle = addslashes($post_title); 752 753 $email_timestamp = current_time('timestamp'); … … 756 757 $email_friendname = addslashes($friend['name']); 757 758 $email_friendemail = addslashes($friend['email']); 758 $ log_email_sending = email_log("0, '$email_yourname', '$email_youremail', '$email_yourremarks', '$email_friendname', '$email_friendemail', $email_postid, '$email_posttitle', '$email_timestamp', '$email_ip', '$email_host', '$email_status'");759 $wpdb->query("INSERT INTO $wpdb->email VALUES (0, '$email_yourname', '$email_youremail', '$email_yourremarks', '$email_friendname', '$email_friendemail', $email_postid, '$email_posttitle', '$email_timestamp', '$email_ip', '$email_host', '$email_status')"); 759 760 } 760 761 // If There Are Errors wp-email/trunk/email/wp-email.pot
r7640 r7717 3 3 "Project-Id-Version: WP-EMail 2.10\n" 4 4 "POT-Creation-Date: \n" 5 "PO-Revision-Date: 2007-01- 27 15:43+0800\n"5 "PO-Revision-Date: 2007-01-30 20:36+0800\n" 6 6 "Last-Translator: Lester 'GaMerZ' Chan <gamerz84@hotmail.com>\n" 7 7 "Language-Team: Lester Chan <gamerz84@hotmail.com>\n" … … 92 92 93 93 #: email-manager.php:126 94 #: email.php:3 3295 #: email.php:45 696 #: email.php:72 397 #: email.php:77 194 #: email.php:341 95 #: email.php:457 96 #: email.php:724 97 #: email.php:772 98 98 msgid "Success" 99 99 msgstr "" 100 100 101 101 #: email-manager.php:127 102 #: email.php:47 0103 #: email.php:73 5102 #: email.php:471 103 #: email.php:736 104 104 msgid "Failed" 105 105 msgstr "" … … 290 290 291 291 #: email-options.php:115 292 #: email.php:86 6292 #: email.php:867 293 293 msgid "Recommended Article By %EMAIL_YOUR_NAME%: %EMAIL_POST_TITLE%" 294 294 msgstr "" … … 318 318 319 319 #: email-options.php:127 320 #: email.php:87 8320 #: email.php:879 321 321 msgid "An Error Has Occured When Trying To Send The E-Mail" 322 322 msgstr "" 323 323 324 324 #: email-options.php:130 325 #: email.php:8 79325 #: email.php:880 326 326 msgid "An Error Has Occured" 327 327 msgstr "" … … 656 656 657 657 #: email.php:43 658 #: email.php: 196658 #: email.php:205 659 659 msgid "E-Mail" 660 660 msgstr "" … … 664 664 msgstr "" 665 665 666 #: email.php:2 03666 #: email.php:212 667 667 #, php-format 668 668 msgid "E-Mail '%s' To A Friend" 669 669 msgstr "" 670 670 671 #: email.php:2 47671 #: email.php:256 672 672 msgid "Password Protected Post" 673 673 msgstr "" 674 674 675 #: email.php:42 8675 #: email.php:429 676 676 #, php-format 677 677 msgid "Separate multiple entries with a comma. Maximum %s entries." 678 678 msgstr "" 679 679 680 #: email.php:49 7681 #: email.php:50 3680 #: email.php:498 681 #: email.php:504 682 682 msgid "Emails" 683 683 msgstr "" 684 684 685 #: email.php:50 7686 #: email.php:73 4685 #: email.php:508 686 #: email.php:735 687 687 msgid "N/A" 688 688 msgstr "" 689 689 690 #: email.php:56 0690 #: email.php:561 691 691 #, php-format 692 692 msgid "E-Mail A Copy Of <strong>%s</strong> To A Friend." 693 693 msgstr "" 694 694 695 #: email.php:5 79695 #: email.php:580 696 696 msgid "Your name is empty." 697 697 msgstr "" 698 698 699 #: email.php:58 5699 #: email.php:586 700 700 msgid "Your email is invalid or is empty." 701 701 msgstr "" 702 702 703 #: email.php:59 1703 #: email.php:592 704 704 msgid "Your remarks is invalid." 705 705 msgstr "" 706 706 707 #: email.php:60 0707 #: email.php:601 708 708 #, php-format 709 709 msgid "Friend's name (%s) is empty." 710 710 msgstr "" 711 711 712 #: email.php:61 7712 #: email.php:618 713 713 #, php-format 714 714 msgid "Friend's email (%s) is invalid or is empty." 715 715 msgstr "" 716 716 717 #: email.php:63 1717 #: email.php:632 718 718 #, php-format 719 719 msgid "Maximum %s entries allowed" 720 720 msgstr "" 721 721 722 #: email.php:63 4722 #: email.php:635 723 723 msgid "Friends' name count does not tally with friends' email count." 724 724 msgstr "" 725 725 726 #: email.php:64 1726 #: email.php:642 727 727 msgid "Image verification is empty." 728 728 msgstr "" 729 729 730 #: email.php:64 4730 #: email.php:645 731 731 msgid "Image verification failed." 732 732 msgstr "" 733 733 734 #: email.php:82 0734 #: email.php:821 735 735 msgid "E-Mail Image Verification" 736 736 msgstr "" 737 737 738 #: email.php:82 3738 #: email.php:824 739 739 msgid " Mail It! " 740 740 msgstr "" 741 741 742 #: email.php:8 29742 #: email.php:830 743 743 #, php-format 744 744 msgid "Please wait for <strong>%s Minutes</strong> before sending the next article." 745 745 msgstr "" 746 746 747 #: email.php:86 7747 #: email.php:868 748 748 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 remarks:</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>" 749 749 msgstr "" 750 750 751 #: email.php:86 8751 #: email.php:869 752 752 msgid "Hi %EMAIL_FRIEND_NAME%," 753 753 msgstr "" 754 754 755 #: email.php:868 756 #: email.php:870 757 #: email.php:872 755 #: email.php:869 756 #: email.php:871 758 757 #: email.php:873 759 758 #: email.php:874 760 759 #: email.php:875 760 #: email.php:876 761 761 msgid "\n" 762 762 msgstr "" 763 763 764 #: email.php:8 69764 #: email.php:870 765 765 msgid "Your friend, %EMAIL_YOUR_NAME%, has recommended this article entitled '%EMAIL_POST_TITLE%' to you." 766 766 msgstr "" 767 767 768 #: email.php:8 69769 #: email.php:87 1768 #: email.php:870 769 #: email.php:872 770 770 msgid "" 771 771 "\n" … … 773 773 msgstr "" 774 774 775 #: email.php:87 0775 #: email.php:871 776 776 msgid "Here is his/her remarks:" 777 777 msgstr "" 778 778 779 #: email.php:87 1779 #: email.php:872 780 780 msgid "%EMAIL_YOUR_REMARKS%" 781 781 msgstr "" 782 782 783 #: email.php:87 2783 #: email.php:873 784 784 msgid "%EMAIL_POST_TITLE%" 785 785 msgstr "" 786 786 787 #: email.php:87 3787 #: email.php:874 788 788 msgid "Posted By %EMAIL_POST_AUTHOR% On %EMAIL_POST_DATE% In %EMAIL_POST_CATEGORY%" 789 789 msgstr "" 790 790 791 #: email.php:87 4791 #: email.php:875 792 792 msgid "%EMAIL_POST_CONTENT%" 793 793 msgstr "" 794 794 795 #: email.php:87 5795 #: email.php:876 796 796 msgid "Article taken from %EMAIL_BLOG_NAME% - %EMAIL_BLOG_URL%" 797 797 msgstr "" 798 798 799 #: email.php:87 6799 #: email.php:877 800 800 msgid "URL to article: %EMAIL_PERMALINK%" 801 801 msgstr "" 802 802 803 #: email.php:87 7803 #: email.php:878 804 804 msgid "Article: <strong>%EMAIL_POST_TITLE%</strong> Has Been Sent To <strong>%EMAIL_FRIEND_NAME% (%EMAIL_FRIEND_EMAIL%)</strong></p>" 805 805 msgstr "" 806 806 807 #: email.php:88 6807 #: email.php:887 808 808 msgid "Email This Post" 809 809 msgstr "" 810 810 811 #: email.php:88 6811 #: email.php:887 812 812 msgid "Email This Page" 813 813 msgstr "" wp-email/trunk/readme.html
r7640 r7717 554 554 <div class="SubSubTitle">Note</div> 555 555 <ul> 556 <li>If WP-EMail 2.10 does not work for you (404 error even after re-generating of permalink), please drop me an email with page.php of your theme attached to it. The problem is due to your theme is using an outdated method of getting/display posts/pages.</li> 557 </ul> 558 <ul> 556 559 <li> 557 560 To change the background color of the popup window:
