From 5dd12ebe8851ae19e4c44b4dfccdb3a013e81d17 Mon Sep 17 00:00:00 2001 From: Stefan Date: Mon, 4 Jul 2016 08:15:17 +0200 Subject: [PATCH] make invalid meta tags valid --- bin/init.php | 3 +++ config.yaml | 2 ++ index.php | 2 ++ 3 files changed, 7 insertions(+) diff --git a/bin/init.php b/bin/init.php index f38a892..de12de5 100644 --- a/bin/init.php +++ b/bin/init.php @@ -49,6 +49,9 @@ $yaml["rcc"]["api"] = "off"; $langs = getDir('./lang'); $yaml["language"] = get("Choose a language (" . $langs . ")", $yaml["language"], "en"); +// social media +$yaml["social"]["twitter"] = get("Your Twitter User ID:", ""); + $config->writeConfig($yaml); function get($question, $value, $default) diff --git a/config.yaml b/config.yaml index eb983bc..8d97c14 100644 --- a/config.yaml +++ b/config.yaml @@ -21,3 +21,5 @@ rcc: rcc: 'on' api: 'on' language: en +social: + twitter: '' diff --git a/index.php b/index.php index 9829d37..e00fa83 100644 --- a/index.php +++ b/index.php @@ -30,6 +30,8 @@ use mmk2410\rbe\config\Config as Config; $configParser = new Config('config.yaml', 'vendor/autoload.php'); $config = $configParser->getConfig(); +$lang = $config["language"] . "_" . strtoupper($config["language"]); +$twitter = $config["twitter"]; require './lang/' . $config["language"] . ".php"; // Language file require_once 'res/php/ArticleGenerator.php'; // The article generator