vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=242)
-   -   vB4 Template Conditionals List (https://vborg.vbsupport.ru/showthread.php?t=231525)

g00gl3r 03-25-2014 05:25 PM

If you want to show something to somebody with less than 10 posts, what's the conditional for that?

bzcomputers 03-26-2014 03:43 AM

Quote:

Originally Posted by g00gl3r (Post 2489484)
If you want to show something to somebody with less than 10 posts, what's the conditional for that?

This should do it.

Code:

<vb:if condition="$vbulletin->userinfo['posts'] < 10">
YOUR CODE HERE
</vb:if>


biftek 03-31-2014 03:40 AM

Code:

<vb:if condition="!is_member_of($bbuserinfo, 11)"><strong><bold><font color="#FF6600"> Supporter</font color></bold>
</strong></vb:if>


does that code look right?

TheLastSuperman 03-31-2014 11:17 AM

Quote:

Originally Posted by biftek (Post 2490572)
Code:

<vb:if condition="!is_member_of($bbuserinfo, 11)"><strong><bold><font color="#FF6600"> Supporter</font color></bold>
</strong></vb:if>


does that code look right?

Try:
Code:

<vb:if condition="!is_member_of($bbuserinfo, 11)"><span style="color:#FF6600;font-weight:bold;"> Supporter</span></vb:if>
The !is means that it this condition is read as "If the user is not a member of usergroup #11 allow them to see this".

furnival 04-16-2014 08:54 PM

This works and should replace the non-working code given in the first post. Thank you Alp Ozdemir!
Quote:

Originally Posted by Alp Ozdemir (Post 1991194)
Try this;

Code:

<vb:if condition="in_array($foruminfo[forumid], array(x,y,z))">
code here!
</vb:if>



M.C. 05-24-2014 09:15 AM

hello! I want to show in some groups (1,2,3,4,5,6) postbit banner but don't know how to do it as this conditions are only to show TO groups but not FROM groups :( please help!

vbxmod 05-24-2014 02:56 PM

Quote:

Originally Posted by M.C. (Post 2499183)
hello! I want to show in some groups (1,2,3,4,5,6) postbit banner but don't know how to do it as this conditions are only to show TO groups but not FROM groups :( please help!

Try this:
Code:

<vb:if condition="is_member_of($bbuserinfo, 1,2,3,4)">Content here</vb:if>

el3reef 05-26-2014 10:25 PM

$bbuserinfo['userid']

or

$vbulletin->userinfo['userid']

not work in vb4 :(

tbworld 05-26-2014 11:10 PM

Please post your whole conditional statement and associated references.

What template?
What line number in that template?
What version of vBulletin?

There is no way we can determine anything from the data you have given us. :(

M.C. 05-29-2014 08:30 AM

Quote:

Originally Posted by vbxmod (Post 2499222)
Try this:
Code:

<vb:if condition="is_member_of($bbuserinfo, 1,2,3,4)">Content here</vb:if>

This condition to show content TO usergroups in list but I want to show content if post FROM usergroup...

tbworld,

here is example: http://www.rcgroups.com/forums/showt...16#post7877841

this is vb3 forum but...

I want in postbit_legacy template for some groups add banner and change background as it's done in above forum

So my code should look like:

<div id="postbit_legacy_left">
avatar...
info...
<vb:if condition="IF USER WHO POST THIS FROM GROUPS: IDs OF PREMIUM GROUPS (1,2,3)">HERE COMES BANNER CODE</vb:if>
</div>

is it more clear now? Thanks ;)


All times are GMT. The time now is 10:14 PM.

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

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01534 seconds
  • Memory Usage 1,741KB
  • 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
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete