php forum
php mysql forum
php mysql smarty
 
Topic Options
#317296 - 06/26/08 04:01 AM [7.3.x] Scheduled board close for backup
blaaskaak Offline
Enthusiast

Registered: 02/25/07
Posts: 303
Loc: The Netherlands
I have a cronjob running that backup's my ubb database and directory. Since it's better to have the board closed while making a backup, I have added a scheduled close for ubb.

open /languages/english/generic.php

Find:
Php Code:
$ubbt_lang['COPY2CLIP'] = 'Copy'; 


Add below:
Php Code:
$ubbt_lang['BACKUPCLOSED'] = 'Because of a scheduled backup the board is closed from %s until %s'; 


Repeat editing the generic.php for every other language you have.

open /ubbthreads.php
Find:
Php Code:

		$user['USER_STYLE'] = $force ? 0 : $user['USER_STYLE'];
		$html->set_style($force);
 


Add below:
Php Code:

		// closed for backup?
		$backupstarttime = "04:30";
		$backupstoptime = "04:45";
		
		$backuptime = date("H:i");
		if ($backuptime >= $backupstarttime && $backuptime < $backupstoptime) {
			$insert = $ubbt_lang['BACKUPCLOSED'];
			$closed = true;
			$fatal_error = true;
			$fatal_error_message = sprintf($insert,$backupstarttime,$backupstoptime);
		}
		
		// end closed for backup
 


Save, upload, and voila! Board is closed between 04:30 and 04:45.

Adjusting $backupstarttime and $backupstoptime will adjust the times the board will automaticly close.

It will also close the board for admins. The purpose of the close is to make the best database snapshop possible, so you don't want yourself messing around the forum also.

How to backup your forum? Lost of information about the subject on ubbcentral.
_________________________

Top
#317297 - 06/26/08 09:10 AM Re: [7.3.x] Scheduled board close for backup [Re: blaaskaak]
sirdude Moderator Offline
Enthusiast

Registered: 11/08/03
Posts: 441
Loc: SoCal
'repeat this for every other language file you have' ??

i assume you mean for each distinct language, modify generic.php.. no?

:shrug:
_________________________

Top
#317298 - 06/26/08 09:25 AM Re: [7.3.x] Scheduled board close for backup [Re: sirdude]
blaaskaak Offline
Enthusiast

Registered: 02/25/07
Posts: 303
Loc: The Netherlands
Originally Posted By: sirdude
i assume you mean for each distinct language, modify generic.php.. no?


Yeppers smile
_________________________

Top
#317335 - 06/30/08 12:51 PM Re: [7.3.x] Scheduled board close for backup [Re: blaaskaak]
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25448
Loc: Texas
Thanks Yarp!
_________________________
- Allen wavey
- What Drives You?

Top


Moderator:  sirdude 
Who's Online
0 registered (), 27 Guests and 11 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Forum 'Trader Ratings'.
by blaaskaak
11/20/08 08:27 AM
Problems reading a lot of old posts here
by Ruben Rocha
11/18/08 04:33 PM
PhotoPost BB Code Popup
by Iann128
11/15/08 01:24 PM
Customization needed
by Gizmo
11/12/08 12:28 PM
Team UBBDev Rides Again!
by AllenAyres
11/11/08 02:16 PM
Active Topics.
by AllenAyres
11/11/08 02:13 PM
Looking for a simple upload script
by AllenAyres
11/11/08 02:12 PM
New Mods
Forum 'Trader Ratings'.
by McLemore
11/19/08 02:14 PM
[7.4] Keep log of custom title changes
by blaaskaak
10/27/08 07:51 AM
User Authentication Class
by
01/19/07 02:59 PM
Multiple Identity Detector
by
12/30/06 06:39 PM
PhotoPost BB Code Popup
by
11/06/06 05:43 PM
Newest Members
Begbie, cenk, MATTO, DougMMcts, tim Anderson
13361 Registered Users
Top Posters
AllenAyres 25448
JoshPet 11330
Rick 8372
LK 7396
Lord Dexter 6503
Greg Hard 5533
Charles Capps 5438

 

 

 
fusionbb message board php hacks