MyBB Community Forums

Full Version: reputation_start hook
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I am requesting a reputation_start hook in reputation.php as one does not exist. There is one for reputation_end and for actions like do_add but not to start the page.

Thank you.
Workaround:

Use global_end. Check THIS_SCRIPT for == "reputation.php". Does that work for you?

Ryan
Yes I guess that would work I just find hooking there sloppy since it's going to be called every single page. Maybe 1.6?
Plugins are loaded on every single page, so the difference is kinda minimal.
But eh, probably a little sloppy still.
(2009-09-02, 09:27 AM)labrocca Wrote: [ -> ]Yes I guess that would work I just find hooking there sloppy since it's going to be called every single page. Maybe 1.6?


As Yumi said, the difference is probably only ever scientifically measurable in the milliseconds.
Yes but what about the standards of MyBB? Just about every page has a start and end hook. It's imho partially about consistency for plugin authors.
There is a reputation_end hook but I need a reputation_start hook and one does not exist.

If possible can this be added to future releases? I'd like to hook into that page with my own plugins before the rest of the page is executed.

ROOT/reputation.php in case you didn't figure it out.
I had noticed that as well btw but somehow I always forgot to mention it.
http://community.mybboard.net/thread-55535.html

Usable solution but it took me a while to figure out why my plugin wasn't working a few weeks ago, trying to use an non-existent hook, then remembered that other thread... would be good for consistency and to stop confusion though.
When I was developing around the template system, there is no hooks in ./admin/modules/style/themes.php at all. You can imagine what sort of headache that causes.

Unfortunately, there can't be hooks everywhere in MyBB. There are workarounds for the holes that are in the hook system though.
Pages: 1 2