• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Indicate an event hint has been defined in the Code Event Listeners list

Chris D

XenForo developer
Staff member
#1
As per title, would be useful if the Code Event Listeners list "snippet" contained text to indicate the Event Hint that has been used for each Listener.

Probably useful to see it at a glance rather than having to peek into the listener. On my own install, I have used an admin template mod to change the snippet to display the event hint rather than the description.

An alternative would be displaying it in a Tooltip.
 

Marcus

Well-known member
#2
The event hint is doing now what all the switch clauses did in the listeners, hence there are much more hints per addon. It would be really useful to display the hints in admin.php?code-event-listeners/
 

digitalpoint

Well-known member
#3
I had the same suggestion, but I ended up just using the description for them. Not ideal if you use the descriptions for other things, but for me it worked since I wasn't using the descriptions for anything else.

Example:

upload_2013-8-19_12-59-12.png
 

Chris D

XenForo developer
Staff member
#4
That's basically what I've done for my own install, but it's actually a template mod that replaces snippet="{$event.description}" with snippet="{$event.hint}" (or whatever the code is) so I don't have to type anything extra in the Description field :)

upload_2013-8-19_21-25-42.png
 

xf_phantom

Well-known member
#5
nice idea, i'm going to use probably something like
PHP:
  parent::_preSave();
  if ($this->isInsert() && $this->get('hint') != ''){
  $this->set('description', $this->get('hint') . ' ' . $this->get('description')  );
  }
because i don't want to miss the description^^


edit: another way would be a small js snippet, that copies the hint value into the description field if it's empty^^