an error with my add-on

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:
<xen:if is="{xen:helper ismemberof, $visitor, @groupes_bouton_1}"><input type="submit" class="button primary" value="@titre_bouton_1" onclick="var bouton_1 = $('input#taigachat_message').val($('#taigachat_message').focus().val()+'@bouton_1');@option_bouton_1"></xen:if>
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:
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.
 
It's valid style property syntax, but you may want to try it's alternative:

Code:
{xen:helper ismemberof, $visitor, {xen:property groupes_bouton_1}}

Only other thing I can think of is:
Code:
{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:
Code:
{xen:helper ismemberof, $visitor, 1, 2, 3, 4}
... would be valid.
 
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.
 
Top Bottom