Allow separate motd.txt for each section (section-motd.txt). This overrides motd.txt.

This commit is contained in:
Retro_Guy 2024-05-08 02:24:31 -07:00
parent c97f2865eb
commit e418d12251
1 changed files with 5 additions and 0 deletions

View File

@ -99,6 +99,11 @@ include ($config_dir . '/fortunes.conf');
if (file_exists($config_dir . '/motd.txt')) {
$motd = file_get_contents($config_dir . '/motd.txt');
}
// If specific <section>-motd.txt exists, use it
if (file_exists($config_dir . '/' . $config_name . '-motd.txt')) {
$motd = file_get_contents($config_dir . '/' . $config_name . '-motd.txt');
}
echo '<p align="center" class="np_header_button_bar">';
echo '<table cellpadding="0" cellspacing="0"><tr>';
foreach ($menulist as $menu) {