vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Conditional question (https://vborg.vbsupport.ru/showthread.php?t=76500)

cinq 02-17-2005 01:34 PM

Conditional question
 
There's something wrong here.
How should I correct it ? :)

Code:

<if condition="$bbuserinfo[usergroupid]==6 || ($permissions['linkspermissions'] & CANEDIT) || ($permissions['linkspermissions'] & CANDEL)">
I think it's got to do with the parethsis ?

Marco van Herwaarden 02-17-2005 04:06 PM

i don't think you can use a bitwise AND (&) in a template.

cinq 02-18-2005 05:47 AM

Actually I think I got it solved, probably a missing closing </if> tag somewhere :D

Marco, I think it can be done :)

neocorteqz 02-18-2005 06:06 AM

well not to hijack the thread, but i have a question about array's,

now this is the normal if conditional I use in templates to select multiple usergroups.
HTML Code:

<if conditional="$bbuserinfo[usergroupid] == X OR $bbuserinfo[usergroupid] == Y">
Some code here
</if>

How would I make than an array instead so i can shorten the code and clean it up a bit, instead of having to type the long way? :)


Thanks.

Also i though PHP was only allowed to be used in the phpinclude_ templates. Is this not true?

cinq 02-18-2005 06:08 AM

is_member_of , or in_array, perhaps ? :)

neocorteqz 02-18-2005 06:11 AM

Quote:

Originally Posted by cinq
is_member_of , or in_array, perhaps ? :)

HTML Code:

<if condition="is_member_of($usergroupid,X,Y,Z)">

that right? Still a novice coder. :)


Edit, no spaces or it complains, but that works. :)

cinq 02-18-2005 06:14 AM

Quote:

Originally Posted by neocorteqz
Thanks.

Also i though PHP was only allowed to be used in the phpinclude_ templates. Is this not true?

http://www.vbulletin.com/docs/html/m...n_conditionals
:)

Quote:

Originally Posted by neocorteqz
HTML Code:

<if conditional="$bbuserinfo[usergroupid] == X OR $bbuserinfo[usergroupid] == Y">
Some code here
</if>


Btw the way I think it should be condition and not conditional :)

Or just refer here

neocorteqz 02-18-2005 06:20 AM

Quote:

Originally Posted by cinq
http://www.vbulletin.com/docs/html/m...n_conditionals
:)



Btw the way I think it should be condition and not conditional :)

Or just refer here

i just noticed that.. that was a typo.

thanks.


All times are GMT. The time now is 10:04 AM.

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.01183 seconds
  • Memory Usage 1,731KB
  • 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
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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