MyBB Community Forums

Full Version: MyCode Parameters
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Trying to create some custom MyCodes and was wondering about how to handle parameters, obviously this works fine:

[test=1]hello world[/test]

As does this:

[test=]hello world[/test]

But when this is posted

[test]hello world[/test]

The MyCode doesn't work because the regex is expecting an "=", how can I change this so it works with or without the parameter? Presumably it involves changing the regex, but my regex skills are limited.
bumpety bump.
Just make a second mycode.
*hits self in head repeatedly*

Often the simplest solutions are correct.

Thanks
No problem. Glad I was able to help Smile