From 34dfe10156c73a5b0cdc4a194092d3cd771109c7 Mon Sep 17 00:00:00 2001 From: flashwave Date: Sun, 3 Jul 2022 21:04:54 +0000 Subject: [PATCH] Configurable URLs. --- config/config.php | 16 ++++++++++++++++ lang/en.php | 7 ++++--- src/AJAXChat.php | 2 +- src/AJAXChatTemplate.php | 25 ++++++++++++++----------- template/legacyLogin.html | 26 +++++++++++++------------- template/loggedOut.html | 2 +- template/loggedOutFA.html | 5 +++-- 7 files changed, 52 insertions(+), 31 deletions(-) diff --git a/config/config.php b/config/config.php index a7e91e6..f9708ff 100644 --- a/config/config.php +++ b/config/config.php @@ -37,6 +37,22 @@ $config['dbConnection']['type'] = null; // Database link: $config['dbConnection']['link'] = null; +$config['flashiiString'] = 'Flashii'; +$config['flashiiSecret'] = 'woomy'; +$config['flashiiAuth']['login'] = 'https://flashii.net/auth/login.php'; +$config['flashiiAuth']['verify'] = 'https://flashii.net/_sockchat/verify'; +$config['flashiiUrl']['home'] = 'https://flashii.net/'; +$config['flashiiUrl']['news'] = 'https://flashii.net/news.php'; +$config['flashiiUrl']['members'] = 'https://flashii.net/members.php'; +$config['flashiiUrl']['donate'] = 'https://flashii.net/donate.php'; +$config['flashiiUrl']['status'] = 'https://status.flashii.net'; +$config['flashiiUrl']['feedback'] = 'https://flashii.net/forum'; +$config['flashiiUrl']['changelog'] = 'https://flashii.net/changelog.php'; +$config['flashiiUrl']['rules'] = 'https://flashii.net/info.php/rules'; +$config['flashiiUrl']['terms'] = 'https://flashii.net/info.php/terms'; +$config['flashiiUrl']['contact'] = 'https://flashii.net/info.php/contact'; +$config['flashiiUrl']['test'] = 'https://test.flashii.net'; + if(is_file(AJAX_CHAT_PATH . '/config/config-db.php')) include_once AJAX_CHAT_PATH . '/config/config-db.php'; diff --git a/lang/en.php b/lang/en.php index 522033a..e7db74a 100644 --- a/lang/en.php +++ b/lang/en.php @@ -1,7 +1,7 @@ _lang; if(isset($this->_lang[$key])) - return $this->_lang[$key]; + return str_replace('%flashii%', $this->getConfig('flashiiString'), $this->_lang[$key]); return null; } diff --git a/src/AJAXChatTemplate.php b/src/AJAXChatTemplate.php index a672dbc..1aa05f0 100644 --- a/src/AJAXChatTemplate.php +++ b/src/AJAXChatTemplate.php @@ -60,6 +60,9 @@ class AJAXChatTemplate { case 'AJAX_CHAT_URL': return $this->ajaxChat->htmlEncode($this->ajaxChat->getChatURL()); + case 'CONF': + return $this->ajaxChat->getConfig(...explode('.', $tagData[2], 2)); + case 'LANG': return $this->ajaxChat->htmlEncode($this->ajaxChat->getLang($tagData[2])); case 'LANG_CODE': @@ -168,12 +171,12 @@ class AJAXChatTemplate { case 'MENU_BAR': return << -
  • Home
  • -
  • News
  • +
  • Home
  • +
  • News
  • Chat
  • -
  • Members
  • -
  • Donate
  • -
  • Status
  • +
  • Members
  • +
  • Donate
  • +
  • Status
  • EOF; case 'COPYRIGHT': @@ -182,12 +185,12 @@ EOF; Copyright © 2013-2015 Flashwave
    AJAX Chat © blueimp.net
    - Feedback | - Changelog | - Rules & Info | - Terms of Service | - Contact | - DevSite | + Feedback | + Changelog | + Rules & Info | + Terms of Service | + Contact | + DevSite | Legacy Login
    EOF; diff --git a/template/legacyLogin.html b/template/legacyLogin.html index 0b79780..3edf0f8 100644 --- a/template/legacyLogin.html +++ b/template/legacyLogin.html @@ -113,12 +113,12 @@
    @@ -130,9 +130,9 @@

    -
    +

    -
    +


    @@ -155,12 +155,12 @@
    AJAX Chat © blueimp.net
    Copyright © 2013-2014 Flashii Media
    - Feedback | - Changelog | - Rules & Info | - Terms of Service | - Contact | - DevSite | + Feedback | + Changelog | + Rules & Info | + Terms of Service | + Contact | + DevSite | Classic Login
    diff --git a/template/loggedOut.html b/template/loggedOut.html index dd724b9..6589b2b 100644 --- a/template/loggedOut.html +++ b/template/loggedOut.html @@ -3,7 +3,7 @@ -Flashii - Chat +[CONF]flashiiString[/CONF] - Chat