Changeset 7717

Show
Ignore:
Timestamp:
01/30/07 12:46:42 (1 year ago)
Author:
GamerZ
Message:

WP-EMail 2.10

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • wp-email/trunk/email/email.php

    r7644 r7717  
    182182 
    183183### 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  
     184if(!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 
     197if (!function_exists('htmlspecialchars_decode')) { 
     198   function htmlspecialchars_decode($text) { 
     199       return strtr($text, array_flip(get_html_translation_table(HTML_SPECIALCHARS))); 
     200   } 
     201
    193202 
    194203### Function: E-Mail Page Title 
     
    218227      $email_snippet = intval(get_option('email_snippet')); 
    219228      if($email_snippet > 0) { 
    220             return snippet_text($content , $email_snippet); 
     229            return snippet_chars($content , $email_snippet); 
    221230      } else { 
    222231            return $content; 
     
    233242      $email_snippet = intval(get_option('email_snippet')); 
    234243      if($email_snippet > 0) { 
    235             return snippet_text($content , $email_snippet); 
     244            return snippet_chars($content , $email_snippet); 
    236245      } else { 
    237246            return $content; 
     
    414423 
    415424 
    416 ### Function: Log E-Mail 
    417 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  
    424425### Function: Multiple E-Mails 
    425426function email_multiple($echo = true) { 
     
    548549### Function: E-Mail Form 
    549550function 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
    551552      // Variables 
    552553      $email_fields = get_option('email_fields'); 
     
    748749                  $email_youremail = addslashes($youremail); 
    749750                  $email_yourremarks = addslashes($yourremarks); 
    750                   $email_postid = get_the_id(); 
     751                  $email_postid = intval(get_the_id()); 
    751752                  $email_posttitle = addslashes($post_title); 
    752753                  $email_timestamp = current_time('timestamp'); 
     
    756757                        $email_friendname = addslashes($friend['name']); 
    757758                        $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')"); 
    759760                  } 
    760761            // If There Are Errors 
  • wp-email/trunk/email/wp-email.pot

    r7640 r7717  
    33"Project-Id-Version: WP-EMail 2.10\n" 
    44"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" 
    66"Last-Translator: Lester 'GaMerZ' Chan <gamerz84@hotmail.com>\n" 
    77"Language-Team: Lester Chan <gamerz84@hotmail.com>\n" 
     
    9292 
    9393#: email-manager.php:126 
    94 #: email.php:332 
    95 #: email.php:456 
    96 #: email.php:723 
    97 #: email.php:771 
     94#: email.php:341 
     95#: email.php:457 
     96#: email.php:724 
     97#: email.php:772 
    9898msgid "Success" 
    9999msgstr "" 
    100100 
    101101#: email-manager.php:127 
    102 #: email.php:470 
    103 #: email.php:735 
     102#: email.php:471 
     103#: email.php:736 
    104104msgid "Failed" 
    105105msgstr "" 
     
    290290 
    291291#: email-options.php:115 
    292 #: email.php:866 
     292#: email.php:867 
    293293msgid "Recommended Article By %EMAIL_YOUR_NAME%: %EMAIL_POST_TITLE%" 
    294294msgstr "" 
     
    318318 
    319319#: email-options.php:127 
    320 #: email.php:878 
     320#: email.php:879 
    321321msgid "An Error Has Occured When Trying To Send The E-Mail" 
    322322msgstr "" 
    323323 
    324324#: email-options.php:130 
    325 #: email.php:879 
     325#: email.php:880 
    326326msgid "An Error Has Occured" 
    327327msgstr "" 
     
    656656 
    657657#: email.php:43 
    658 #: email.php:196 
     658#: email.php:205 
    659659msgid "E-Mail" 
    660660msgstr "" 
     
    664664msgstr "" 
    665665 
    666 #: email.php:203 
     666#: email.php:212 
    667667#, php-format 
    668668msgid "E-Mail '%s' To A Friend" 
    669669msgstr "" 
    670670 
    671 #: email.php:247 
     671#: email.php:256 
    672672msgid "Password Protected Post" 
    673673msgstr "" 
    674674 
    675 #: email.php:428 
     675#: email.php:429 
    676676#, php-format 
    677677msgid "Separate multiple entries with a comma. Maximum %s entries." 
    678678msgstr "" 
    679679 
    680 #: email.php:497 
    681 #: email.php:503 
     680#: email.php:498 
     681#: email.php:504 
    682682msgid "Emails" 
    683683msgstr "" 
    684684 
    685 #: email.php:507 
    686 #: email.php:734 
     685#: email.php:508 
     686#: email.php:735 
    687687msgid "N/A" 
    688688msgstr "" 
    689689 
    690 #: email.php:560 
     690#: email.php:561 
    691691#, php-format 
    692692msgid "E-Mail A Copy Of <strong>%s</strong> To A Friend." 
    693693msgstr "" 
    694694 
    695 #: email.php:579 
     695#: email.php:580 
    696696msgid "Your name is empty." 
    697697msgstr "" 
    698698 
    699 #: email.php:585 
     699#: email.php:586 
    700700msgid "Your email is invalid or is empty." 
    701701msgstr "" 
    702702 
    703 #: email.php:591 
     703#: email.php:592 
    704704msgid "Your remarks is invalid." 
    705705msgstr "" 
    706706 
    707 #: email.php:600 
     707#: email.php:601 
    708708#, php-format 
    709709msgid "Friend's name (%s) is empty." 
    710710msgstr "" 
    711711 
    712 #: email.php:617 
     712#: email.php:618 
    713713#, php-format 
    714714msgid "Friend's email (%s) is invalid or is empty." 
    715715msgstr "" 
    716716 
    717 #: email.php:631 
     717#: email.php:632 
    718718#, php-format 
    719719msgid "Maximum %s entries allowed" 
    720720msgstr "" 
    721721 
    722 #: email.php:634 
     722#: email.php:635 
    723723msgid "Friends' name count does not tally with friends' email count." 
    724724msgstr "" 
    725725 
    726 #: email.php:641 
     726#: email.php:642 
    727727msgid "Image verification is empty." 
    728728msgstr "" 
    729729 
    730 #: email.php:644 
     730#: email.php:645 
    731731msgid "Image verification failed." 
    732732msgstr "" 
    733733 
    734 #: email.php:820 
     734#: email.php:821 
    735735msgid "E-Mail Image Verification" 
    736736msgstr "" 
    737737 
    738 #: email.php:823 
     738#: email.php:824 
    739739msgid "     Mail It!     " 
    740740msgstr "" 
    741741 
    742 #: email.php:829 
     742#: email.php:830 
    743743#, php-format 
    744744msgid "Please wait for <strong>%s Minutes</strong> before sending the next article." 
    745745msgstr "" 
    746746 
    747 #: email.php:867 
     747#: email.php:868 
    748748msgid "<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>" 
    749749msgstr "" 
    750750 
    751 #: email.php:868 
     751#: email.php:869 
    752752msgid "Hi %EMAIL_FRIEND_NAME%," 
    753753msgstr "" 
    754754 
    755 #: email.php:868 
    756 #: email.php:870 
    757 #: email.php:872 
     755#: email.php:869 
     756#: email.php:871 
    758757#: email.php:873 
    759758#: email.php:874 
    760759#: email.php:875 
     760#: email.php:876 
    761761msgid "\n" 
    762762msgstr "" 
    763763 
    764 #: email.php:869 
     764#: email.php:870 
    765765msgid "Your friend, %EMAIL_YOUR_NAME%, has recommended this article entitled '%EMAIL_POST_TITLE%' to you." 
    766766msgstr "" 
    767767 
    768 #: email.php:869 
    769 #: email.php:871 
     768#: email.php:870 
     769#: email.php:872 
    770770msgid "" 
    771771"\n" 
     
    773773msgstr "" 
    774774 
    775 #: email.php:870 
     775#: email.php:871 
    776776msgid "Here is his/her remarks:" 
    777777msgstr "" 
    778778 
    779 #: email.php:871 
     779#: email.php:872 
    780780msgid "%EMAIL_YOUR_REMARKS%" 
    781781msgstr "" 
    782782 
    783 #: email.php:872 
     783#: email.php:873 
    784784msgid "%EMAIL_POST_TITLE%" 
    785785msgstr "" 
    786786 
    787 #: email.php:873 
     787#: email.php:874 
    788788msgid "Posted By %EMAIL_POST_AUTHOR% On %EMAIL_POST_DATE% In %EMAIL_POST_CATEGORY%" 
    789789msgstr "" 
    790790 
    791 #: email.php:874 
     791#: email.php:875 
    792792msgid "%EMAIL_POST_CONTENT%" 
    793793msgstr "" 
    794794 
    795 #: email.php:875 
     795#: email.php:876 
    796796msgid "Article taken from %EMAIL_BLOG_NAME% - %EMAIL_BLOG_URL%" 
    797797msgstr "" 
    798798 
    799 #: email.php:876 
     799#: email.php:877 
    800800msgid "URL to article: %EMAIL_PERMALINK%" 
    801801msgstr "" 
    802802 
    803 #: email.php:877 
     803#: email.php:878 
    804804msgid "Article: <strong>%EMAIL_POST_TITLE%</strong> Has Been Sent To <strong>%EMAIL_FRIEND_NAME% (%EMAIL_FRIEND_EMAIL%)</strong></p>" 
    805805msgstr "" 
    806806 
    807 #: email.php:886 
     807#: email.php:887 
    808808msgid "Email This Post" 
    809809msgstr "" 
    810810 
    811 #: email.php:886 
     811#: email.php:887 
    812812msgid "Email This Page" 
    813813msgstr "" 
  • wp-email/trunk/readme.html

    r7640 r7717  
    554554                  <div class="SubSubTitle">Note</div> 
    555555                  <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> 
    556559                        <li> 
    557560                              To change the background color of the popup window: