Quote:
Originally Posted by MarcoH64
What kind of code you need to have executed. Please give us some more info on what you are trying to achieve.
|
It?s not a secret

The code is the template "subscription_availablebit"
I want to do some subscriptions avalaible only for some usergroups but now the problem is not the code, the problem is that values I get in php for $forusergroups are not valid in the conditional of the template, perhaps I need to "addslashes" it or something similar.
I have post a service request for this hack in
https://vborg.vbsupport.ru/showthread.php?t=81287 but I have not luck so I try to do myself. It?s not easy because I am not a coder.
Thanks for your help
If I put in file.php
PHP Code:
$forusergroups = '4,5,6'
the conditional in the template
Code:
4) <if condition="is_member_of($bbuserinfo, $forusergroups)">OK for variable <else /> FAIL </if>
The conditional works with $bbuserinfo = 6, by example.
So, I think what is wrong if the forrmat of values I get from database in "$forusergroups = $case['forusergroups'];". The values are correct but not the format.