Compatibility issue with myBB (Conflict with lang array)
PostPosted: 27 Nov 2013, 20:55
Hi,
adding the script
<script type="text/javascript" src="/arrowchat/external.php?type=djs" charset="utf-8"></script>
at the end of the template "footer" of myBB, it overwrites an array called lang used in the following myBB files and templates:
jscripts\general.js
jscripts\rating.js
jscripts\usercp.js
Template "index"
Template "header_welcomeblock_guest"
Template "forumdisplay_threadlist_rating"
Template usercp_editlists
The first command executed of the imported ArrowChat script <script type="text/javascript" src="/arrowchat/external.php?type=djs" charset="utf-8"></script> is:
---> var lang=[] <----
that resets the content previously filled from myBB.
To view a specific example of this situation, see template header_welcomeblock_guest in myBB:
One solution would be to change in the next release of ArrowChat the name of this array (for example from lang to langAC). Can it be done? or is there any other solution to fix the problem without modify the core files of myBB?
Thanks for any advice.
Regards,
Fabrizio
adding the script
<script type="text/javascript" src="/arrowchat/external.php?type=djs" charset="utf-8"></script>
at the end of the template "footer" of myBB, it overwrites an array called lang used in the following myBB files and templates:
jscripts\general.js
jscripts\rating.js
jscripts\usercp.js
Template "index"
Template "header_welcomeblock_guest"
Template "forumdisplay_threadlist_rating"
Template usercp_editlists
The first command executed of the imported ArrowChat script <script type="text/javascript" src="/arrowchat/external.php?type=djs" charset="utf-8"></script> is:
---> var lang=[] <----
that resets the content previously filled from myBB.
To view a specific example of this situation, see template header_welcomeblock_guest in myBB:
- Code: Select all
<script type="text/javascript">
<!--
lang.username = "{$login_username}";
lang.password = "{$lang->login_password}";
lang.login = "{$lang->login}";
lang.lost_password = " — <a href=\"{$mybb->settings['bburl']}/member.php?action=lostpw\">{$lang->lost_password}<\/a>";
lang.register_url = " — <a href=\"{$mybb->settings['bburl']}/member.php?action=register\">{$lang->welcome_register}<\/a>";
lang.remember_me = "{$lang->remember_me}";
// -->
</script>
<span style="float: right;">{$lang->welcome_current_time}</span>
<span id="quick_login">{$lang->welcome_guest} (<a href="{$mybb->settings['bburl']}/member.php?action=login" onclick="MyBB.quickLogin(); return false;">{$lang->welcome_login}</a> — <a href="{$mybb->settings['bburl']}/member.php?action=register">{$lang->welcome_register}</a>)</span>
One solution would be to change in the next release of ArrowChat the name of this array (for example from lang to langAC). Can it be done? or is there any other solution to fix the problem without modify the core files of myBB?
Thanks for any advice.
Regards,
Fabrizio