vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Send HTML email via admincp (https://vborg.vbsupport.ru/showthread.php?t=72105)

Dean C 11-22-2004 10:00 PM

Send HTML email via admincp
 
[Send HTML email via admincp]

Information
  • [high]vBulletin Version:[/high] 3.0.3

  • [high]Author:[/high] Dean Clatworthy

  • [high]Copyright:[/high] You may use this modification at your own risk. I cannot and will not be held responsible for any damage you may cause to your forums during installation or thereafter. You may not distribute this modification in whole or parts and anyone found doing so faces risk of prosecution. All my modifications are released at vBulletin.org and anyone found releasing them elsewhere also faces risk of prosecution. You may not translate this modification without my prior permission.

  • [high]Donations:[/high] I release my modifications for free. If you wish to donate please contact me via PM and I will give you my details. All donations are graciously appreciated.

  • [high]Credits:[/high] I would like to thank the following people who contributed to the making of this modification.
    • Breaker - for bugging me on IRC how to do it.

What does this modification do?
This modification allows you to send optional HTML email in your newsletter when mass emailing users from your AdminCP

Installation

1/

In admincp/email.php find:

PHP Code:

vbmail($user['email'], $_POST['subject'], $sendmessagetrue$_POST['from']); 

Replace it with:
PHP Code:

if($_POST['sendhtml'])
{
        
vbmail($user['email'], $_POST['subject'], $sendmessagetrue$_POST['from'], ''''true);
}
else
{
        
vbmail($user['email'], $_POST['subject'], $sendmessagetrue$_POST['from']);


2/

In admincp/email.php find:

PHP Code:

print_textarea_row($vbphrase['message_email'], 'message'''1050); 

Directly below it place:
PHP Code:

print_yes_no_row('Send HTML Email?''sendhtml'0); 

3/

In admincp/email.php find:

PHP Code:

construct_hidden_code('test'$_POST['test']); 

Directly below it place:
PHP Code:

construct_hidden_code('sendhtml'$_POST['sendhtml']); 

4/

In includes/functions.php find:

PHP Code:

function vbmail($toemail$subject$message$notsubscription false$from '' $uheaders ''$username ''

Replace it with:
PHP Code:

function vbmail($toemail$subject$message$notsubscription false$from '' $uheaders ''$username ''$html false

5/

In includes/functions.php find:

PHP Code:

$headers .= 'Content-Type: text/plain' iif($encoding"; charset=\"$encoding\"") . $delimiter

Replace it with:
PHP Code:

$usehtml iif($html'html''plain');
$headers .= 'Content-Type: text/' $usehtml iif($encoding"; charset=\"$encoding\"") . $delimiter

Please Click Install!
If you installed this modifcation please click the install button. It'll help you keep up to date with future releases and important bugfixes, security updates.

Dan 11-23-2004 07:58 PM

Awsome Hack Dean :D thanks!

Chris M 11-23-2004 08:02 PM

Nice - Adding to my "to install" list :)

Satan

Royal 11-23-2004 08:03 PM

Cool addon Dean :)

[high]* Royal clicks install[/high]

Breaker 11-23-2004 09:29 PM

thanks for this one Dean, helped me alot especially when you told me how to get it so normal emails woldn't be effected :)

[high]* Breaker installed it first :)[/high]

pirrup 11-24-2004 05:31 AM

tnx for sharing
/me clicks install

Floris 11-24-2004 11:00 AM

Can members select to receive plain or html emails?

GamerzWorld 11-24-2004 11:31 AM

Any screenes of what it looks like in admincp?

FleaBag 11-24-2004 01:25 PM

Been wanting this one for a while, I could do it in vB2 with a little CSS, didn't seem to want to work in vB3. Thanks again!

razor69 11-24-2004 02:18 PM

What am I missing? I did the install, and there is no where to include the message in admincp now? What am I doing wrong?

HiDeo 11-24-2004 02:32 PM

Nice job thanks !

Breaker 11-24-2004 02:50 PM

i tihnk step 2 is wrong....not sure though. Dean, did you actually test it with the yes/no boxes?

Dean C 11-24-2004 03:11 PM

Quote:

Originally Posted by floris
Can members select to receive plain or html emails?

Nope :)

Dean C 11-24-2004 03:14 PM

Quote:

Originally Posted by GamerzWorld
Any screenes of what it looks like in admincp?

Screenshot now attached to first post, nothing much to see though :)

Dean C 11-24-2004 03:15 PM

Quote:

Originally Posted by razor69
What am I missing? I did the install, and there is no where to include the message in admincp now? What am I doing wrong?

Fixed. Minor typo in the instructions. Please re-apply step 2 again.

deathemperor 11-25-2004 05:53 AM

exactly what I wanted to ask, thanks

but I do need a txt instruction...

Princeton 11-25-2004 12:27 PM

Excellent and usable hack!!

Thanks for sharing. Clicks install. :)

PS. Why is the text so small on first post? It's hard to read at 1600 resolution. :(

Breaker 11-25-2004 02:59 PM

Quote:

