2017-08-21, 05:52 PM
2017-08-21, 08:07 PM
Create your own custom MyCode to replace to simple img tags, use parse order -1.
2017-08-22, 05:33 PM
(2017-08-21, 08:07 PM)OmarĀ G. Wrote: [ -> ]Create your own custom MyCode to replace to simple img tags, use parse order -1.
Can you elaborate on this and give an example? Thanks.
2017-08-23, 07:00 PM
Simply create a custom MyCode (probably using the same regex MyBB uses by core) to replace [img=400x400]URL[/img] to [img]URL[/img] before the actual core parsed tags run.
That or, if you use Patches, just remove the line that parses this in the class_parser.php file.
That or, if you use Patches, just remove the line that parses this in the class_parser.php file.
2017-08-25, 03:03 AM
(2017-08-21, 08:07 PM)Omar G. Wrote: [ -> ]Create your own custom MyCode to replace to simple img tags, use parse order -1.MyBB won't let me set that parse order value. It won't accept anything below zero.
(2017-08-23, 07:00 PM)Omar G. Wrote: [ -> ]Simply create a custom MyCode (probably using the same regex MyBB uses by core) to replace [img=400x400]URL[/img] to [img]URL[/img] before the actual core parsed tags run.Would you be kind to let us know what the code values would be? I'm barely even intermediate with MyBB. I've tried copying the regex exactly as it was coded from the file, but I don't know what value to replace it with. I tried using a basic IMG code, but that's what it literally showed up in posts.
That or, if you use Patches, just remove the line that parses this in the class_parser.php file.
Thanks.
2017-09-02, 07:22 AM
Still need help with this.
2018-03-28, 09:07 PM
It isn't working. I noticed that if I removed the options in Edit Options via usercp_options template to display images in posts, the normal bit of the code would work, but anyone trying a special dimension combination would get a URL in return. Is there a way I could then just have those kinds fall back to the normal code?
If a post is like this:
If a post is like this:
[img=800x600]URL[/img]
...then make it automatically like this:[img]URL[/img]
Thanks to the support in advance.