The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Send HTML emails from adminCP Details »» | |||||||||||||||||||||||||
***3.6.x version of hack here***
Well, this was asked for by many people (me included ) without ever being done so I recruited some of my more knowledgable friends in php to get the syntax right for the following hack. 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); Code:
print_yes_no_row('Send HTML Email?', 'sendhtml', 0); In admincp/email.php find: Code:
construct_hidden_code('test', $vbulletin->GPC['test']); Code:
construct_hidden_code('sendhtml', $_POST['sendhtml']); In includes/class_mail.php find: Code:
$headers .= 'Content-Type: text/plain' . iif($encoding, "; charset=\"$encoding\"") . $delimiter; 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) EDIT: Just installed on 3.5.1 and still works with no problem... Just changing the vB version EDIT2: Just installed on 3.5.2 and still works with no problem... Just changing the vB version EDIT3: Just installed on 3.5.3 and still works with no problem... Just changing the vB version EDIT4: Works for 3.5.4 Show Your Support
|
Comments |
#2
|
|||
|
|||
Thanks, I really needed this :up:
[high]* RS_Jelle clicks install [/high] |
#3
|
||||
|
||||
Thats wicked. Do you know of a guide to writing HTML e-mails I can reference?
|
#4
|
||||
|
||||
This is great. Can anyone turn this into a plugin please?
|
#5
|
||||
|
||||
thank you very very much
|
#6
|
|||
|
|||
Installed, thanks been looking for this for ages - well done.....
|
#7
|
|||
|
|||
More "vBulletin style" coded (hardened security by using $vbulletin->GPC) version of the same modification
In admincp/email.php find (line 62): Code:
'message' => TYPE_STR, Code:
'sendhtml' => TYPE_BOOL, Find (line 253): Code:
construct_hidden_code('perpage', $vbulletin->GPC['perpage']); Code:
construct_hidden_code('sendhtml', $vbulletin->GPC['sendhtml']); Find (line 286) Code:
print_textarea_row($vbphrase['message_email'], 'message', '', 10, 50); Code:
print_yes_no_row('Send HTML Email?', 'sendhtml', 0); In includes/class_mail.php find (line 249): Code:
$headers .= 'Content-Type: text/plain' . iif($encoding, "; charset=\"$encoding\"") . $delimiter; Code:
if ($vbulletin->GPC['sendhtml']) { $headers .= 'Content-Type: text/html' . iif($encoding, "; charset=\"$encoding\"") . $delimiter; } else { $headers .= 'Content-Type: text/plain' . iif($encoding, "; charset=\"$encoding\"") . $delimiter; } |
#8
|
||||
|
||||
I had lots of problems with this hack so I had to uninstall. When I post new threads on my board I had problems. I would get errors. If I posted an image in the thread I would good an error coming from the includes/class_mail on line 249.
And even if post a regular post, I my page would get stuck. The posts would still go on put I would get these errors. |
#9
|
|||
|
|||
You must have had a typo or missed out a character or something in the install as I've been running it since I posted the code here and haven't had a problem at all...
I do have to say that I'm confused to why you'd get errors in class_mail if you post an image! Try from fresh files and make sure you don't delete a ; or ' accidentally... (this assumes you tried mine and not OsMoSiS.it's code edit as I have no idea what he did and the possible ramifications of a typo! ) |
#10
|
|||
|
|||
Quote:
Thanks for greate hack. Installed. I need it for long time. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|