MyBB Community Forums

Full Version: Javascript conversions
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Just a quick question. I notice that mybb uses moo.ajax and prototype.lite.

I would like to use the full mootools framework and the current code is incompatable.

How much work d'you think I'd need to put in? (and, if possible, which files would I need to edit?)

Thanks for your time

(oh and before any fingers are pointed, I don't just want it for the pretty effects, I like the class structure mechanisms)
You could just attach the moo library and call it a different name?
I plan on doing that with the prototype library. MyBB only has a cut down version of it Sad
nah, all of the mybb scripts are coded using prototype functions for everything except ajax (which is already in moo format ^_^).

I'm getting there, It took me nearly an hour to do the popup menu script though, because of the lack of an equivelent for event.observe in moo.v1. But I managed to do quite a long winded way of achieving the same effect.


so far I've made:
popup_menu.moo.js
general.moo.js
inline_edit.moo.js
thread.moo.js
editor.moo.js

p.s. only tested in firefox as of yet
Quote:because of the lack of an equivelent for event.observe in moo.v1
That's primarily the reason we aren't using mootools.

That and 1.4 will take advantage of some additional features of the Prototype.js library - we've created our own stripped down version of it.

Have you looked at using moo.fx? Made by the same people, just designed for effects and works with everything we've already got (should be in the MyBB distribution too)
yeah, but I really like the class structure and small overheads of the mootools librairy.

and this is going to be a fun task for me when I upgrade >_<.

nah, It's good experience anyway. I'll probably have all of the scripts converted by the weekend.

another advantage of mootools is you can go onto the site and scale down the size of the script depending on what you actually want. I'm sure there's a load of people that don't even know what JSON is let alone want to use it, but its there to be added if you do.

wait a month and a half(ish) and I'll show you what a mootools powered mybb can do ^_^
I'm basically done (I just need to test it in all the browsers).

In the end I scrapped my initial method of completely converting everything.

I decided to use the cnet.mootools librairies as they have written a prototype.compatability.js class. So I only had to make fairly minor changes to the files.

Would you like a copy?

btw, the cnet libs are written in modules just like mootools, they just lack a fancy construction mechanism. you have to do it by hand and then use /packer/ to compress them. (a full mootools and mootools.cnet + prototype.compatability (without plugins) is about 47k)