Configurable URLs.

This commit is contained in:
flash 2022-07-03 21:04:54 +00:00
parent f5a833663b
commit 34dfe10156
7 changed files with 52 additions and 31 deletions

View file

@ -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';

View file

@ -1,7 +1,7 @@
<?php
$lang = array();
$lang['title'] = 'Flashii Chat';
$lang['titleinchat'] = 'Flashii Chat Legacy';
$lang['title'] = '%flashii% Chat';
$lang['titleinchat'] = '%flashii% Chat Legacy';
$lang['userName'] = 'Username';
$lang['password'] = 'Password';
$lang['login'] = 'Login';
@ -13,7 +13,8 @@ $lang['style'] = 'Style';
$lang['language'] = 'Language';
$lang['inputLineBreak'] = 'Press SHIFT+ENTER to input a line break';
$lang['messageSubmit'] = 'Send';
$lang['registeredUsers'] = 'Log in with your Flashii credentials, this chat is entirely unregulated so enter at your own risk.';
$lang['registeredUsers'] = 'Log in with your %flashii% credentials, this chat is entirely unregulated so enter at your own risk.';
$lang['clickLogin'] = 'Click "Login" to login with your %flashii% ID';
$lang['onlineUsers'] = 'Online users';
$lang['toggleAutoScroll'] = 'Autoscroll on/off';
$lang['toggleAudio'] = 'Sound on/off';

View file

@ -3084,7 +3084,7 @@ class AJAXChat {
if($key === null)
return $this->_lang;
if(isset($this->_lang[$key]))
return $this->_lang[$key];
return str_replace('%flashii%', $this->getConfig('flashiiString'), $this->_lang[$key]);
return null;
}

View file

@ -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 <<<EOF
<ul>
<li class="first notcurrent"><a href="https://flashii.net/">Home</a></li>
<li class="notcurrent"><a href="https://flashii.net/news.php">News</a></li>
<li class="first notcurrent"><a href="{$this->ajaxChat->getConfig('flashiiUrl', 'home')}">Home</a></li>
<li class="notcurrent"><a href="{$this->ajaxChat->getConfig('flashiiUrl', 'news')}">News</a></li>
<li class="current"><a href="./">Chat</a></li>
<li class="notcurrent"><a href="https://flashii.net/members.php">Members</a></li>
<li class="notcurrent"><a href="https://flashii.net/donate.php">Donate</a></li>
<li class="notcurrent"><a href="https://status.flashii.net">Status</a></li>
<li class="notcurrent"><a href="{$this->ajaxChat->getConfig('flashiiUrl', 'members')}">Members</a></li>
<li class="notcurrent"><a href="{$this->ajaxChat->getConfig('flashiiUrl', 'donate')}">Donate</a></li>
<li class="notcurrent"><a href="{$this->ajaxChat->getConfig('flashiiUrl', 'status')}">Status</a></li>
</ul>
EOF;
case 'COPYRIGHT':
@ -182,12 +185,12 @@ EOF;
Copyright &copy; 2013-2015 <a href="https://flash.moe/" target="_blank">Flashwave</a>
<br /><a href="https://blueimp.net/ajax/" target="_blank">AJAX Chat</a> &copy; <a href="https://blueimp.net" target="_blank">blueimp.net</a>
<br />
<a href="https://flashii.net/forum">Feedback</a> |
<a href="https://flashii.net/changelog.php">Changelog</a> |
<a href="https://flashii.net/info.php/rules">Rules &amp; Info</a> |
<a href="https://flashii.net/info.php/terms">Terms of Service</a> |
<a href="https://flashii.net/info.php/contact">Contact</a> |
<a href="https://test.flashii.net">DevSite</a> |
<a href="{$this->ajaxChat->getConfig('flashiiUrl', 'feedback')}">Feedback</a> |
<a href="{$this->ajaxChat->getConfig('flashiiUrl', 'changelog')}">Changelog</a> |
<a href="{$this->ajaxChat->getConfig('flashiiUrl', 'rules')}">Rules &amp; Info</a> |
<a href="{$this->ajaxChat->getConfig('flashiiUrl', 'terms')}">Terms of Service</a> |
<a href="{$this->ajaxChat->getConfig('flashiiUrl', 'contact')}">Contact</a> |
<a href="{$this->ajaxChat->getConfig('flashiiUrl', 'test')}">DevSite</a> |
<a href="?view=legacy">Legacy Login</a>
</div><br />
EOF;

View file

