MyBB Community Forums

Full Version: My site doesn't display code correctly
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
On my site, I have some C++ tutorials posted, when the C++ code is placed in between [code] tags, it doesn't display properly... so the beginning of the code is "#include <iostream>" it'll only display "#include"

At first I thought it was a problem with my browser or Ubuntu maybe.. but I posted it on the test forums here, and it displays just fine. Then I thought okay, maybe it's just the theme so I tried changing the theme, and it still doesn't work.

The code shows just fine if placed between [php] tags but not when placed between [code] tags.

Any help?
Are you running the latest version of MyBB?

Also, to rule out plugins as a cause of this issue, please try the following. In ./inc/init.php, find the code:

define("TIME_NOW", time());

After this code, add this:

define("NO_PLUGINS", 1);

Then save and/or reupload this edited version of the file so the forum will run the new code.

This edit will stop plugins being run when a page on the forum is loaded; it will not edit, delete or reset any content the plugin has added or changed, it will just temporarily stop the plugins being loaded, so some features on your forum may be temporarily missing or broken whilst this code is in place. When you remove this code, plugins will work again exactly as they were before. This change helps us to see if a plugin is the cause of a problem, without you having to manually deactivate every single plugin, which would mean you may lose data from them.

If your issue is fixed when this code is added, then the cause of your issue is a plugin; please post a list of your plugins and we will try and help you find which one it may be. If the problem still happens with this code added, then it is unlikely a plugin is the cause, in which case we will investigate the issue further.

Thank you.
Sorry it took so long for me to reply I went to my grandparents Toungue

I'll list all my active plugins now:

Quote:Admins can log into Users' accounts (1.0)
Advanced Forum Signatures (2.0.3)
ChangUonDyU - Extra File Chatbox (3.6.0)
Fit on Page (2.3)
Game Section (1.2)
Google Analytics (1.5)
MyBB GoMobile (1.0 Beta 4)
Goodbye Spammer (0.1.2)
Google SEO (1.1.13)
HTML in Posts (1.5)
Mods Cant Edit Admins Posts (1.0)
My Achievements (1.4)
My Advertisements (1.8)
MyDemographics (1.0)
MyDownloads (1.8)
MyTheme (2.0)
NewPoints (1.7)
Online Today (1.0)
Profile Comments (0.5.1)
Profile Gtalk (0.1)
ProStats (1.7.6)
Random Avatars (1.0)
Stop forum spam (1.2)
Tabbed Menu (1.1)
Tagging Plugin! (1.2.2)
Thank You/Like System (1.2)
code tag parsing / ignoring html ?? can it be due to HTML in Posts (1.5) plug-in ..
Okay, it was HTML In Posts that was causing the problem, and it can be fixed if I change the settings from allow in all forums to specifying the exact forums that I want it to allow but the problem is I have way to many forums/subforums to go through.

Is there any way that I can fix the problem or... maybe... change the settings so instead of allowing it in certain forums I can disallow it in certain forums?

I'll also be posting this bug on MyBB-Plugins.