Originally Posted by Dean C
Fixed. Minor typo in the instructions. Please re-apply step 2 again.

thought that was the issue myself, but i didn't want to say it directly. I did say there was a problem with step 2 though :P

Dean C 11-25-2004 03:22 PM

Quote:

Originally Posted by princeton
PS. Why is the text so small on first post? It's hard to read at 1600 resolution. :(

I like 10px font :)

mcyates 11-27-2004 10:09 AM

PROBLEM!!!!!

My forum is set to send 500 emails at a time, it works fine for the first 500 emails as i'm the admin and i got it in HTML. When it starts the 500 > 700 members (i have 700 members) it sends it in normat text and not html as i have a second account which it sent it to and it was all messed up html code.

Dean C 11-27-2004 10:32 AM

Quote:

Originally Posted by mcyates
PROBLEM!!!!!

My forum is set to send 500 emails at a time, it works fine for the first 500 emails as i'm the admin and i got it in HTML. When it starts the 500 > 700 members (i have 700 members) it sends it in normat text and not html as i have a second account which it sent it to and it was all messed up html code.

Ah of course, I've added a new step. Please apply step 3 and all should work fine now :)

mcyates 11-27-2004 10:42 AM

Quote:

Originally Posted by Dean C
Ah of course, I've added a new step. Please apply step 3 and all should work fine now :)

ok thank you very much.

Dean C 11-27-2004 11:03 AM

Quote:

Originally Posted by mcyates
ok thank you very much.

You're welcome - let me know if you get any other problems :)

Cornolio 12-05-2004 01:18 PM

i get this error

Code:

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /web/htdocs/www.discutere.it/home/includes/functions.php on line 1888
:confused:

Dean C 12-05-2004 01:44 PM

Then you applied the modification wrong. Go back and reapply it :)

cinq 12-05-2004 02:11 PM

Fantastic, I was just asking over at vb.com on how I could send out nicely HTML Formatted emails to my members, could be great as a newsletter thingy.

Thanks a million Dean ! :D

Cornolio 12-05-2004 02:46 PM

Quote:

Originally Posted by Dean C
Then you applied the modification wrong. Go back and reapply it :)

i've already reapplyied twice :cry:
i'm going to reapply another time but... it doesn't have conflicts with vbchat, right?

Dean C 12-05-2004 03:25 PM

I can't see why it would Cornholio. Are you using dreamweaver to apply the modification? DW screws up formatting a lot and it could be that perhaps?

Cornolio 12-05-2004 03:50 PM

yes, i was using dw... i've just modified the files with wordpad and it worked :D

thanks :D

Dean C 12-05-2004 03:55 PM

Glad you got it working ;)

paulyy 12-06-2004 08:35 PM

Nice!!

[high]* paulyy clicks install
[/high]

By the way, for future reference DreamWeaver tends to screw up this line;

HTML Code:

$debughtml .= " (<a href=\"" . htmlspecialchars_uni(SCRIPTPATH) . iif(strpos(SCRIPTPATH, '?') === false, '?', '&amp;') . "tempusage=1\">Template Usage</a>) (<a href=\"" .

mtha 12-08-2004 06:07 PM

:( hmm, somehow I didnt get this to work.

I applied this hack, and go to AdminCP

If I send email as plain text, it go though
If I send email as html, I dont get the email. (it said mail sent successfully in ACP)

Do you have any idea why I cant receive html email?

Dean C 12-09-2004 05:52 PM

Quote:

Originally Posted by mtha
:( hmm, somehow I didnt get this to work.

I applied this hack, and go to AdminCP

If I send email as plain text, it go though
If I send email as html, I dont get the email. (it said mail sent successfully in ACP)

Do you have any idea why I cant receive html email?

Do any of your members get the HTML email?

mtha 12-10-2004 01:01 AM

Quote:

Originally Posted by Dean C
Do you have any idea why I cant receive html email?

I sent one test html email to myself, didnt send to others :)

maybe I should do some more tests, (at later time)

primesuspect 12-14-2004 01:57 AM

Thanks for this hack! I appreciate it!

deathemperor 12-29-2004 03:10 AM

Quote:

Originally Posted by deathemperor

but I do need a txt instruction...

why not ?

Dean C 01-03-2005 10:54 AM

The modification is here if you want it. I'm not creating txt files for private reasons :)

SnowBot 01-03-2005 12:09 PM

Great little hach Dean :)

[high]* SnowBot clicks install
[/high]

I have abit of catching up to do with hacks as been away for afew weeks :)

wolfgang2 01-18-2005 01:52 PM

Quote:

Originally Posted by SnowBot
Great little hach Dean :)

[high]* SnowBot clicks install
[/high]

I have abit of catching up to do with hacks as been away for afew weeks :)

is it working with vB 3.0.5?
if yes i click install....

Dean C 01-20-2005 08:49 PM

It should do, give it a try :)


All times are GMT. The time now is 10:53 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.01339 seconds
  • Memory Usage 1,844KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_html_printable
  • (10)bbcode_php_printable
  • (13)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
  • (40)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