diff --git a/index.php b/index.php index d22c4de..7b3e7df 100644 --- a/index.php +++ b/index.php @@ -1,15 +1,11 @@ - getConfig(); + +require './lang/' . $config["language"] . ".php"; // Language file require_once 'res/php/ArticleGenerator.php'; // The article generator require_once './res/php/BlogListGenerator.php'; // and the blog list generator @@ -42,16 +44,16 @@ $url = "http://" . filter_input(INPUT_SERVER, "HTTP_HOST") . $pagenumber = filter_input(INPUT_GET, "page"); // get the pagenumber // Pagination algorithm -if ($pagination == 0) { - $pagination = false; +if ($config["design"]["pagination"] == 0) { + $config["design"]["pagination"] = false; } else { // pag_max: the newest post to show on a page - $pag_max = $pagination * ( $pagenumber + 1 ); + $pag_max = $config["design"]["pagination"] * ( $pagenumber + 1 ); // pag_min: the oldest post to show on a page - $pag_min = $pag_max - $pagination; + $pag_min = $pag_max - $config["design"]["pagination"]; if ($pagenumber > 0) { // Disable the blog intro if not on first page - $blogintro = "no"; + $config["blog"]["intro"] = "off"; } } @@ -72,10 +74,10 @@ if (isset($getarticle)) { = ArticleGenerator::getTitle($articlesdir, $getarticle . '.md'); } // Make sure that the entry has a title, because main.md hasn't one -if (empty($blogmainname)) { - $blogmaintitle = $blogtitle; +if (empty($config["blog"]["mainname"])) { + $blogmaintitle = $config["blog"]["title"]; } else { - $blogmaintitle = $blogmainname; + $blogmaintitle = $config["blog"]["mainname"]; } if (isset($getblog)) { $subblogtitle = BlogListGenerator::getName('./blogs/' . $getblog . '.md'); @@ -90,18 +92,18 @@ if (isset($getarticle)) { } // url of the feed -$feedurl = $blogurl . "/feed/" . $blog . ".atom"; +$feedurl = $config["blog"]["url"] . "/feed/" . $blog . ".atom"; ?>
-