@ -113,12 +113,12 @@
<div class="toplogo">
<span style="text-shadow: 0px 0px 8px #F1F1F1;"><a href="http://flashii.net/">Flashii</a></span>
<div class="topmenu">
<a href="https://flashii.net/">&nbsp;Home&nbsp;</a>
<a href="https://flashii.net/news.php">&nbsp;News&nbsp;</a>
<a href="[CONF]flashiiUrl.home[/CONF]">&nbsp;Home&nbsp;</a>
<a href="[CONF]flashiiUrl.news[/CONF]">&nbsp;News&nbsp;</a>
<a href="./">&nbsp;Chat&nbsp;</a>
<a href="https://flashii.net/members.php">&nbsp;Members&nbsp;</a>
<a href="https://flashii.net/donate.php">&nbsp;Donate&nbsp;</a>
<a href="https://status.flashii.net/">&nbsp;Status&nbsp;</a>
<a href="[CONF]flashiiUrl.members[/CONF]">&nbsp;Members&nbsp;</a>
<a href="[CONF]flashiiUrl.donate[/CONF]">&nbsp;Donate&nbsp;</a>
<a href="[CONF]flashiiUrl.status[/CONF]">&nbsp;Status&nbsp;</a>
</div>
</div>
<div id="loginContent">
@ -130,9 +130,9 @@
<input type="hidden" name="login" id="loginField" value="login"/>
<input type="hidden" name="redirect" id="redirectField" value="[REDIRECT_URL/]"/>
<div><label for="userNameField">[LANG]userName[/LANG]:</label><br />
<input disabled="disabled" type="text" name="userName" id="userNameField" maxlength="[USER_NAME_MAX_LENGTH/]"/></div>
<input disabled="disabled" type="text" name="userName" id="userNameField" maxlength="[USER_NAME_MAX_LENGTH/]" placeholder="[LANG]clickLogin[/LANG]" style="width: 300px;"/></div>
<div><label for="passwordField">[LANG]password[/LANG]*:</label><br />
<input disabled="disabled" type="password" name="password" id="passwordField"/></div>
<input disabled="disabled" type="password" name="password" id="passwordField" placeholder="*****" style="width: 300px;"/></div>
<div><label for="channelField">[LANG]channel[/LANG]:</label><br />
<select name="channelName" id="channelField">[CHANNEL_OPTIONS/]</select></div>
<div><label for="languageSelection">[LANG]language[/LANG]:</label><br />
@ -155,12 +155,12 @@
<div><a href="https://blueimp.net/ajax/">AJAX Chat</a> &copy; <a href="https://blueimp.net">blueimp.net</a></div>
<div>
Copyright &copy; 2013-2014 <a href="http://flash.moe/" target="_blank">Flashii Media</a><br />
<a href="https://flashii.net/forum">Feedback</a> |
<a href="https://flashii.net/changelog.php">Changelog</a> |
<a href="https://flashii.net/info.php/rules">Rules &amp; Info</a> |
<a href="https://flashii.net/info.php/terms">Terms of Service</a> |
<a href="https://flashii.net/info.php/contact">Contact</a> |
<a href="https://test.flashii.net">DevSite</a> |
<a href="[CONF]flashiiUrl.feedback[/CONF]">Feedback</a> |
<a href="[CONF]flashiiUrl.changelog[/CONF]">Changelog</a> |
<a href="[CONF]flashiiUrl.rules[/CONF]">Rules &amp; Info</a> |
<a href="[CONF]flashiiUrl.terms[/CONF]">Terms of Service</a> |
<a href="[CONF]flashiiUrl.contact[/CONF]">Contact</a> |
<a href="[CONF]flashiiUrl.test[/CONF]">DevSite</a> |
<a href="./">Classic Login</a>
</div>
</div>

View file

@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="[LANG_CODE/]" lang="[LANG_CODE/]" dir="[BASE_DIRECTION/]">
<head>
<meta charset="utf-8" />
<title>Flashii - Chat</title>
<title>[CONF]flashiiString[/CONF] - Chat</title>
<link rel="shortcut icon" href="favicon.ico" />
<link rel="stylesheet" type="text/css" href="css/mio.css" />
<style>

View file

@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="[LANG_CODE/]" lang="[LANG_CODE/]" dir="[BASE_DIRECTION/]">
<head>
<meta charset="utf-8" />
<title>Flashii - Chat</title>
<title>[CONF]flashiiString[/CONF] - Chat</title>
<link rel="shortcut icon" href="/favicon.ico" />
<link rel="stylesheet" type="text/css" href="css/mio.css" />
<style>
@ -55,7 +55,7 @@ div.mioboxcontent {
<div class="mioboxcontent">
<input type="hidden" name="login" id="loginField" value="login"/>
<input type="hidden" name="redirect" id="redirectField" value="[REDIRECT_URL/]"/>
<input type="text" id="userNameField" disabled="" style="width: 388px;" placeholder="Click &quot;Login&quot; to login with your Flashii Account" />
<input type="text" id="userNameField" disabled="" style="width: 388px;" placeholder="[LANG]clickLogin[/LANG]" />
<select name="channelName" id="channelField">[CHANNEL_OPTIONS/]</select>
<select id="languageSelection" name="lang" onchange="ajaxChat.switchLanguage(this.value);">[LANGUAGE_OPTIONS/]</select>
<input type="submit" name="submit" id="loginButton" value="[LANG]login[/LANG]"/>
@ -64,6 +64,7 @@ div.mioboxcontent {
</div>
</form>
<div class="navbar">
[MENU_BAR/]
</div>
[COPYRIGHT/]
</body>