| 1 |
=== WP-EMail === |
| 2 |
Contributors: GamerZ, aaroncampbell |
| 3 |
Donate link: http://lesterchan.net/site/donation/ |
| 4 |
Tags: email, e-mail, wp-email, mail, send, recommend, ajax, friend |
| 5 |
Requires at least: 2.8 |
| 6 |
Tested up to: 3.6 |
| 7 |
Stable tag: 2.61 |
| 8 |
License: GPLv2 or later |
| 9 |
|
| 10 |
Allows people to recommend/send your WordPress blog's post/page to a friend. |
| 11 |
|
| 12 |
== Description == |
| 13 |
|
| 14 |
Allows people to recommend/send your WordPress blog's post/page to a friend. |
| 15 |
|
| 16 |
[Demo](http://lesterchan.net/wordpress/2006/07/05/donations/email/ "Demo") | [Translations](http://dev.wp-plugins.org/browser/wp-email/i18n/ "Translations") | [Support Forums](http://forums.lesterchan.net/index.php?board=13.0 "WP-EMail Support Forums") |
| 17 |
|
| 18 |
= Credits = |
| 19 |
* Icons courtesy of [FamFamFam](http://www.famfamfam.com/). |
| 20 |
* __ngetext() by [Anna Ozeritskaya](http://hweia.ru/). |
| 21 |
* Right-to-left language support by [Kambiz R. Khojasteh](http://persian-programming.com/) |
| 22 |
* Maintenance by [AaronCampbell](http://xavisys.com) |
| 23 |
|
| 24 |
= Donations = |
| 25 |
I spent most of my free time creating, updating, maintaining and supporting these plugins, if you really love my plugins and could spare me a couple of bucks as my school allowance, I will really appericiate it. If not feel free to use it without any obligations. Thank You. My Paypal account is lesterchan@gmail.com. |
| 26 |
|
| 27 |
== Installation == |
| 28 |
|
| 29 |
You can either install it automatically from the WordPress admin, or do it manually: |
| 30 |
|
| 31 |
1. Upload the whole `wp-email` directory into your plugins folder(`/wp-content/plugins/`) |
| 32 |
1. Activate the plugin through the 'Plugins' menu in WordPress |
| 33 |
|
| 34 |
Once installed take the following steps to set it up: |
| 35 |
|
| 36 |
1. Under E-Mail Settings, modify the setting Method Used To Send E-Mail accordingly. If the method is wrong, no email will get sent. |
| 37 |
1. You Need To Re-Generate The Permalink (WP-Admin -> Settings -> Permalinks -> Save Changes) |
| 38 |
1. Open `wp-content/themes/<YOUR THEME NAME>/index.php` (You may place it in single.php, post.php, page.php, etc also) |
| 39 |
* Find: `<?php while (have_posts()) : the_post(); ?>` |
| 40 |
* Simply add this code inside the loop where you want the email link to display: <code>if(function_exists('email_link')) { email_link(); }</code> |
| 41 |
|
| 42 |
If you DO NOT want the email link to appear in every post/page, DO NOT use the code above. Just use the shortcode by typing [email_link] into the selected post/page content and it will embed the email link into that post/page only. |
| 43 |
|
| 44 |
== Upgrade Notice == |
| 45 |
N/A |
| 46 |
|
| 47 |
== Screenshots == |
| 48 |
|
| 49 |
1. Admin E-Mail logs |
| 50 |
2. Options/settings page |
| 51 |
3. Sample E-Mail Post link |
| 52 |
4. Sample E-Mail Post screen |
| 53 |
|
| 54 |
== Frequently Asked Questions == |
| 55 |
|
| 56 |
= Does it support SMTP authentication with servers utilizing SSL encryption? = |
| 57 |
|
| 58 |
1. Yes. Go to `WP-Admin -> E-Mail -> Email Options`, under `SMTP Server`, use `ssl://smtp.gmail.com:465` if you are using Gmail SMTP. |
| 59 |
|
| 60 |
= How do I add this to my theme? = |
| 61 |
|
| 62 |
1. Open `wp-content/themes/<YOUR THEME NAME>/index.php` (You may place it in single.php, post.php, page.php, etc also) |
| 63 |
1. Find: `<?php while (have_posts()) : the_post(); ?>` |
| 64 |
1. Simply add this code <strong>inside the loop</strong> where you want the email link to display: <code>if(function_exists('email_link')) { email_link(); }</code> |
| 65 |
|
| 66 |
= How can I customize my E-Mail link? = |
| 67 |
|
| 68 |
Many customizations can be made from the options page (WP Admin->E-Mail->E-Mail Options). |
| 69 |
|
| 70 |
Additionally, you can override the "E-Mail Text Link for Post" and "E-Mail Text Link for Page" options with the first two parameters of the email_link function like this: |
| 71 |
<code> |
| 72 |
if(function_exists('email_link')) |
| 73 |
email_link( 'E-Mail Text Link for Post', 'E-Mail Text Link for Page'); |
| 74 |
</code> |
| 75 |
|
| 76 |
You can also force `email_link()` to return the link rather than echo it by setting the third parameter to false: |
| 77 |
<code> |
| 78 |
if(function_exists('email_link')) { |
| 79 |
$email_link ### email_link( 'E-Mail Text Link for Post', 'E-Mail Text Link for Page', false); |
| 80 |
} else { |
| 81 |
$email_link ### ''; |
| 82 |
} |
| 83 |
|
| 84 |
echo $email_link; |
| 85 |
</code> |
| 86 |
|
| 87 |
= How can I show my E-Mail stats? = |
| 88 |
|
| 89 |
There are two options for this: |
| 90 |
1. You can use the included widget by going to Wp-Admin -> Appearance -> Widgets" and using the widget named "Email" |
| 91 |
1. You can use a number of included theme functions for displaying various stats. Please continue to read these FAQs for more information. |
| 92 |
|
| 93 |
= How can I display the Most E-Mailed Posts? = |
| 94 |
|
| 95 |
Simply insert this code into your theme: |
| 96 |
<code> |
| 97 |
if (function_exists('get_mostemailed')) |
| 98 |
get_mostemailed('both', 10); |
| 99 |
</code> |
| 100 |
|
| 101 |
The first parameter is what you want to get, 'post', 'page', or 'both' and defaults to 'both'. |
| 102 |
The second parameter is the maximum number of posts/pages you want to get. |
| 103 |
|
| 104 |
= How can I display the Total E-Mails Sent? = |
| 105 |
|
| 106 |
Simply insert this code into your theme: |
| 107 |
<code> |
| 108 |
if (function_exists('get_emails')) |
| 109 |
get_emails(); |
| 110 |
</code> |
| 111 |
|
| 112 |
= How can I display the Total E-Mails Sent Successfully? = |
| 113 |
|
| 114 |
Simply insert this code into your theme: |
| 115 |
<code> |
| 116 |
if (function_exists('get_emails_success')) |
| 117 |
get_emails_success(); |
| 118 |
</code> |
| 119 |
|
| 120 |
= How can I display the Total E-Mails Sent Unsuccessfully? = |
| 121 |
|
| 122 |
Simply insert this code into your theme: |
| 123 |
<code> |
| 124 |
if (function_exists('get_emails_failed')) |
| 125 |
get_emails_failed(); |
| 126 |
</code> |
| 127 |
|
| 128 |
= How do I hide remarks when viewing E-Mail logs in WP-Admin? = |
| 129 |
|
| 130 |
1. Open `wp-email.php` |
| 131 |
1. Find `define('EMAIL_SHOW_REMARKS', true);` |
| 132 |
1. Replace with `define('EMAIL_SHOW_REMARKS', false);` |
| 133 |
|
| 134 |
= How can I keep some post text from being sent in the E-Mail? = |
| 135 |
|
| 136 |
If you do not want to email a portion of your post's content, do the following: |
| 137 |
|
| 138 |
`[donotemail]Text within this tag will not be displayed when emailed[/donotemail]` |
| 139 |
|
| 140 |
The text within [donotemail][/donotemail] will not be displayed when you are emailing a post or page. |
| 141 |
However, it will still be displayed as normal on a normal post or page view. |
| 142 |
Do note that if you are using WP-Print, any text within [donotemail][/donotemail] will not be printed as well. |
| 143 |
|
| 144 |
= I made changes to the CSS, how can I keep them from being overridden on the next upgrade? = |
| 145 |
|
| 146 |
WP-Email will load `email-css.css` from your theme's directory if it exists. If it doesn't exist then it will load the default `email-css.css` that comes with WP-Email. Just move your custom CSS to the appropriate file in your theme directory and it will be "upgrade-proof" |
| 147 |
|
| 148 |
= How can I make the E-Mail title different from the post title? = |
| 149 |
|
| 150 |
If you add a custom field with the key "wp-email-title" it will be used as the E-Mail title. |
| 151 |
|
| 152 |
= How can I set a default or suggested remark for the user? = |
| 153 |
|
| 154 |
If you add a custom field with the key "wp-email-remark" it will be placed in the remarks field in the E-Mail form. |
| 155 |
|
| 156 |
== Changelog == |
| 157 |
|
| 158 |
= 2.61 = |
| 159 |
* FIXED: Unable to load WP-Email on Password Protected posts |
| 160 |
|
| 161 |
= 2.60 = |
| 162 |
* Move AJAX Request to wp-admin/admin-ajax.php |
| 163 |
* Added nonce To Email Form |
| 164 |
|
| 165 |
= 2.52 = |
| 166 |
* Added support for the wp-email-title and wp-email-remark custom fields |
| 167 |
|
| 168 |
= 2.51 = |
| 169 |
* FIXED: Warnings of non-existant array indices |
| 170 |
|
| 171 |
= 2.50 = |
| 172 |
* NEW: Works For WordPress 2.8 Only |
| 173 |
* NEW: Javascript Now Placed At The Footer |
| 174 |
* NEW: Uses jQuery Instead Of tw-sack |
| 175 |
* NEW: Minified Javascript Instead Of Packed Javascript |
| 176 |
* NEW: Renamed email-js-packed.js To email-js.js |
| 177 |
* NEW: Renamed email-js.js To email-js.dev.js |
| 178 |
* NEW: Translate Javascript Variables Using wp_localize_script() |
| 179 |
* NEW: Fill In "Your Name" And "Your Email" Fields If User Is Logged In (By Aaron Campbell) |
| 180 |
* NEW: Added [donotemail][/donotemail] Short Code (Refer To Usage Tab) |
| 181 |
* NEW: Added In Most Emailed Pages To WP-Stats |
| 182 |
* NEW: Use _n() Instead Of __ngettext() And _n_noop() Instead Of __ngettext_noop() |
| 183 |
* NEW: Uses New Widget Class From WordPress |
| 184 |
* NEW: Merge Widget Code To wp-email.php And Remove wp-email-widget.php |
| 185 |
* FIXED: Uses $_SERVER['PHP_SELF'] With plugin_basename(__FILE__) Instead Of Just $_SERVER['REQUEST_URI'] |
| 186 |
* FIXED: Nested ShortCode Issues |
| 187 |
* FIXED: Double Slashes In SMTP Username |
| 188 |
|
| 189 |
= 2.40 = |
| 190 |
* NEW: Works For WordPress 2.7 Only |
| 191 |
* NEW: Load Admin JS And CSS Only In WP-Email Admin Pages |
| 192 |
* NEW: Added email-admin-css.css For WP-Email Admin CSS Styles |
| 193 |
* NEW: Uses wp_register_style(), wp_print_styles(), plugins_url() And site_url() |
| 194 |
* NEW: Better Translation Using __ngetext() by Anna Ozeritskaya |
| 195 |
* NEW: Right To Left Language Support by Kambiz R. Khojasteh |
| 196 |
* NEW: Called email_textdomain() In create_email_table() by Kambiz R. Khojasteh |
| 197 |
* NEW: Added "email-css-rtl.css" by Kambiz R. Khojasteh |
| 198 |
* NEW: E-mail Form Is More CSS Friendly by Kambiz R. Khojasteh |
| 199 |
* NEW: Use language_attributes() To Get Attributes Of HTML Tag For Popup Window by Kambiz R. Khojasteh |
| 200 |
* NEW: Popup Window Is Now Auto Sized And Centralized by Kambiz R. Khojasteh |
| 201 |
* NEW: Page Title Is Now "Post Title -> Email" Instead Of "Email -> Post Title" by Kambiz R. Khojasteh |
| 202 |
* FIXED: remove_filter('the_content', 'email_form', ''); By TripleM |
| 203 |
* FIXED: Missing Display Of Friend's Invalid Email Address In Javascript Alert Box |
| 204 |
|
| 205 |
= 2.31 = |
| 206 |
* NEW: Works For WordPress 2.6 |
| 207 |
* FIXED: MYSQL Charset Issue Should Be Solved |
| 208 |
|
| 209 |
= 2.30 = |
| 210 |
* NEW: Works For WordPress 2.5 Only |
| 211 |
* NEW: WP-Email Will Load 'email.php' Inside Your Theme Directory If It Exists. This Will Allow Some Flexibility Instead Of Using 'page.php' As The Default Template. |
| 212 |
* NEW: WP-Email Will Load 'email-css.css' Inside Your Theme Directory If It Exists. If Not, It Will Just Load The Default 'email-css.css' By WP-Email |
| 213 |
* NEW: Changed CSS Style For Input Field From 'Forms' To 'TextField' And For Buttons From 'Buttons' To 'Button' |
| 214 |
* NEW: Renamed email-js.php To email-js.js and Move The Dynamic Javascript Variables To The PHP Pages |
| 215 |
* NEW: Uses email-js-packed.js |
| 216 |
* NEW: Uses /wp-email/ Folder Instead Of /email/ |
| 217 |
* NEW: Uses wp-email.php Instead Of email.php |
| 218 |
* NEW: Uses wp-email-widget.php Instead Of email-widget.php |
| 219 |
* NEW: Changed wp-email.php To email-standalone.php |
| 220 |
* NEW: Changed wp-email-popup.php To email-popup.php |
| 221 |
* NEW: Use number_format_i18n() Instead |
| 222 |
* NEW: Show 'Remarks' In 'WP-Admin -> E-Mail -> E-Mail Logs' Page By Default. See Usage Tab On How To Hide It. |
| 223 |
|
| 224 |
= 2.20 = |
| 225 |
* NEW: Works For WordPress 2.3 Only |
| 226 |
* NEW: Removed PHPMailer Files From The Zip As It Is Included In WordPress |
| 227 |
* NEW: Ability To Embed [email_link] Into Excerpt |
| 228 |
* NEW: AJAX Used To Email The Post/Page |
| 229 |
* NEW: Most Emailed Widget Added |
| 230 |
* NEW: Ability To Uninstall WP-EMail |
| 231 |
* NEW: Uses WP-Stats Filter To Add Stats Into WP-Stats Page |
| 232 |
* FIXED: Displaying Friend's E-Mail Field Is Compulsory To Prevent Error |
| 233 |
* FIXED: Method Of Storing SMTP Information Updated |
| 234 |
* FIXED: If There Is No Trailing Slash In Your Permalink, WP-Email Will Add It For You |
| 235 |
* FIXED: Use @session_start() Instead To Compress Session Already Started Error |
| 236 |
|
| 237 |
= 2.11 = |
| 238 |
* NEW: Added Template For Page Title And Page Subtitle In 'WP-Admin -> E-Mail -> E-Mail Options' |
| 239 |
* NEW: Putting [email_link] In Your Post/Page Content Will Display A Link To The E-Mail Post/Page |
| 240 |
* FIXED: Suppress gethostbyaddr() Error |
| 241 |
* FIXED: Duplicate Page Title When Listing Pages With wp_list_pages() |
| 242 |
* FIXED: If page.php Is Not Found, single.php or index.php Will Be Used |
| 243 |
* FIXED: Wrong URL For Page Under Most E-Mailed Posts Listing |
| 244 |
* FIXED: Wrong URL If Front Page Is A Static Page |
| 245 |
* FIXED: Fixed A Minor Grammer Mistake For Remark (Singular) |
| 246 |
* FIXED: Some Text Not Translated |
| 247 |
|
| 248 |
= 2.10 = |
| 249 |
* NEW: Works For WordPress 2.1 Only |
| 250 |
* NEW: Added Fam Fam Fam's E-Mail Icon |
| 251 |
* NEW: Localize WP-EMail |
| 252 |
* NEW: Ability To Configure The Text For E-Mail Links Via 'WP-Admin -> E-Mail -> E-Mail Options' |
| 253 |
* NEW: Ability To Set E-Mail Link Type (Standalone Page Or Popup Page) Via 'WP-Admin -> E-Mail -> E-Mail Options' |
| 254 |
* NEW: The Text For E-Mail Links Can No Longer Be Pass To The Function email_link(), email_link_image(), email_popup() or email_popup_image(). |
| 255 |
* NEW: Ability To Select Which Field You Want To Display In The E-Mail Form |
| 256 |
* FIXED: Name Fields No Longer Check For Validity Due To Localization |
| 257 |
* FIXED: Special HTML Characters No Longer Get Converted Into Its Symbolic Form When Displaying In E-Mail -> E-Mail Options |
| 258 |
* FIXED: Extra ; When Displaying Error Message |
| 259 |
* FIXED: Removed 1 0 I O From The Image Verify To Avoid Confusion |
| 260 |
|
| 261 |
= 2.07 = |
| 262 |
* NEW: WP-EMail-Popup Now Have Nice Permalinks /emailpopup/ Or /emailpopuppage/ |
| 263 |
* NEW: Added rel="nofollow" To All Links Generated By WP-EMail |
| 264 |
* NEW: Added noindex, nofollow To Robots Meta Tag In wp-email-popup.php |
| 265 |
* NEW: Error Messages Will Now Be Displayed Together With The E-Mail Form |
| 266 |
* FIXED: PHP5 Compatibility Issue |
| 267 |
* FIXED: Image Verify Is Now Not Case Sensitive |
| 268 |
* FIXED: Error In Logging Due To Post ID Being Blank |
| 269 |
* FIXED: Form Input Data Will No Longer Be Lost After Encountering An Error |
| 270 |
* FIXED: WP-EMail-Popup Not Working With Other Nice Permalinks |
| 271 |
|
| 272 |
= 2.06 = |
| 273 |
* FIXED: Modified Get Most Emailed Post Function |
| 274 |
|
| 275 |
= 2.05 = |
| 276 |
* NEW: Spam Prevention - Image Verification |
| 277 |
* NEW: EMail Administration Panel And The Code That WP-EMail Generated Is XHTML 1.0 Transitional |
| 278 |
* NEW: Added <label> Tag For Form Fields |
| 279 |
* FIXED: Remarks Column Removed From E-Mail Logs Due To Privacy Issue |
| 280 |
* FIXED: Duplicate Subject/Name When Sent Using PHP |
| 281 |
* FIXED: Quotes Not Displaying When Sending In Plain Text |
| 282 |
|
| 283 |
= 2.04a = |
| 284 |
* FIXED: PHP Mail Not Working Properly (Thanks To Pablo) |
| 285 |
|
| 286 |
= 2.04 = |
| 287 |
* NEW: Ability To Sent To Multiple EMails (Config Via Admin Panel)l |
| 288 |
* NEW: Added wp-email-popup.php For Using WP-EMail In A Pop Up Windowl |
| 289 |
* NEW: Combined functions-wp-email.php With email.phpl |
| 290 |
* NEW: Moved wp-email.php/wp-email-popup.php To Plugin Folderl |
| 291 |
|
| 292 |
= 2.03 = |
| 293 |
* NEW: Improved On 'manage_email' Capabilities |
| 294 |
* NEW: Neater Structure |
| 295 |
* NEW: No More Install/Upgrade File, It Will Install/Upgrade When You Activate The Plugin |
| 296 |
* NEW: Added E-Mail Stats Function |
| 297 |
* NEW: Per Page Option In email-manager.php |
| 298 |
* NEW: Added Excerpt As A Template Variable |
| 299 |
* NEW: Added EMail Image With email_link_image() |
| 300 |
* FIXED: Now Paginate Have Sort Options |
| 301 |
* FIXED: Default Mailer Type Is Now PHP |
| 302 |
* FIXED: Charset Is Now UTF-8 |
| 303 |
* FIXED: Quotes Not Displaying |
| 304 |
|
| 305 |
= 2.02 = |
| 306 |
* NEW: Added 'manage_email' Capabilities To Administrator Roles |
| 307 |
* FIXED: Able To View Password Protected Blog |
| 308 |
|
| 309 |
= 2.01 = |
| 310 |
* NEW: Compatible With WordPress 2.0 Only |
| 311 |
* NEW: EMail A Snippet Of The Post Rather Than The Whole Post. Able To Specify The No. Of Words Before Cutting Off |
| 312 |
* NEW: Spam Prevention - Better Checking Of Names, EMail Addresses And Remarks |
| 313 |
* NEW: Spam Prevention - Able To Specify The No. Of Mins Before User Is Allowed To Send A 2nd Article |
| 314 |
* NEW: GPL License Added |
| 315 |
* NEW: Page Title Added To wp-email.php |
| 316 |
* NEW: Automated Permalink |
| 317 |
* FIXED: Date Not Showing Correctly In EMail Logs |
| 318 |
* FIXED: Friend's Name Is Displayed Instead Of Friend's EMail On The Results Page |
| 319 |
* UPDATE: Moved All The WP-EMail Functions To wp-includes/functions-wp-email.php |
| 320 |
|
| 321 |
= 2.00b = |
| 322 |
* FIXED: Error In Sending E-Mail With Pages |
| 323 |
|
| 324 |
= 2.00a = |
| 325 |
* FIXED: exit(); Missing in wp-email.php |
| 326 |
|
| 327 |
= 2.00 = |
| 328 |
* FIXED: Did Not Strip Slashes In Remarks Field |
| 329 |
* FIXED: All Of WordPress Permlink Styles Should Work Now |
| 330 |
* FIXED: Better Localization Support (80% Done, Will Leave It In The Mean Time) |
| 331 |
* NEW: EMail Administration Panel |
| 332 |
* NEW: EMail Templates Editable Online Via The Administration Panel |
| 333 |
* NEW: Change EMail Options Online Via The Administration Panel |
| 334 |
* NEW: Every EMail Sent Will Be Logged |
| 335 |
* NEW: Uses WordPress Default Query Instead Of Own |
| 336 |
* NEW: Uses Most Of The WordPress Functions To Get Data Instead Of Own |
| 337 |
* NEW: Able To EMail Page Also |
| 338 |
* NEW: If No Remarks Is Made, It Is Known As N/A |
| 339 |
|