vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   IF conditional concatenation help (https://vborg.vbsupport.ru/showthread.php?t=269605)

Simon Lloyd 09-03-2011 02:37 PM

IF conditional concatenation help
 
Hi all, i'm trying to write an if condition to show an item to all usergroups except one but onlly in certain foorums, is this how it's done?
HTML Code:

<if condition="!is_member_of($bbuserinfo, X)"AND if condition="in_array($forumid, array(X,Y,Z))">

kh99 09-03-2011 02:44 PM

Almost, try this:

Code:

<if condition="!is_member_of($bbuserinfo, X) AND in_array($forumid, array(X,Y,Z))">

Simon Lloyd 09-03-2011 02:59 PM

Thanks for your reply, i tried that (and my version) and i still cannot get the link im trying to show in the postbit!

Here's what i have
HTML Code:

<if condition="!is_member_of($bbuserinfo, 1) AND in_array($forumid, array(13,65,66,67,68,69,54,95))">
<a href="http://www.thecodecage.com/forumz/">Formula Language Convertor</a>
</if>


Badshah93 09-03-2011 03:19 PM

try $post[forumid] in place of $forumid

Simon Lloyd 09-03-2011 03:32 PM

Thanks for that too
HTML Code:

<if condition="!is_member_of($bbuserinfo, 1) AND in_array($post[forumid], array(13,65,66,67,68,69,54,95))">
didn't do the trick neither, i have confirmed that i can show the div with the link by removing the condition but employing it makes it invisible!

Badshah93 09-03-2011 03:40 PM

Ok try this (i have tested, its working fine)

PHP Code:

<if condition="!is_member_of($bbuserinfo, 1) AND in_array($thread[forumid], array(4,2,3))">
//code
</if> 


Simon Lloyd 09-03-2011 03:52 PM

Yep that was it, thanks :)


All times are GMT. The time now is 03:56 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.01022 seconds
  • Memory Usage 1,723KB
  • 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
  • (1)bbcode_code_printable
  • (3)bbcode_html_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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