MyBB Community Forums
Help Needed in Javascript - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: 1.8 Support (https://community.mybb.com/forum-175.html)
+--- Forum: General Support (https://community.mybb.com/forum-176.html)
+--- Thread: Help Needed in Javascript (/thread-169123.html)



Help Needed in Javascript - TheAppreciated - 2015-03-31


Hello and Peace on All of You,


Please Help do not Suggest alternative! I have a Problem; which is occurred after an update from Mybb 1.6 to 1.8.3 Version in only "Headericlulde Temaplates"! I have Read a lot of threads and Searched a lot on internet but couldn't find any Solution! Sad

Here are the Codes of my Old Theme Mybb 1.6.0 Headerinclude Templates:

<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/prototype.js?ver=1603"></script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/general.js?ver=1603"></script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/images/ins/js/jquery-1.2.6.min.js"></script>
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/prototype.js"></script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/popup_menu.js?ver=1600"></script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/images/ins/js/popup.js"></script>

And here are the Codes of my New Theme 1.8.3 Headerinclude Template:


<script type="text/javascript" src="{$mybb->asset_url}/jscripts/jquery.js?ver=1800"></script>
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/jquery.plugins.min.js?ver=1800"></script>
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/general.js?ver=1800"></script>

I like MyBB 1.8.3 Version it is awesome and Working very fine, it is Selecting All Threads:

For Example:


[Image: 4fght.jpg]


Ok! Now there are two (2) Problems occured:

1. Whenever i use MyBB 1.8.3 version my Shoutbox {myshoutbox_abcd} Keeps Loading...!

For Examaple:


[Image: fxx7pj.jpg]


and whenever i put this code line, which is as following:

<script type="text/javascript" src="{$mybb->asset_url}/jscripts/prototype.js"></script>

than shoutbox works but the "Select All" Threads option and "inline moderation"does not work!!!

For Example:


[Image: 2hyjq76.jpg]


Is there any Changes Which should be made in Prototype.js Please Give me Your Suggestion by Including Your suggested codes of "Headerinclude Templates" i have found no solution please Help by Giving Your Headerinclude Sample! May God Give you Reward! Thanks My BB Team You have Worked very Well Smile



RE: Help Needed in Javascript - .m. - 2015-03-31

using MyShoutbox and prototype.js with MyBB 1.8.x is not recommended. its better to remove them.
instead you can use dvz shoutbox


RE: Help Needed in Javascript - TheAppreciated - 2015-04-02

Bump...! Still Looking for... Some Expert Opinion? Smile


RE: Help Needed in Javascript - Johnny S - 2015-04-02

From Stackoverflow:
Quote:Your basic problem is that $ is used by both Prototype and jQuery as a reference to another function. Unfortunately, Prototype more or less requires its $ definition, which means that once its loaded, nothing else should name itself $

Prototype has been dropped in favour of jQuery in 1.8 and the only solution (if you decide to stick with that SB) to your issue is rewriting prototype function (that is related to that shoutbox) to a jQuery one.


RE: Help Needed in Javascript - TheAppreciated - 2015-04-03

(2015-04-02, 03:52 PM)Johnny S Wrote: From Stackoverflow:

Quote:Your basic problem is that $ is used by both Prototype and jQuery as a reference to another function. Unfortunately, Prototype more or less requires its $ definition, which means that once its loaded, nothing else should name itself $

Prototype has been dropped in favour of jQuery in 1.8 and the only solution (if you decide to stick with that SB) to your issue is rewriting prototype function (that is related to that shoutbox) to a jQuery one.

Thank You Smile   Shy  Confused