2018-12-01, 03:47 PM
I've done some testing and the problem is because images are now parsed before custom MyCode.
There are a couple of options that way work:
There are a couple of options that way work:
- Change your custom MyCode to just the following:
\[img_noresize\](.*?)\[/img_noresize\]
You'd also obviously need to update existing posts in the database. If you're using MariaDB or MySQL 8+, you should be able to do this with a query something like the following (untested, as I only have Postgres installed locally and not MySQL...):
UPDATE mybb_posts SET message = REGEX_REPLACE(message, '\\[img_noresize\\]\\[img\\](.*?)\\[\\/img\\]\\[/img_noresize\\]', '[img_noresize]\\1[/img_noresize]');
- We'd need to alter the MyBB core to add a new custom MyCode option to allow certain custom MyCodes to be parsed before all other built in custom MyCodes. This would be a big change, and would need quite a lot of testing - as you've seen, the parser is very fragile and extremely easy to break completely. We're also planning on implementing a completely new parser fairly soon, so I'm not sure how wise it would be to spend development time on a change of this magnitude...