Welcome to Egypt Forums Mark forums read | Egypt Main Page
Egypt Forums
Arabic Movies



Mods for 3.7.x vBulletin Mods for 3.7, vBulletin hacks, vBulletin modification, vBulletin 3.7

Mods for 3.7.x Thread, Send HTML email via adminCP in Mods; *** This is the same hack in the 3.5.x and 3.6.x sections, just thought I'd add it here too to ...

Short Link: http://forum.egypt.com/enforum/showthread.php?t=3713


Reply
LinkBack Thread Tools Display Modes
Send HTML email via adminCP
 
 
The God Father
Developer's Avatar

Reply With Quote
 
Join Date: Jul 2008
Location: NDC
Posts: 5,425
22-09-2008, 04:04 AM
 
*** This is the same hack in the 3.5.x and 3.6.x sections, just thought I'd add it here too to keep continuity and to allow easier searching should someone need this functionality ***

Well, this was asked for by many people (me included Egypt.Com EnForum ) without ever being done so things are never done for those who want but not prepared to do for themselves! Thus, a hack is borne!

This hack does what it says on the label. Having come from IPB to vB, I was surprised to see that a default "Send HTML email" from the adminCP was lacking as I used it in my IPB board for newsletters and such. This hack adds the ability to use the default email template that sends plaintext emails or, but toggling the radiobutton, will send HTML mime emails.


Unfortanatly, I am not familiar enough with vB's hooks/plugins so it is done with 2 file edits but I'm sure that it could be done with a plugin if someone ever feels the need...


Step 1:
In admincp/email.php find:

Code:
print_textarea_row($vbphrase['message_email'], 'message', '', 10, 50);
Directly below it place:
Code:
print_yes_no_row('Send HTML Email?', 'sendhtml', 0);
Step 2:
In admincp/email.php find:

Code:
construct_hidden_code('test', $vbulletin->GPC['test']);
Directly below it place:
Code:
construct_hidden_code('sendhtml', $_POST['sendhtml']);
Step 3:
In includes/class_mail.php find:
Code:
$headers .= 'Content-Type: text/plain' . iif($encoding, "; charset=\"$encoding\"") . $delimiter;
and replace with:
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;
}

(you may modify this hack at will... No permission needs to be granted)

**Tested and works for vB versions 3.5.0 to present (3.7)**
Attached Files
File Type: txt instructions.txt (1.0 KB, 10 views)
__________________
I Love Walking In The Rain Cuz Nobody Know I'm Crying !!
 
 
 
Reply

Mods for 3.7.x Thread, Send HTML email via adminCP in Mods; *** This is the same hack in the 3.5.x and 3.6.x sections, just thought I'd add it here too to ...

Short Link: http://forum.egypt.com/enforum/showthread.php?t=3713


Bookmarks

Tags
admincp, email, html, send


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Oracle Procedures Send Email Tutorial Developer Articles 0 04-12-2008 02:06 AM
Lesson : HTML Linking to E-Mail in HTML Tutorial Developer Articles 0 17-10-2008 09:14 PM
dark_vb admincp style Developer Styles for 3.7.x 0 15-10-2008 10:45 PM
Social Group Email Developer Mods for 3.7.x 0 14-09-2008 10:08 PM
How to add WYSIWYG editor in admincp Developer Articles 0 27-08-2008 08:48 PM