MyBB Community Forums

Full Version: Understanding Hooks
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi developers,

Thanks for reading this thread. I have (very) recently got into MyBB and am already learning things at a fairly quick and fluid pace, however now I find myself with a problem I am unable to solve myself. I've been trying to learn about the hooks system and such that MyBB uses, and I think it's genius, however, I have a question. I'll put it across in the way in which I am having a problem.

I am making some core file edits to the plugin "NewPoints" to change it to suit the needs of my forum. I am now in the process of changing the language files to fit in text that I need shown. Now, for example, I am currently editing newpoints_home_desc which is the text displayed at /newpoints.php

By using the "{1}" hook in this description, it brings up the table of payments, what actions receive how many points, etc etc. How can I change these individual hooks? In the same language file, but a different field, using {1} brings up the amount of a donation to another user... I've looked through all files I can think of, admin side and cPanel side, to try and find where these hooks are stored but I cannot find them.

Essentially all I'd like to do is add a {2} hook to the newpoints_home_desc field which will display that users' current points... which apparently is not accomplishable in language files with the standard use of the "$mypoints" hook.

Any assistance or pointers as to where these hooks are located would be greatly appreciated. Wink

PS: To clarify, I am using MyBB 1.6.16 and NewPoints version 1.9.9.
this reply can be of some help [see also plugins guidance links]
@.m. that post is a big help, thank you very much, exactly what I needed. Really appreciate it, hopefully soon enough I'll know enough about MyBB to make & share my own creations! Smile