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)

Gripi 06-06-2012 07:53 AM

hi..

i try to put this in the forumdisplay template, but no luck, anyone could help:

<vb:if condition="!in_array($forum['forumid'], array(1, 2))">not show to forumid 1 and 2</vb:if>

still showing to all forum ID, and i read from the 1st page this thread, lots of people got the same problem with me.

BirdOPrey5 06-06-2012 09:26 AM

Try using-

Code:

<vb:if condition="!in_array($foruminfo['forumid'], array(1, 2))">not show to forumid 1 and 2</vb:if>
Also, I've never seen a VB forum with a usable forumid 1. Usually 2 is the first usable forumid. 1 is the main category which doesn't work in such a conditional.

Gripi 06-06-2012 02:09 PM

ok..

one more thing..

how to make condition "show only to member that already had >= 50 post count" ?

<vb:if condition="$post['postcount'] >= 50"> now show to under 50 postcount</vb:if>

the command above wont work.

thanks

fly 06-06-2012 02:24 PM

Quote:

Originally Posted by Gripi (Post 2337134)
ok..

one more thing..

how to make condition "show only to member that already had >= 50 post count" ?

<vb:if condition="$post['postcount'] >= 50"> now show to under 50 postcount</vb:if>

the command above wont work.


thanks

Try:

<vb:if condition="$userinfo['postcount'] >= 50"> now show to under 50 postcount</vb:if>

Gripi 06-06-2012 02:29 PM

Quote:

Originally Posted by fly (Post 2337140)
Try:

<vb:if condition="$userinfo['postcount'] >= 50"> now show to under 50 postcount</vb:if>

hi..

not working too.. the command not show to all member.. not just member with under 50 post count

BirdOPrey5 06-06-2012 03:07 PM

The variable would be $bbuserinfo['posts'], not $userinfo['postcount'] in forumdisplay.

Gripi 06-06-2012 03:56 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2337159)
The variable would be $bbuserinfo['postcount'], not $userinfo['postcount'] in forumdisplay.

i want to put the command inside the "postbit_legacy", and the above command wont work too.

--------------- Added [DATE]1339003487[/DATE] at [TIME]1339003487[/TIME] ---------------

Quote:

Originally Posted by BirdOPrey5 (Post 2337055)
Try using-

Code:

<vb:if condition="!in_array($foruminfo['forumid'], array(1, 2))">not show to forumid 1 and 2</vb:if>
Also, I've never seen a VB forum with a usable forumid 1. Usually 2 is the first usable forumid. 1 is the main category which doesn't work in such a conditional.

just try this, not working in "ad_global_below_navbar" template too.

BirdOPrey5 06-06-2012 04:48 PM

Sorry the post count for a user is $bbuserinfo['posts']

for ad_global_below_navbar try $GLOBALS['forumid']

Gripi 06-07-2012 03:40 AM

thanks, globals works :)

stuartn 06-07-2012 03:03 PM

Code:

<vb:if condition="in_array($foruminfo[forumid], array(166,113,110,109,108))"></vb:if>
Works fine in mine...

--------------- Added [DATE]1339085022[/DATE] at [TIME]1339085022[/TIME] ---------------

Obviously the ! addition to the in_array has the reversed effect


All times are GMT. The time now is 11:23 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.09894 seconds
  • Memory Usage 1,742KB
  • 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
  • (3)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)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