Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Auto Redirect: a solution for [Email Users] problems Details »»
Auto Redirect: a solution for [Email Users] problems
Version: 1.00, by Private Private is offline
Developer Last Online: Aug 2007 Show Printable Version Email this Page

Version: 2.3.x Rating:
Released: 09-25-2003 Last Update: Never Installs: 0
 
No support by the author.

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

Show Your Support

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

Comments
  #12  
Old 03-23-2005, 03:29 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

vb3 Hack for this: https://vborg.vbsupport.ru/showthrea...=redirect+mail
Reply With Quote
Reply


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 02:31 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.03719 seconds
  • Memory Usage 2,214KB
  • Queries Executed 16 (?)
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_php
  • (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
  • (1)pagenav_pagelink
  • (2)post_thanks_box
  • (2)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit_info
  • (1)postbit
  • (2)postbit_onlinestatus
  • (2)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