MyBB Community Forums

Full Version: plugin file name?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Lets say i have 3 hooks in the plugin file which one should I use for:

function xxx_info() and file name xxx.php
the hook is not related to the file name. But the function is

so if you plugin was called sharknado then your plugin function would be called

sharknado_info()

However this is just for the standard required functions, you can name your other functions whatever you like as long as they don't conflict with other function names in mybb.

With that said it is best practice to
1 - name you functions something descriptive
2 - try and include your plugin name or a shortened name in there like snado_build_tornado() that way you can be assure of uniqueness
How cool is that thanks buddy very much really didn't know that Smile
Tasks however require the file name to match completely so once you go down that path keep it mind