MyBB Community Forums

Full Version: MyBB is not defined
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm having trouble getting javascript to work on my site. When I first installed it, javascript didn't work. I then installed some plugins and changed a few things and suddenly it worked. Then one day I went to edit my template in the admin cp and the javascript buttons didn't work. I had one of my members tell my the edit button did not work so I investigated and using firebug I got these errors:
Quote:MyBB is not defined
<script type="text/javascript">if(MyBB) { Event.observe(window, 'load', function() { MyBB.detectDSTChange('-4'); }); }</script>

lang is not defined
lang.no_new_posts = "Forum Contains No New Posts";

unterminated string literal
text = text.replace(/"/g, """);

The errors I am getting in admin cp are:
Quote:MyBB is not defined
if(MyBB.browser == "opera" || MyBB.browser == "safari")

unterminated string literal
text = text.replace(/"/g, """);

I am using firefox 3.5 and have not tried it on any other browsers since this newest problem.

Here is my website: http://strobistforum.com/
I'm not really an expert in javascript, but "MyBB is not defined" sounds like the class hasn't been initiated. This is probably more to do with a problem in the JS files themselves.

Can you delete, then reupload all the javascript files again from a new MyBB download? The files are there, but it just looks as though the browser isn't working with them...
I have done that multiple times. The problem is, it didn't work on the initial install either. Not until I changed something a few days later did it work.
What's the ./jscripts/ folder and files inside CHMOD to??
(2009-10-26, 01:54 PM)snowcase Wrote: [ -> ]Not until I changed something a few days later did it work.

Does un-doing this change make it work?