vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Hide button post thanks (https://vborg.vbsupport.ru/showthread.php?t=323536)

4ngeluxpunk 09-28-2016 03:08 AM

Hide button post thanks
 
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.




Code:

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

HTML Code:

<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

Quote:

Originally Posted by MarkFL (Post 2576355)
I think what you want is:

HTML Code:

<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

Quote:

Originally Posted by MarkFL (Post 2576362)
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.

Code:

<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

Quote:

Originally Posted by Dragonsys (Post 2576365)
You might need to enclose the x in quotes.

Code:

<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?

Code:

<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

Quote:

Originally Posted by 4ngeluxpunk (Post 2576367)
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?

Code:

<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

Code:

<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

Quote:

Originally Posted by Dragonsys (Post 2576371)
I think you need to use in_array

Code:

<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?


All times are GMT. The time now is 11:46 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01159 seconds
  • Memory Usage 1,737KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (7)bbcode_code_printable
  • (2)bbcode_html_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete