Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Feb 2007
Posts: 329
Yarp™
Yarp™
Offline
Joined: Feb 2007
Posts: 329
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.

Sponsored Links
Joined: Nov 2003
Posts: 482
Enthusiast
Enthusiast
Offline
Joined: Nov 2003
Posts: 482
'repeat this for every other language file you have' ??

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

:shrug:

Joined: Feb 2007
Posts: 329
Yarp™
Yarp™
Offline
Joined: Feb 2007
Posts: 329
Originally Posted by sirdude
i assume you mean for each distinct language, modify generic.php.. no?


Yeppers smile

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Thanks Yarp!


- Allen wavey
- What Drives You?
Joined: Nov 2003
Posts: 329
Beta Tester
Beta Tester
Offline
Joined: Nov 2003
Posts: 329
This continues to work in version 7.6.1 + patch so version 7.6.1.1


BOOM 7.6.+ rocks....
Sponsored Links

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Posts: 70
Joined: January 2007
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)