vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Administrative and Maintenance Tools - Send HTML email via adminCP (https://vborg.vbsupport.ru/showthread.php?t=179394)

tokenyank 05-15-2008 10:00 PM

Send HTML email via adminCP
 
*** 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 :) ) 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)**

veenuisthebest 05-16-2008 01:33 AM

it works perfect !! :up: although the file edits are minor but still it would be amazing if such feature comes as a plugin with a WYSIWYG editor interface and option for storing newsletters in database and even display them on a separate page for public viewing.

I wonder, why vB doesn't has it ??

tokenyank 05-16-2008 05:13 AM

There are things like Commbull (is this still being developed?) and GAZ for very robust newsletter handling...

What this does is literally for those of us who just need to send HTML via the adminCP.

But, I do agree that with the size of some vB communities and the knowledge that most sites send out a newsletter of some description that there hasn't been some sort of addon to facilitate this from vB. Seems like missed market share as anyone who desperately needs a newsletter solution has to spend several hundred dollars to use Sendstudio or Oempro.

Oh well, in the mean time, I'm here! ;)

Trana 05-16-2008 07:52 AM

Any chance of this using no file edits in the future?

tokenyank 05-16-2008 09:55 AM

Quote:

Originally Posted by Trana (Post 1521371)
Any chance of this using no file edits in the future?

Quote:

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...
So, erm... No, not from me and I think it hasn't been done already is because the required hooks aren't where they need to be for this to be made into a plugin.

myown 05-21-2008 05:00 AM

tagged ...

urdu 05-24-2008 01:10 PM

thanks

Dragon Company 05-24-2008 01:16 PM

Thanks a lot :)

uberjon 06-10-2008 10:51 PM

Quote:

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.
came from IPB too. yea i was wondering to myself (searched here to check) "does it auto parse html?" the help file makes no mention of it!

great feature stock or aftermarket. well needed. *installed*

goranbaxy 07-01-2008 11:49 AM

on evry VB update I have to do this edits agan :(


All times are GMT. The time now is 10:02 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01160 seconds
  • Memory Usage 1,739KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete