MyBB Community Forums

Full Version: Change function by plugin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm writing plugin, but don't know mybb has support replace function in library mybb?
Ex: function of mybb: format_name() . When write plugin, i can define format_name() ???

Thanks support!
This belongs in plugin support, and I don't exactly know what you're asking Confused
PHP does not have support for that. The closest is replacing class functions by making your own class, but even then you have to control whoever makes new instances of that class. So it could only works for classes, where MyBB uses only one instance of. And even then you don't know if there is some plugin that bypasses it.

So no. Not possible. If there isn't a suitable hook, bad luck.

You can always edit core files, though. Smile