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

Reply
 
Thread Tools
Limit Database Error Mails Details »»
Limit Database Error Mails
Version: 1.00, by Marco van Herwaarden Marco van Herwaarden is offline
Developer Last Online: Dec 2010 Show Printable Version Email this Page

Version: 3.5.0 Rating:
Released: 09-29-2005 Last Update: Never Installs: 31
Code Changes Additional Files  
No support by the author.

Hack: Limit Database Error Mails
Version: v1.00
Author: MarcoH64 for vBulletin.org
vB Version: 3.5.0
File edits: 1 + 1 (config.php)

Disclaimer:
This hack may not be modified or distributed without the explicit permission of the author. The author don't take responsibility for
any problems caused by this modification.

Description:
With this hack installed you can limit the number of emails sent to your technical mail address in case of Database Errors.
You can specify an interval in seconds between sending mails. All errors generated after the first error, until interval is passed,
are not mailed.

Optionally you can specify a different interval for different types of errors.

Operating system files will be used to keep track of the last mail sent. These will be zero byte files, so won't take any space.

Donations?
If you like this work and want to make a donation, your gifts are always welcomed at Paypal: marcoh64@gmail.com

PS No screenshots!!

Show Your Support

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

Comments
  #2  
Old 09-30-2005, 10:05 AM
SAngove SAngove is offline
 
Join Date: Aug 2005
Location: UK - Cornwall
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I will have a look at this, as i get quite frustrated to see my inbox full of db error emails

Thanks in Advance.
Reply With Quote
  #3  
Old 09-30-2005, 10:39 AM
reteep reteep is offline
 
Join Date: Mar 2004
Location: Germany
Posts: 164
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh YEA, this feature should be a default feature for vBulletin.. thanks!
Reply With Quote
  #4  
Old 09-30-2005, 11:10 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Then please click install

Edit: Oops you just did
Reply With Quote
  #5  
Old 09-30-2005, 02:46 PM
jugo jugo is offline
 
Join Date: Feb 2004
Location: Reading your emails.
Posts: 573
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Marco...this rocks.

Does anyone have a plugin / solution for this: I want to not display the ugly database error when the DB is down on non-vb pages where global.php is included.
Reply With Quote
  #6  
Old 09-30-2005, 02:55 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by jugo
Thanks Marco...this rocks.

Does anyone have a plugin / solution for this: I want to not display the ugly database error when the DB is down on non-vb pages where global.php is included.
In includes/class_core.php, find:
PHP Code:
   eval('$message = "' str_replace('"''\"'file_get_contents(DIR '/includes/database_error_page.html')) . '";');
   die(
$message); 
And replace by:
PHP Code:
   eval('$message = "' str_replace('"''\"'file_get_contents(DIR '/includes/database_error_page.html')) . '";');
   if (
VB_AREA != 'NonVB')
   {
    die(
$message);
   } 
Then in the top of your non vb page script:
PHP Code:
define('VB_AREA''NonVB'); 
PS This is not tested.
Reply With Quote
  #7  
Old 09-30-2005, 06:20 PM
jugo jugo is offline
 
Join Date: Feb 2004
Location: Reading your emails.
Posts: 573
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Marco...that gave me a whole bunch of other ideas.

They should put a hook there.
Reply With Quote
  #8  
Old 09-30-2005, 08:06 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes i agree, and i don't agree.

This is a crucial part of the code and will get executed in case of database errors.

No Database = No plugins to be executed = Hooks are useless.
Reply With Quote
  #9  
Old 10-01-2005, 01:08 AM
Guest190829
Guest
 
Posts: n/a
Default

Go Go Marco, this is really something I need. I'm sick of database error emails on my test board.

/me installs
Reply With Quote
  #10  
Old 10-01-2005, 05:08 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well on your testboard, you can simply remove the tech email from the config.php. You won't get any mails at all.
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:05 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.04891 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
  • (3)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
  • (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