1. 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

Discussion in 'XenForo Suggestions' started by Chris D, Jun 30, 2013.

  1. Chris D

    Chris D XenForo Developer Staff Member

    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.
  2. Marcus

    Marcus Well-Known Member

    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/
  3. digitalpoint

    digitalpoint Well-Known Member

    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.


    xf_phantom likes this.
  4. Chris D

    Chris D XenForo Developer Staff Member

    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 :)

    xf_phantom likes this.
  5. xf_phantom

    xf_phantom Well-Known Member

    nice idea, i'm going to use probably something like
      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^^
    Chris D likes this.

Share This Page