MyBB Community Forums

Full Version: Add custom PHP / template to member profile?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello there, I have struggled to grasp the MyBB's source code and constant use of the eval() and run_hooks functions.

I am trying to run an additional SQL query at runtime on user profiles, but I don't know how to get this working without making a plugin.

I have tried making plugins before without success. I find it frustrating it takes 600 lines of code just to get the hello.php sample plugin to work..

Help? Thank you...
Plugin is the best option.
The hello.php plugin is that long as it adds templates, settings, and has other logic - it's designed to be an example plugin that does a bit of everything plugins typically do as a demonstration/code example. You would likely only need one hook in your plugin to run your query, and probably wouldn't need to bother bundling the template in it as you could add it yourself.