In the most recent versions of myBB (I believe since 1.6.10), users have been unable to use the <style> tag in their posts. For normal forums, that isn't an issue, but for RP forums where users frequently use tables or other postscripts, it's handy to be able to chuck all your style information in that style tag and away you go. This is a brief guide on how to allow your board to continue to use <style> tags.
This change requires a core file edit. Be sure to save a backup.
I would recommend using the Patches plugin, which allows you to manage core file edits from the admin control panel. This lets you easily revert and disable those changes.
You should now be able to use style tags in your posts and profile fields, if HTML is enabled.
- Open up inc/class_parser.php
- Find, around line 117:
Code:while(preg_match("#<s(cript|tyle)(.*)>(.*)</s(cript|tyle)(.*)>#is", $message))- Replace with:
Code:while(preg_match("#<script(.*)>(.*)</script(.*)>#is", $message))- Find, around line 119:
Code:$message = preg_replace("#<s(cript|tyle)(.*)>(.*)</s(cript|tyle)(.*)>#is", "<s$1$2>$3</s$4$5>", $message);- Replace with:
Code:$message = preg_replace("#<script(.*)>(.*)</script(.*)>#is", "<s$1$2>$3</s$4$5>", $message);- Save and upload
MyBB Using Style Tags in myBB
Allows you to use style tags in your myBB posts and profile fields.