MyBB Community Forums

Full Version: Javascript on forums not working
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I've been having this problem on my forum for a while now.

The smilie inserter is not working, as the login/register buttons (if i press the mybb login link it does not pop up a form but rather bumps me to the login page instead) and my biggest problem is that my inline moderation is not working (if i select a checkbox on a post) the "Go (0)" button does not recognize it.

I assume this must be a javascript error, I've disabled all my plugins and even reverted my java files in the jscripts folder but no improvements happened. I'm wondering if anymore knows the files related to these forum features so maybe I could revert/fix them.

Also, I know it's not on my side because other mybb forums (including this one) work fine, it is also not my host because I tested another mybb forum installation on it which run smoothly.

If anyone can help me, it would be very appreciated. Smile
Do you have any jQuery in your theme? What's your URL?
http://save-point.org

This is my board, uhm I'm not sure about jQuery being in the theme since it's my friend who made it, however I'll ask him tonight to be sure.

On an extra note, the quick reply also doesn't work so universally there is no apparent javascript in the forums, other users have the same reports.
It looks like your theme, try setting the default theme as default... Do you see the Javascript now (Login header, Quick reply, Quick Edit, ETC)?
You have jQuery conflicting with the MyBB JavaScript - http://docs.jquery.com/Using_jQuery_with..._Libraries
I believe my problem may be something to do with the templates in the mysql table. This error only happened when I moved host and imported the mysql tables, I remember seeing an error but ignoring it anyway since the table successfully imported. I'm thinking this may have corrupted all the templates jquery perhaps, including the default theme. (I remember data_cache table being corrupted which I had to replace)

I imported a new theme to test this out and it seems that the new theme works fine. So it may just be my existing templates. I've tried repairing tables but nothing happens.

Is there any way to revert the jquery in these templates to original, or repair the tables?
It's nothing to do with the database, and nothing is corrupted.

You've simply got jQuery included in your pages, this is taken from your forum:

<script type="text/javascript" src="http://code.jquery.com/jquery.min.js"></script> 

This just conflicts with the MyBB javascript when you load a page. A new theme won't have this jQuery script included, thus it won't cause any problems.
Is there any way I can solve this jQuery problem, or where I can remove it?

edit:

Oh nevermind, I found it in Search/Replace, thank you very much for helping me. Everything works fine now.
Whatever Jquery code / script you want to use with MyBB, try to "wrap" inside the following script;

<script type="text/javascript">
jQuery.noConflict();
jQuery(function($) {
// jQuery Code goes on this line
});
</script>

Just you have to replace the line "// jQuery Code goes on this line" with your JQuery snippet.

Done! Smile