Not a bug Event hint description..

refael

Well-known member
Not exactly a bug, but still..

Certain events take hints that can limit when the listener is run. This can result in performance improvements by loading the listener class in fewer cases. Individual events will list the value of the hint that will be passed in, if any.

The event hint description gives NONE info about the only thing that matters - the expected value for this field.
I had to dig into the code to understand.
 
I'm not sure what you're reporting exactly. As it says, the individual events will list the value of the hint. For example:

Event Hint: Name of the class that is being loaded.
 
I'm not sure what you're reporting exactly. As it says, the individual events will list the value of the hint. For example:
Yea I understood that after looking in the code..
But by "events will list the value" I can't really understand that the value should be a class name..
This is my experience at least.
 
Class name is: XenForo_Model_Post. There are hints for template, here you give the name of the template as hint. Such as: forum_view. Maybe the suggestion is to put an example hint like
  • "Event Hint: Name of the class that is being loaded. Example: XenForo_Model_Post"
  • "Event Hint: Name of the template that is being rendered. Example: forum_view"
 
I'm going to call this "not a bug" as it's debatable as to what may be clear vs what's not. I have tweaked the hint description to try to make it a little clearer though:
When certain events are triggered, they will be triggered with a hint. This hint can be used to limit your listener to only being executed when it's needed, increasing performance. If an event is triggered with a hint, the potential hint values will be listed in the event description above. If you specify a hint here, your listener will only be run if your hint matches the hint provided when the event is triggered.
 
Truth is, a simple example is all you need to understand xenForos addon system.

A very basic "Hello World" example with all different ways to accomplish a "Hello World" message on xenForo (accomplished with either: extending ControllerPublic, Template Edit, Template Modification, Callbacks etc.) would be very useful.
 
Top Bottom