Quantcast Add HTML option to vBulletin 3.x "Send Email to Users" admincp - digitalFAQ.com Support Forum
Go Back   digitalFAQ.com Support Forum > Digital Publishing / Web Design > Web/Print Publishing Technology

Reply
LinkBack Thread Tools
  #1  
04-28-2010, 08:29 AM
admin's Avatar
admin admin is offline
Site Staff / Media Project and Technical Adviser
 
Join Date: Oct 2003
Posts: 3,983
Thanks: 112
Thanked 417 Times in 363 Posts
Plain text has its place, but sometimes you need to send HTML email, because it's rich with images, code or links. Newsletters just look nicer when generated as HTML with a good font and layout, as opposed to a cruddy Courier or Times New Roman text-only version email.

For vBulletin 3.5, 3.6, 3.7 and 3.8, you can simply modify the files with some quick code changes, and it will add an HTML option to the "Send Email to Users" admin menu function.

This is all you have to do...

In forumURL/admincp/email.php find:
PHP Code:
print_textarea_row($vbphrase['message_email'], 'message'''1050); 
Add this directly under it:
PHP Code:
print_yes_no_row('Send HTML Email?''sendhtml'0); 
Again, in forumURL/admincp/email.php find:
PHP Code:
 construct_hidden_code('test'$vbulletin->GPC['test']); 
Add this directly under it:
PHP Code:
construct_hidden_code('sendhtml'$_POST['sendhtml']); 
In forumURL/includes/class_mail.php locate:
PHP Code:
$headers .= 'Content-Type: text/plain' iif($encoding"; charset=\"$encoding\"") . $delimiter
and replace with:
PHP Code:
if($_POST['sendhtml'])  {
  
$headers .= 'Content-Type: text/html' iif($encoding"; charset=\"$encoding\"") . $delimiter;
}else{
  
$headers .= 'Content-Type: text/plain' iif($encoding"; charset=\"$encoding\"") . $delimiter;

Note that forumURL is whatever the URL of your site is; i.e. www.mysite.com/forum/ or forum.mysite.com/

And then admincp should be named something else; i.e., adminpanel, and password-protected, for maximum admincp security. If you've renamed it, as you should have done after your installed and secured your vBulletin site, remember to keep this in mind when reading the above instructions.

Similar instructions are found at http://www.vbulletin.org/forum/showthread.php?t=137537

I made these changes through the cpanel/Plesk control panels, as this exact code is not accessible through the admincp's style manager. These are vBulletin core file changes, not style/theme changes.

Not plugin required. In fact, this code change works better than available plugins and mods!

Easy fix.
__________________
If this site has been as helpful as a book or magazine, then Donate a few Dollars or Upgrade your Membership.
Don't forget to Like Us on Facebook or Follow Us on Twitter for special news and deals. Thanks!
Reply With Quote


Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Fixing JVC DVD recorder "LOADING" / JVC will not recognize blank DVDs lordsmurf Home Entertainment and Videography 3 02-05-2012 12:04 AM
More Sears.com Black Friday sales now online! admin Video, TV - Coupons, Sales and Deals 0 11-05-2009 08:54 PM
"Spooky" blank DVD sale thru 10/28, memory cards, hard drive, more @ SMS admin Blank Media, Drives - Coupons, Sales and Deals 0 10-27-2009 06:19 AM
Third-Party/Generic/"Compatible" Camera Accessories admin Making the Shot 0 03-17-2009 03:04 AM
Acutal size with "record cropped video" ? jlietz Capture, Record, Transfer 3 03-03-2005 11:41 PM

Thread Tools



 
All times are GMT -5. The time now is 06:17 PM  —  vBulletin Copyright © 2011 Jelsoft Enterprises Ltd  —  SEO by vBSEO