vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Auto Redirect: a solution for [Email Users] problems (https://vborg.vbsupport.ru/showthread.php?t=57408)

Private 09-25-2003 10:00 PM

Auto Redirect: a solution for [Email Users] problems
 
If you ever had problems when sending an email to more than 200 users at once or if you got the silly error message: Problem Report (Timeout), this hack is made for you !


Purpose:

When you send a large number of emails at once (100-1000, depends on your server) using Email Users feature in the admin control panel, you propably get a timeout error message and that's because a certain time limit has ended while the emails are in the sending process.

A solution is to decrease the number of emails bieng sent at once, but this will force you to click the submit button in order to proceed to the next page, and this is difficult because you'll have a large number of pages.

e.g. if you have 10000 users in your forums, and you choose to send 100 messages at once, you'll have 100 pages, when every page finished loading, you must click (Do Next Page) button to proceed to next page!

Well, (Auto Redirect) hack will click the submit button in behalf of you :), using a small Java Script code, the emailing process will continue automatically, sending batch after batch until you email all users of your forum.


Installation:

PLEASE make a backup of email.php, all changes are made in this file.
For your safety, always make a backup of your files before hacking it!

Open up email.php that is located in the Admin directory, and change the following:

1: find:
PHP Code:

makehiddencode("test",$test); 

and right under this line, write:
PHP Code:

makehiddencode("redirect",$redirect); 

2: couple of lines below, you'll find:
PHP Code:

doformfooter("Do Next Page (page $page)",0); 

On the line below it, place:
PHP Code:

// automatic redirect
if ($redirect) {
  echo 
'
  <script language="javascript">
  myvar = "";
  timeout = 15;
  function dorefresh() {
    window.status="Redirecting"+myvar;
    myvar = myvar + " .";
    timerID = setTimeout("dorefresh();", 100);
    if (timeout > 0) {
      timeout -= 1;
    }
    else {
      clearTimeout(timerID);
      window.status="";
      document.name.submit();
    }
  }
  dorefresh();
  </script>'
;
}
// automatic redirect 

3: finally, find:
PHP Code:

makeinputcode("Messages to send at once:","perpage","500"); 

and place the following code below it:
PHP Code:

makeyesnocode("Auto redirect to next page?","redirect"); 


ENJOY!


Hack Summary:

- Author: Private (privateman@flashmail.com)
- Tested on: all versions of vb 2.2.x and 2.3.x
- Support: post your questions in this thread only
- effects: 1 file effected (email.php)
- I strongly encourage vBulletin team to include this hack in VB3

MrNase 09-26-2003 12:10 PM

ah please not yellow! Any color but not yellow ;)

There are a few guys who use the purple style and those can't read what you've written :)


And:
>> Tested on: all versions of vb from 2.2.x to 2.3.0

what about 2.3.2 ?

FleaBag 09-26-2003 07:05 PM

Excellent idea for a hack - just what I need as I often have to send e-mails to users twice due to time-outs.

Cheers for the good work mate!

Private 09-26-2003 09:22 PM

It works perfectly on vb 2.3.1 and 2.3.2

* I edited the thread and changed (tested on) line to:
Quote:

Tested on: all versions of vb 2.2.x and 2.3.x
** no more yellow :)

psico 09-27-2003 05:22 AM

This hack already exist:
https://vborg.vbsupport.ru/showthrea...ht=Email+Users

Anyway, good work dude!

Private 09-27-2003 08:13 AM

psico

however, I did it myself, I think it's more integrated than the old one, and you can even use it or not depending on your choice.

thanx

Cold Steel 04-30-2004 12:25 PM

Can someone port this to vB3?

Raptor 07-02-2004 01:34 AM

any hack for this in vb3 ?

MentaL 02-23-2005 08:55 PM

yes need for vb3 :(

Raptor 03-23-2005 02:59 PM

surely there is a vb3 hack for this

i have absolutley no idea what the use of clicking next page is - when i have 114,000 emails to send out


All times are GMT. The time now is 04:22 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.01091 seconds
  • Memory Usage 1,747KB
  • 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_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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