PDA

View Full Version : Hide button post thanks


4ngeluxpunk
09-28-2016, 03:08 AM
Good, I wish you can help me with the following I'm trying to hide the post thank button postbit_legacy to certain user groups and certain forums using conditional, but can not get it to work, and treated with the following sentence but I disappears the button at all forums.


http://image.prntscr.com/image/b4af1a1804214d74800132139f70ae97.png


<vb:if condition="!is_member_of($bbuserinfo, X,Y)">
{vb:raw template_hook.postbit_controls} //Do not show X, Y

<vb:elseif condition="$forum[forumid] != x" />
{vb:raw template_hook.postbit_controls} //Do not show in X forum

<vb:else />
{vb:raw template_hook.postbit_controls} //Show all groups and in all other forums

</vb:if>

I wish I can help with that sentence that I can not make it work.

Thank you.

MarkFL
09-28-2016, 04:45 AM
I think what you want is:

<vb:if condition="!is_member_of($bbuserinfo, X,Y) AND $forum[forumid] != x">
{vb:raw template_hook.postbit_controls}
</vb:if>

4ngeluxpunk
09-28-2016, 12:02 PM
I think what you want is:

<vb:if condition="!is_member_of($bbuserinfo, X,Y) AND $forum[forumid] != x">
{vb:raw template_hook.postbit_controls}
</vb:if>


Thank you very much for the prompt reply, I have also tested this conditional but put me away button post thanks in all categories and/or forums.

MarkFL
09-28-2016, 12:14 PM
Okay, try replacing $forum[forumid] with $forum['forumid'].

4ngeluxpunk
09-28-2016, 12:24 PM
Okay, try replacing $forum[forumid] with $forum['forumid'].

Similarly post thanks button is not displayed in other categories and/or forums.

Dragonsys
09-28-2016, 01:28 PM
You might need to enclose the x in quotes.

<vb:if condition="is_member_of($bbuserinfo, X,Y) AND $forum['forumid'] != 'x'">
{vb:raw template_hook.postbit_controls}
</vb:if>

4ngeluxpunk
09-28-2016, 01:59 PM
You might need to enclose the x in quotes.

<vb:if condition="is_member_of($bbuserinfo, X,Y) AND $forum['forumid'] != 'x'">
{vb:raw template_hook.postbit_controls}
</vb:if>

Thank you for your response, just as the place and does not appear in other categories and / or forums.

And if we take it otherwise, that user groups X, Y button to display the post in all forums thanks least X forum, would it?

<vb:if condition="is_member_of($bbuserinfo, X,Y) AND $forum['forumid'], array(1,2,3)">
{vb:raw template_hook.postbit_controls}
</vb:if>

Dragonsys
09-28-2016, 02:52 PM
Thank you for your response, just as the place and does not appear in other categories and / or forums.

And if we take it otherwise, that user groups X, Y button to display the post in all forums thanks least X forum, would it?

<vb:if condition="is_member_of($bbuserinfo, X,Y) AND $forum['forumid'], array(1,2,3)">
{vb:raw template_hook.postbit_controls}
</vb:if>

I think you need to use in_array

<vb:if condition="is_member_of($bbuserinfo, X,Y) AND in_array($forum['forumid'], array(1,2,3))">
{vb:raw template_hook.postbit_controls}
</vb:if>

4ngeluxpunk
09-28-2016, 03:10 PM
I think you need to use in_array

<vb:if condition="is_member_of($bbuserinfo, X,Y) AND in_array($forum['forumid'], array(1,2,3))">
{vb:raw template_hook.postbit_controls}
</vb:if>

Nothing with that run, believe it like that I use is the Theme Seamus?