[BETA] Oops - Database Down 0.0.3

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
DennyCrane
Registered User
Posts: 86
Joined: Mon Oct 17, 2005 3:47 am

Post by DennyCrane »

beautiful! im kinda looking forward to errors now :lol:
abidjantalkcom
Registered User
Posts: 96
Joined: Sun May 22, 2005 2:02 am

Post by abidjantalkcom »

Nice MOD. Very nice. I just installed it.
here is my page: http://www.abidjantalk.com/forum/oops.php
Last edited by abidjantalkcom on Sun Mar 12, 2006 8:57 pm, edited 3 times in total.
abidjantalkcom
Registered User
Posts: 96
Joined: Sun May 22, 2005 2:02 am

Post by abidjantalkcom »

please provide translation for other languages if you can.
Thanks.
JakeNess
Registered User
Posts: 91
Joined: Tue Oct 07, 2003 10:18 pm
Contact:

Post by JakeNess »

Works GREAT, I love it.
User avatar
igorw
Former Team Member
Posts: 8024
Joined: Fri Dec 16, 2005 12:23 pm
Location: {postrow.POSTER_FROM}
Name: Igor Wiedler

Post by igorw »

German Lang:

Code: Select all

// Der Name deiner website
$site_name = 'phpBB';

// The page title found in the browser title bar
$page_title = 'Oops, entschuldigung. Die Datenbank ist im Moment nicht erreichbar';

// Der Name des templates
$template = 'subSilver';

// Link zu einem Bild - in diesem Beispiel das phpBB Logo
$page_image = 'templates/subSilver/images/logo_phpBB.gif';

// Die Error Message
$error_msg = 'Es tut uns leid. Unsere Datenbank hat ein temporäres Problem. Versuchen sie es später noch einmal.';

// Deine Signature
$signature = 'Vielen Dank, das Team';

// Deine email Addresse
$admin_email = 'someone@somewhere.com';

// Nachricht, die an den Admin gesendet wird
$contact_info = 'Wenn den Admin kontaktieren willst, klicke <a href="' . "mailto: $admin_email" . '"><b>hier</b></a>';
abidjantalkcom
Registered User
Posts: 96
Joined: Sun May 22, 2005 2:02 am

Post by abidjantalkcom »

Thanks for the German translation.
I'd like to put that in my language file. Or, will the language file be useless if we cannot connect to the database?
User avatar
igorw
Former Team Member
Posts: 8024
Joined: Fri Dec 16, 2005 12:23 pm
Location: {postrow.POSTER_FROM}
Name: Igor Wiedler

Post by igorw »

It's hardcoded into oops.php :)
DennyCrane
Registered User
Posts: 86
Joined: Mon Oct 17, 2005 3:47 am

Post by DennyCrane »

i luv this mod... and its getting a lot of use since my host's db has been down for several hours tonight.

one question, it is showing my custom error page, but it also has
Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) in /home/dawg/public_html/db/mysql4.php on line 48


above my error page. is this normal?
User avatar
stickerboy
Former Team Member
Posts: 7349
Joined: Mon Mar 29, 2004 2:27 pm
Location: Airdrie, UK (127.0.0.1)
Name: Kenny Cameron
Contact:

Post by stickerboy »

there's a fix for that on the previous page ;)
I'm a web-designing code-decrypting tech-support musician
|| Twitter || Flickr || phpBB Snippets ||
Formerly known as cherokee red
DennyCrane
Registered User
Posts: 86
Joined: Mon Oct 17, 2005 3:47 am

Post by DennyCrane »

thanks ;) :lol:
User avatar
Ramon Fincken
Registered User
Posts: 4835
Joined: Thu Oct 14, 2004 1:04 am
Location: NL, The Netherlands Amsterdam area @GMT +1
Contact:

Post by Ramon Fincken »

Joe, here's an add on I use.

You'll know how to implement it in your file.

Code: Select all

// Your email address
$admin_email = 'board@board.com';

        $html_on = true;
	$headers = "From: PhpBB-board <".$admin_email .">\r\n";  
	$headers .= "Reply-To: PhpBB-board <".$admin_email .">\r\n";  
	$headers .= "MIME-Version: 1.0\r\n";
	if($html_on) $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; 	

	$mail = false;
	if(mail($admin_email,'Phpbb board: Database down','<html>Database is down.</html>',$headers))
	{
		$mail = true;
	}   
	
	if(!($mail))
	{
		$contact_info = 'The server has not been able to sent an email to the Site administrator.
		<br />If you need to get in touch with the Management, you can do so by clicking <a href="' . "mailto: $admin_email" . '"><b>here</b></a>';	
	}     
	else
	{
		$contact_info = 'An automated message has been sent to the Site administrator';	
	}
Dutch quality fully managed WordPress hosting - ManagedWPHosting.nl

Before changing a file, some code or installing a MOD >> Make a backup first!

Do you like my mods? paypal me $1 :) forumsoftware[AT}creativepulses[DOT}nl [/size]
PhpBBantispam.com || Instant find your mod here
User avatar
NGLeader
Registered User
Posts: 88
Joined: Fri Mar 14, 2003 12:04 am
Location: New York, N.Y.
Contact:

Oops Image Addon

Post by NGLeader »

Add a database down image to your oops error page.

#-----[ OPEN ]------------------------------------------------
#
oops.php

#
#-----[ FIND ]------------------------------------------------
#
// Link to an image - in the example shown here, the phpBB logo itself
$page_image = 'templates/subSilver/images/logo_evolve.gif';

#
#-----[ AFTER, ADD ]------------------------------------------
#
// Link to a database down image - in the example shown here, the oops image
$oops_image = '<img src="templates/subSilver/images/oops.gif">';

#
#-----[ FIND ]------------------------------------------------
#
<td align="center"><h1><?php echo $error_msg ?></h1><br /><span class="gen"><?php echo $contact_info ?></span><br /><br /><span class="genmed"><?php echo $signature ?></span></td>

#
#-----[ REPLACE WITH ]------------------------------------------
#
<td align="center"><h1><?php echo $error_msg ?></h1><? echo $oops_image ?><br /><br /><span class="gen"><?php echo $contact_info ?></span><br /><br /><span class="genmed"><?php echo $signature ?></span></td>

#
#-----[ SAVE/CLOSE FILE ]--------------------------------
#
# EoM
deejaybet
Registered User
Posts: 1814
Joined: Thu Dec 08, 2005 2:01 pm
Location: Derry, Northern Ireland
Contact:

Post by deejaybet »

great mod.. currently in operation on my forum board :) just would like to know how to impliment ramons add on to the mod opps.php
User avatar
blazes
Registered User
Posts: 579
Joined: Mon Feb 20, 2006 7:20 am

Post by blazes »

It looks like you just stick it into the oops.php file. :)
Image
I'm lazy and don't check my MOD support threads very often. If you need help and I'm not replying in the thread, PM me and yell.
deejaybet
Registered User
Posts: 1814
Joined: Thu Dec 08, 2005 2:01 pm
Location: Derry, Northern Ireland
Contact:

Post by deejaybet »

but im sure it needs to be calling in the html coding tho
Post Reply

Return to “[2.0.x] MODs in Development”