Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases

Reply
 
Thread Tools
Automatic "Send Email" redirect Details »»
Automatic "Send Email" redirect
Version: 1.5.0, by Revan Revan is offline
Developer Last Online: Jun 2014 Show Printable Version Email this Page

Version: 3.0.7 Rating:
Released: 03-21-2005 Last Update: 03-29-2005 Installs: 11
DB Changes
 
No support by the author.

Do you run a large forum, and need to send emails to all your users? Do you have to set the email per batch to a low number because of PHP limitations? And most importantly; would you have liked to see the emails work their magic while you go attend other duties?
If your answer to the aboves is yes, then this hack is for you!

What this hack does, is cache the email you are trying to send in a temporary SQL table, then instead of having a form with hidden fields and forcing you to hit submit, it reads this table at reload.
After the mail is sent, the table is emptied.

Thanks goes to DeMiNe0 for telling me to make this, and for helping me test it



Files modified: 1
DB Tables added: 1
Difficulty: Easy

Show Your Support

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

Comments
  #2  
Old 03-22-2005, 10:54 AM
nexialys
Guest
 
Posts: n/a
Default

good thing Revan, but there is a missing Replace, line WHEN searching FOR if (!$_POST['test'])... line 177 and on...

we replace it with what here?!
Reply With Quote
  #3  
Old 03-22-2005, 12:54 PM
Revan's Avatar
Revan Revan is offline
 
Join Date: Jan 2004
Location: Norway
Posts: 1,671
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Fix'd.
Cheers
Reply With Quote
  #4  
Old 03-24-2005, 12:42 PM
oztrack oztrack is offline
 
Join Date: Feb 2005
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I did all the changes to the php file

But I am a newby and dont know what exactly is meant by this. I ran the qery but i dont know what is meant by the final words in the text below. Remember to add a prefix if you use it. - What prefix.

I ran the query - but it said it changed 0 rows .

Help!!

Run this query:
_________________

CREATE TABLE `mailtemp` (
`test` tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
`message` mediumtext NOT NULL,
`subject` mediumtext NOT NULL,
`from` mediumtext NOT NULL,
`serializeduser` mediumtext NOT NULL
) TYPE=MyISAM;

Remember to add a prefix if you use it.
Reply With Quote
  #5  
Old 03-24-2005, 12:45 PM
Revan's Avatar
Revan Revan is offline
 
Join Date: Jan 2004
Location: Norway
Posts: 1,671
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well in your config.php, if you have the "$tableprefix" set to anything, that is what you needed to add.
And even if you do not have a prefix, you ran the query correctly, because it is not supposed to change any rows
As long as you don't get errors when sending a mail using this redirect, you did everything correctly
Reply With Quote
  #6  
Old 03-24-2005, 12:46 PM
oztrack oztrack is offline
 
Join Date: Feb 2005
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When i go to 'send email to users' now in the control panel - above the blue - i have the text over a white background saying

if ($_REQUEST['do'] == 'dosendmail' OR $_POST['do'] == 'makelist') { if (!$_GET['isredirect']) { $message = $_POST['message']; $perpage = $_POST['perpage']; $startat = $_POST['startat']; $subject = $_POST['subject']; $from = $_POST['from']; $serializeduser = $_POST['serializeduser']; } else { $perpage = $_GET['perpage']; $startat = $_GET['startat']; $mailtemp = $DB_site->query_first("SELECT * FROM `" . TABLE_PREFIX . "mailtemp`"); $message = $mailtemp['message']; $subject = $mailtemp['subject']; $from = $mailtemp['from']; $serializeduser = $mailtemp['serializeduser']; $test = $mailtemp['test']; } if (isset($serializeduser)) { $_POST['user'] = @unserialize($serializeduser);

Also
at the generate email list page i have the text

if ($_REQUEST['do'] == 'dosendmail' OR $_POST['do'] == 'makelist') { if (!$_GET['isredirect']) { $message = $_POST['message']; $perpage = $_POST['perpage']; $startat = $_POST['startat']; $subject = $_POST['subject']; $from = $_POST['from']; $serializeduser = $_POST['serializeduser']; } else { $perpage = $_GET['perpage']; $startat = $_GET['startat']; $mailtemp = $DB_site->query_first("SELECT * FROM `" . TABLE_PREFIX . "mailtemp`"); $message = $mailtemp['message']; $subject = $mailtemp['subject']; $from = $mailtemp['from']; $serializeduser = $mailtemp['serializeduser']; $test = $mailtemp['test']; } if (isset($serializeduser)) { $_POST['user'] = @unserialize($serializeduser);
Reply With Quote
  #7  
Old 03-24-2005, 12:49 PM
Revan's Avatar
Revan Revan is offline
 
Join Date: Jan 2004
Location: Norway
Posts: 1,671
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Are you sure you did the file changes correctly?
Because it seems to me like it echo's the entire script... :P
Reply With Quote
  #8  
Old 03-24-2005, 12:52 PM
oztrack oztrack is offline
 
Join Date: Feb 2005
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

My table prefix is not set to anything. I just checked config.php
Reply With Quote
  #9  
Old 03-24-2005, 12:54 PM
oztrack oztrack is offline
 
Join Date: Feb 2005
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I will reload the default page and do the changes again - tomorrow. Thanks
Reply With Quote
  #10  
Old 03-25-2005, 03:16 PM
Raptor Raptor is offline
 
Join Date: Nov 2001
Posts: 499
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i get an error on the first attempt at an auto re direct to next page - code has been applied 1:1 as per instructions

using vb 3.07 - query successfully executed and checked in phpmyadmin with no errors

Code:
Database error in vBulletin 3.0.7:

Invalid SQL: 
				INSERT INTO `mailtemp` 
					(`test`, `serializeduser`, `from`, `subject`, `message`)
				VALUES
					('0',
					'a:26:{s:8:"username";s:0:"";s:11:"usergroupid";a:13:{i:0;s:1:"4";i:1;s:2:"87";i:2;s:2:"89";i:3;s:2:"79";i:4;s:1:"6";i:5;s:2:"61";i:6;s:1:"5";i:7;s:2:"80";i:8;s:1:"2";i:9;s:2:"91";i:10;s:2:"84";i:11;s:1:"1";i:12;s:1:"3";}s:10:"adminemail";s:1:"1";s:5:"email";s:0:"";s:11:"parentemail";s:0:"";s:9:"coppauser";s:2:"-1";s:8:"homepage";s:0:"";s:3:"icq";s:0:"";s:3:"aim";s:0:"";s:5:"yahoo";s:0:"";s:3:"msn";s:0:"";s:9:"signature";s:0:"";s:9:"usertitle";s:0:"";s:13:"joindateafter";s:0:"";s:14:"joindatebefore";s:0:"";s:17:"lastactivityafter";s:0:"";s:18:"lastactivitybefore";s:0:"";s:13:"lastpostafter";s:0:"";s:14:"lastpostbefore";s:0:"";s:13:"birthdayafter";s:0:"";s:14:"birthdaybefore";s:0:"";s:10:"postslower";s:0:"";s:10:"postsupper";s:0:"";s:15:"reputationlower";s:0:"";s:15:"reputationupper";s:0:"";s:9:"ipaddress";s:0:"";}',
					'raptor@digital-forums.com',
					'topic of email',
					'email subject
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:24 PM.


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.07651 seconds
  • Memory Usage 2,286KB
  • Queries Executed 23 (?)
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
  • (1)bbcode_code
  • (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
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (10)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