MyBB Community Forums

Full Version: Custom MyCode not working
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I made a tag which does not work on the forum but WORKS in the test thing in the admin panel.

So I decided to make another mycode tag but this time a lot simpler:
Regular Expression: \[biu\](.*?)\[/biu\]
Replacement: <b><i><u>$1</u></i></b>

works in the test thing but does not work on the forum.

I have already checked most of the settings and I can't find any setting that says "Disable MyCode" :/
i tried, it works like a charm, also in the forum...

when editing/adding the mycode filter,you have the "ENABLED?" option..check this..
Yeap it is enabled.
By 'does not work' I take it you mean it just shows the tag??
Yeah it shows exactly what I write:
[biu]test[/biu]

displays the tag
Works perfectly fine here. Perhaps some modification interfering? Do you have multiple instances of the code, or something that may conflict with it?
Good practice: although <b>Hello</b> turns something bold, it isn't valid coding. Try and use <strong>Hello</strong> or CSS classes if possible!

Also, if a tag is showing it normally means that the regex doesn't match(?). Take a backup of your forums and try deactivating plugins to see if something is interfering.
I can't think of any modification I have made to the parser php file :/
The plugin I have are:
  • Ads after first post (2.2) - MyBBoard.de - Activated
  • Allow ONLY one user to browse a specified forum (0.1) - Pirata Nervo - Activated
  • Inline Ads (0.1) - Pirata Nervo - Deactivated
  • Lamer-Savar (1.0) - 0Derece - Not Installed & Deactivated
  • MyCodes Pack (1.0) - ZiNgA BuRgA - Activated
  • MyPlaza (Beta) (0.53) - ZiNgA BuRgA - Deactivated
  • My Question (1.3) - Unlimited020 - Activated
  • MyShoutbox v2 - Pirata Nervo - Activated
  • Show the users that has been online today (2.0) - CraKteR - Activated
  • Overview (3.1.1) - MyBBoard.de - Activated
  • Quick Theme! (1.1.1) - Tikitiki - Activated
  • Spoiler MyCode (1.1) - DeluxeGamer - Activated
  • Trash Can Forum (1.4) - Nickman and CraKteR - Activated

I have tried deactivating:
Spoiler MyCode (1.1)
MyCodes Pack (1.0)

Did not work :/

I guess I will look into the class_parser.php file to check if I changed anything.

Edit:

Just uploaded a fresh class_parser.php and seems it fixed.
Now I must check what's the difference between both files.
thank you

Edit:
thanks to http://www.comparemyfiles.com/default.aspx I found out the problem was in line 279, this was missing:
$custom_mycode[$key]['regex'] = "#".$mycode['regex']."#si";
Of course it could not work without it <.<