I would then adjust the text with "We are currently closed".warmweer wrote: Thu Aug 15, 2024 10:20 am Should be feasible with a cron job but I'm not sure how (calling Disable board should be simple, as should be re-enabling it, I think.
But disabled implies that the only Admins and Moderators will be able to see the contents. Other users will just see the index with a "The board is disabled " (or something similar).
I've got a faint memory of having seen a host configuration possibility somewhere: allowing viewing a website at specified times only.
The way it is now via ACP, but automatically, is perfect.danieltj wrote: Thu Aug 15, 2024 10:39 am So are you saying that the disable board feature from the ACP is an acceptable solution IF it was automatic in opening and closing the forum? Or would you want the forum to close in a different way?
I wouldn't go as far as to prohibit user connection: but only allow reading (and perhaps editing personal settings).ssl wrote: Thu Aug 15, 2024 12:32 pm If I understand the request correctly, it is necessary to prohibit user connection, and possibly registration, at certain times of the day. The board must always remain accessible to administrators?
If you now disable the forum, only moderators and administrators can access the forum. Registrations are therefore not possible. The default settings are perfect. Now only close automatically at 11:00 PM and open again at 8:00 AM.ssl wrote: Thu Aug 15, 2024 12:32 pm If I understand the request correctly, it is necessary to prohibit user connection, and possibly registration, at certain times of the day. The board must always remain accessible to administrators?
Not necessary, I prefer to keep it as simple as possible. I would be very happy if someone has the solution.ssl wrote: Thu Aug 15, 2024 2:04 pm I think it would be in your interest to keep the board read-only during closing hours, so as not to bore your users.
Code: Select all
<div class="openingsuren">
<table>
<tr><th>Openingsuren:</th></tr>
<tr>Maandag:<td>8:00uur - 23:00uur<br></td></tr>
<tr>Dinsdag:<td>8:00uur - 23:00uur<br></td></tr>
<tr>Woensdag:<td>8:00uur - 23:00uur<br></td></tr>
<tr>Donderdag:<td>8:00uur - 23:00uur<br></td></tr>
<tr>Vrijdag:<td>8:00uur - 23:00uur<br></td></tr>
<tr>Zaterdag:<td>8:00uur - 23:00uur<br></td></tr>
<tr>Zondag:<td>8:00uur - 23:00uur<br></td></tr>
</table>
</div>
Code: Select all
.openingsuren {
float: right;
padding: 5px 10px;
clear: both;
}
S_DISABLE_BOARD
is a template that’s set somewhere as well which might help back trace where the board decides if it’s disabled or not.The only thing I've found so far is...danieltj wrote: Thu Aug 15, 2024 6:26 pm I had a look at core to see how the disable board function works and it seems a lot of it is handled in the user functions file. Might be worth starting there and seeing what you can find.
S_DISABLE_BOARD
is a template that’s set somewhere as well which might help back trace where the board decides if it’s disabled or not.
functions.php:
Code: Select all
'S_BOARD_DISABLED' => ($config['board_disable']) ? true : false,
core.page_header_after
.core.page_header
which is a php event you can use which is earlier on in the file.