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

an error with my add-on

Discussion in 'XenForo Development Discussions' started by aZoTe, Mar 15, 2014.

  1. aZoTe

    aZoTe Member

    hello, I have a problem when adding a known my add-on function:
    This add-on to create buttons at the top of the taigachat and I would allow a person to enter the id groups that can see the buttons, so I replaced the id groups my code with a style property:
    when I returned one id, it works perfectly, but when I returned two ids or more, there is only the first id returned that works, I've tried everything ..: (
    Last edited: Mar 15, 2014
  2. Jeremy

    Jeremy Well-Known Member

    If it is an input text field, it is most likely sent as a string back to the template. Is it a XenForo option? ALso, @groups_bouton_1 is not standard XF syntax.
  3. Chris D

    Chris D XenForo Developer Staff Member

    It's valid style property syntax, but you may want to try it's alternative:

    {xen:helper ismemberof, $visitor, {xen:property groupes_bouton_1}}
    Only other thing I can think of is:
    {xen:helper ismemberof, $visitor, {xen:raw {xen:property groupes_bouton_1}}}
    ... but I don't think anything would be escaped here so raw output shouldn't make a difference.

    If the contents of that field is a comma separated string, I'm pretty sure it should evaluate that correctly because:
    {xen:helper ismemberof, $visitor, 1, 2, 3, 4}
    ... would be valid.
    Jeremy likes this.
  4. aZoTe

    aZoTe Member

    @ groupes_bouton_1 is a syntax style property.
  5. Jeremy

    Jeremy Well-Known Member

    I wasn't actually thinking it was a style property. I don't actively add them for options of my add-ons. Didn't click.

Share This Page