MyBB Community Forums

Full Version: Few changes to MyCodes.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Well at first - I will use MyCodes or BBCodes names, so it's just to inform you (personally I prefer BBCode name, byt MyCode isn't bad too).

Okay. Now few changes that maybe should be considered?

1. Some kind of MyCode priority: I have added one mycode that adds download button and it has url inside it (without bbcode). When trying to parse it I get only url parsed, and my whole own bbcode is left as is. Maybe I'm doing something wrong, so I don't know. But even if I think that adding possibility to force some bbcodes to be earlier parsed than others would make parsing them much easier.

2. Add option to include additional php file to run MyCode: Right now form ACP we can add SIMPLE MyCodes based on regex. Option to just connect special small php script to run mycode is better than writting whole plugin just to do the same thing. Also these php files could be smaller and simpler than plugins also not so powerful. It should allow people to perform more complicated stuff like getting some values from MyBB (like user name with it's format).

3. Simpler way to add new selfmade MyCodes to editor: Right now it's based on adding them through templates or right inside javascript files of editorĀ and not always it is working properly. I had to modify url bbcode in editor just to make sure, that my new bbcode won't be parsed as URL (and these kind of things were happening all the time).

As for first "change" as I said, I can do something wrong, so if there's an option to make my own code to be invisible for other bbcodes then just tell me how to do it properly.
1. Will be fixed with MyBB 1.8.16 (moving parsing standalone URLs as the last step)
2. I've replaced MyBB's parser with my own recursive own, but MyBB 2.0 (possibly 1.9) will use a different framework and parser, so it's not worth making big changes to the parser for the 1.8 series.
3. There are plugins for adding buttons to the editor, but let's see how things play out for 1.9 and 2.0.
(2018-05-14, 08:46 PM)laie_techie Wrote: [ -> ]1. Will be fixed with MyBB 1.8.16 (moving parsing standalone URLs as the last step)
2. I've replaced MyBB's parser with my own recursive own, but MyBB 2.0 (possibly 1.9) will use a different framework and parser, so it's not worth making big changes to the parser for the 1.8 series.
3. There are plugins for adding buttons to the editor, but let's see how things play out for 1.9 and 2.0.

The bigger parser changes may happen in 1.10 rather than 1.9 (we don't want to just keep adding stuff to 1.9 and slow down its release even futher), but otherwise this is pretty much spot on.
Yeah, for first "change" I can confirm that there is some problem with parser. For now I have used other hooks and tweaked a little parsing part of MyBB.
As for second point: Well that was only suggestion to consider something like that - not adding to 1.8 (as for now 1.8 isn't current dev version, even 1.9 isn't going to get more new functions or changes, because right now 1.10 is most likely to be considered current development version).
Thanks for you replies.