Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons

Reply
 
Thread Tools
Send HTML emails from adminCP Details »»
Send HTML emails from adminCP
Version: 1.00, by tokenyank tokenyank is offline
Developer Last Online: Nov 2012 Show Printable Version Email this Page

Version: 3.5.7 Rating:
Released: 11-01-2005 Last Update: 11-24-2006 Installs: 152
Code Changes  
No support by the author.

***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);
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;
}
Special thanks goes to non vB users Darryn, Pink, DO, and Dang for the helping me with syntax and pointing me in the right direction to get this done.

(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

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #82  
Old 10-30-2006, 04:56 PM
JulianWolf JulianWolf is offline
 
Join Date: Apr 2006
Posts: 58
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If somebody could combine this with a "Subscribe whole Forum"-Thread, this is a great Newsletter-Tool.

Well, all parts are existing somewhere already. So just some kind of "wishlist":
  • Give users an Option called "HTML or plain-text-mails"
  • Make two Textareas, one for the plain text, one for the html, in the Backend.
  • Now the Newsletter-Funktionality is easy. User can choice between HTML, Plain Text or "no eMails". For sending a Newsletter you can just write the plain-text in the one, the HTML in the other Box and each user get?s the one he wants to have.
  • Next point: Inster "alternate" eMail-Texts. So notifier-Mails for new PMs, for new posts and so on are also sent in HTML, if the user wants to.
  • Built up an "subscribe to forum"-Funktion. I?m using vBa with one forum-thread for the news on the start-page. When a User can subscribe the forum (one mail for every first post of a new thread in a forum ore a weekly overview over the first post of all new threads) then there is a great interactive Newsletter-function.
This would be a great Newsletter-Hack with lots of good ways in it. The newsletter can work automatically (subscribe new threads of news-forum), choisable in HTML or plain-text, it can be choisen by the user if he wants it instant or weekly (or monthly?), the save subscribe- and unsubscribe-links are built-in in vBulletin already an extra-newsletter can be sent manualy with the backend, users can sign-off easily in the backend ... what do you think?

Two nice add-ons:
  • Get the variables "new PMs", "new threads", "new pagers", "profile-views" and so on into this eMail. So a user sees in each eMail, how many PMs he has and so on. We could also put it "new users" or "new member-fotos" and so on, to get all of the users more and more in action.
  • A backend-advertisement-control. Let?s say we put in an $advertisement in the mail-templates, then in the admincp can be managed with usergroups and other queries (reputation, genter, ZIP-Code and so on) which one of different predifined advertisements are put into each eMail, text or HTML. So all "active" users can get an advertisement for a paied VIP-Account, all inactive users can be invited to get more active, all new users can get some hints for special funktions/hacks in the forums and so on.
For this all, working fine, I would immediate donate 150$ for the programmer. Somebody else also?

Best wishes, Julian!
Reply With Quote
  #83  
Old 10-30-2006, 05:03 PM
grandeur_69 grandeur_69 is offline
 
Join Date: Feb 2003
Location: Kelowna, BC, Canada
Posts: 166
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

search for commbull ... you'll find what you are looking for and then some.
Reply With Quote
  #84  
Old 11-04-2006, 10:17 PM
farukcan's Avatar
farukcan farukcan is offline
 
Join Date: Oct 2006
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this hack run a wtih 3.6.x???
Reply With Quote
  #85  
Old 11-06-2006, 09:11 PM
grandeur_69 grandeur_69 is offline
 
Join Date: Feb 2003
Location: Kelowna, BC, Canada
Posts: 166
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

no, but the commercial one does.
Reply With Quote
  #86  
Old 11-08-2006, 05:26 PM
Steve Kish Steve Kish is offline
 
Join Date: Nov 2006
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great job - works! Is there anyway to make all post notification emails HTML as well?
Reply With Quote
  #87  
Old 11-25-2006, 03:50 PM
Shazz's Avatar
Shazz Shazz is offline
 
Join Date: Jun 2006
Location: Utah
Posts: 4,758
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

/me testing installed
Reply With Quote
  #88  
Old 11-28-2006, 10:15 AM
criscokid criscokid is offline
 
Join Date: Nov 2003
Location: London, UK
Posts: 380
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SnitchSeeker View Post
Are there rules we are supposed to follow on how to write the mails? Only certain tags supported? I entered HTML as though it was a web-page (with <head> and <body> and everything)!
Have a read of this HTML email design document - especially the section titled 'Testing & Troubleshooting Your Email Designs'.
Reply With Quote
  #89  
Old 11-28-2006, 10:19 AM
criscokid criscokid is offline
 
Join Date: Nov 2003
Location: London, UK
Posts: 380
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Am I right in assuming this mod doesn't send email using the Multipart/Alternative MIME format? - there's no facility to include a plain-text alternative version of the email.

More on this format:
"You need to send HTML email from your server in “Multipart-Alternative MIME format.” Basically, that means your mail transfer agent bundles your HTML code, PLUS a plain-text version of the message, together into one email. That way, if a recipient can’t view your beautiful HTML email, the good-oldfashioned plain-text version of your message is auto-magically displayed. It’s kind of a nerdy gobbledy-geek thing, which is why a lot of people mess things up when they try to send HTML email themselves. You either need to program a script to send email in multipart/alternative MIME format, or just use an outside vendor to deliver things for you."
Reply With Quote
  #90  
Old 01-08-2007, 04:01 PM
ThunderWolf ThunderWolf is offline
 
Join Date: Feb 2006
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you soooooooooooo much, I was lokking for it for along time.
I tried it on ver. 3.6.2 and worked very well.
For those who can't find the code :
PHP Code:
construct_hidden_code('test'$vbulletin->GPC['test']); 
try to find it by yourself ((DO NOT USE FIND OR SEARCH))
Regards,
ThunderWolf
Reply With Quote
  #91  
Old 01-09-2007, 04:42 PM
AFemaleProdigy's Avatar
AFemaleProdigy AFemaleProdigy is offline
 
Join Date: Mar 2006
Location: Murrells Inlet, SC
Posts: 216
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just wanted to let you know that I have installed this on VB 3.6.4 and it works great. Really easy to install and use! Thanks so much!
Reply With Quote
Reply

Thread Tools

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

Forum Jump


All times are GMT. The time now is 06:27 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07330 seconds
  • Memory Usage 2,314KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (6)bbcode_code
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete