Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #21  
Old 02-24-2005, 03:33 PM
AshAbed AshAbed is offline
 
Join Date: Nov 2003
Posts: 120
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How about this...
I have a profile field with a dropdown list where a member chooses the state they live in. I want a conditional that says 'if user selected choice #__ in profile field #__.'

Thanks.
Reply With Quote
  #22  
Old 02-24-2005, 03:37 PM
kall's Avatar
kall kall is offline
 
Join Date: Apr 2004
Location: New Zealand
Posts: 2,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by AshAbed
How about this...
I have a profile field with a dropdown list where a member chooses the state they live in. I want a conditional that says 'if user selected choice #__ in profile field #__.'

Thanks.
Code:
<if condition="$var[fieldX]">do stuff</if>
I think.

$var would be $post or $bbuserinfo or whatever.
Reply With Quote
  #23  
Old 02-24-2005, 10:35 PM
neocorteqz's Avatar
neocorteqz neocorteqz is offline
 
Join Date: May 2002
Location: Barefoot Bay Fl
Posts: 473
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kall
Code:
<if condition="$var[fieldX]">do stuff</if>
I think.

$var would be $post or $bbuserinfo or whatever.
For fields in profile it's $bbuserinfo.

and yes that is the conditional

HTML Code:
<if condition="$bbuserinfo[fieldX]">Some code here </if>
If the user didn't selct a certain choice you don't want displayed, I'mnot exactly sure what you do. I know you can exlude code by != But I'mnot exactly sure how one would excluse a profile field that is notstatic.
Reply With Quote
  #24  
Old 02-24-2005, 11:36 PM
AshAbed AshAbed is offline
 
Join Date: Nov 2003
Posts: 120
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I made it so the users must select a choice upon registration. Lets say they chose '7' and the field's ID is '15'... what would be the code to display something for a user with that selected?
Reply With Quote
  #25  
Old 02-25-2005, 03:06 AM
T3MEDIA T3MEDIA is offline
 
Join Date: Dec 2004
Posts: 944
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by neocorteqz
$bbuserinfo[field20]
This only works on areas where the logged in user is. I want a varable. say userid 2555 field 20 this is what I mean. How can you do that?
Reply With Quote
  #26  
Old 04-18-2005, 01:20 AM
DavidatMPA DavidatMPA is offline
 
Join Date: Oct 2004
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yep, gotta love the search, GREAT thread!
Reply With Quote
  #27  
Old 09-23-2005, 12:38 PM
dutchbb dutchbb is offline
 
Join Date: Nov 2003
Posts: 899
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry to bump this but:

I want to show code in a certain thread. So I use the threadID

How do I define the conditional for a threadid?
Reply With Quote
  #28  
Old 10-06-2005, 11:38 AM
T3MEDIA T3MEDIA is offline
 
Join Date: Dec 2004
Posts: 944
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by T3MEDIA
This only works on areas where the logged in user is. I want a varable. say userid 2555 field 20 this is what I mean. How can you do that?
light bump to refresh my first question.

SO if say YOU are looking at my page you can see visually my field 20.
So I am asking how to pull up.... say... my userid... not yours... (as in bbuser) and find field 20
Reply With Quote
  #29  
Old 10-23-2005, 01:13 PM
Yorixz Yorixz is offline
 
Join Date: Jun 2005
Location: Netherlands
Posts: 284
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Might be a little late for a reaction but still; I'm wondering if there's also a $post variable available that contains the name of the usergroup as person is in. In fact it would be similar to the "Group:" you got with IPB, I just don't feel like putting up 10 conditionals for every usergroup I've got...
I want to be able to let people edit their usertitle without having trouble with users acting like they're a staffmember.
Reply With Quote
  #30  
Old 04-07-2007, 11:17 PM
perju perju is offline
 
Join Date: Feb 2007
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This thread is great. Can somone provide a list for the $post array?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:02 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.06083 seconds
  • Memory Usage 2,259KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)bbcode_html
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete