vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Need Help With If Condtions (https://vborg.vbsupport.ru/showthread.php?t=327895)

puertoblack2003 03-27-2020 09:44 PM

Need Help With If Condtions
 
well it's been awhile, and I can not find any one my reference documents i put together. But I restored one of my forum and adding some mods.

What I'm trying to do is give the user the option to show or hide the the whoisonline section to minimize space at the footer. I did this before on the last forum.

this is what I have
Quote:

<if condition="is_member_of($bbuserinfo, 2,3,4,5,6,7,8,16,88,96)"><if condition="$post[field26] == 'Yes' ">
now this setup when it did it worked, I know I missing something I already have the profile field setup and the option to turn on or off in usercp. can someone look at it and see what i did wrong.

oh and I'm on vb v3.8 :o

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

Quote:

Originally Posted by puertoblack2003 (Post 2602391)
well it's been awhile, and I can not find any one my reference documents i put together. But I restored one of my forum and adding some mods.

What I'm trying to do is give the user the option to show or hide the the whoisonline section to minimize space at the footer. I did this before on the last forum.

this is what I have now this setup when it did it worked, I know I missing something I already have the profile field setup and the option to turn on or off in usercp. can someone look at it and see what i did wrong.

oh and I'm on vb v3.8 :o

never mined i remember i had to use $bbuserinfo and not $post. its working

TheLastSuperman 04-09-2020 05:10 PM

This was the droid, you were looking for! vB3 Conditionals:
https://vbulletin.org/forum/showthread.php?t=215032

For those browsing this thread but wanting vB4 Conditionals, reference this:
https://vbulletin.org/forum/showthread.php?t=231525

puertoblack2003 04-09-2020 07:30 PM

Quote:

Originally Posted by TheLastSuperman (Post 2602513)
This was the droid, you were looking for! vB3 Conditionals:https://vbulletin.org/forum/showthread.php?t=215032

For those browsing this thread but wanting vB4 Conditionals, reference this:
https://vbulletin.org/forum/showthread.php?t=231525


thanks, i ended up with this
Code:

<if condition="is_member_of($bbuserinfo, 2,3,4,5,6,7,8,16,88,96)"><if condition="$bbuserinfo[field26]  == 'Yes' ">
the on and off switch works now. its been a while :)


All times are GMT. The time now is 06:36 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.01149 seconds
  • Memory Usage 1,719KB
  • 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_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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