Use a footer file instead

This commit is contained in:
speedie 2023-06-28 19:34:45 +02:00
parent 1afe7bfdcf
commit 151a92704f
3 changed files with 12 additions and 1 deletions

View file

@ -20,6 +20,7 @@ define('DEFAULT_PAGE', 'Home');
define('SIDEBAR_PAGE', 'Sidebar');
define('CSS_FILE', 'css/index.css');
define('FOOTER_FILE', 'footer.php');
define('PAGE_TITLE', 'spmenu wiki: ');
@ -28,6 +29,8 @@ define('ENABLE_TITLE', true);
define('ENABLE_CSS', true);
define('ENABLE_HEAD', true);
define('ENABLE_FOOTER', true);
define('ENABLE_FOOTER_HARDCODED', false);
define('ENABLE_FOOTER_FILE', true);
define('ENABLE_TITLEBAR', true);
define('ENABLE_TOOLBAR', true);
define('ENABLE_SEARCH', true);

4
footer.php Normal file
View file

@ -0,0 +1,4 @@
<!-- Footer, this is placed under the index with the wiki stylesheet. -->
<footer>
<p class="footer">Wiki licensed under the <a href="https://git.speedie.site/speedie/spmenu-wiki/raw/branch/master/LICENSE">MIT</a> license. Articles and images licensed under the CC-BY-SA 4.0 license. <a href="https://git.speedie.site/speedie/spmenu-wiki">Source code</a></p>
</footer>

View file

@ -87,10 +87,14 @@ function printHeader($title, $action, $html, $bodyclass="")
function printFooter()
{
if (ENABLE_FOOTER) {
if (ENABLE_FOOTER_HARDCODED) {
print " </body>\n";
print "<p class=\"footer\">Wiki licensed under the <a href=\"https://git.speedie.site/speedie/spmenu-wiki/raw/branch/master/LICENSE\">MIT</a> license. Articles and images licensed under the CC-BY-SA 4.0 license. <a href=\"https://git.speedie.site/speedie/spmenu-wiki\">Source code</a></p>";
print "</html>";
} else if (ENABLE_FOOTER_FILE && FOOTER_FILE != '') {
print " </body>\n";
include(FOOTER_FILE);
}
}