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

Reply
 
Thread Tools Display Modes
  #1  
Old 06-22-2010, 10:58 PM
DieselMinded's Avatar
DieselMinded DieselMinded is offline
 
Join Date: Mar 2007
Posts: 1,655
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Please take a second and help me with this if conditional

Why Wont this work?
PHP Code:
<if condition="$bbuserinfo[field15] == 'YES">
<if 
condition="THIS_SCRIPT != 'chat.php"
<if 
condition="is_member_of($bbuserinfo, 5, 7, 6, 16, 12, 11, 17, 10, 13, 9)">
<!-- 
CometChat Footer Code Start -->
<
link type="text/css" rel="stylesheet" media="all" href="/cometchat/cometchatcss.php" charset="utf-8" />
<
script type="text/javascript" src="/cometchat/cometchatjs.php" charset="utf-8"></script>
<!-- 
CometChat Footer Code End -->
</if></if></if> 
--------------- Added [DATE]1277251795[/DATE] at [TIME]1277251795[/TIME] ---------------

How about this ??

PHP Code:
<if condition="$bbuserinfo[field15] == 'YES' AND "THIS_SCRIPT != 'chat.php' AND "is_member_of($bbuserinfo, 5, 7, 6, 16, 12, 11, 17, 10, 13, 9)">STUFF</if> 
will that work?
Reply With Quote
  #2  
Old 06-22-2010, 11:25 PM
KevinL KevinL is offline
 
Join Date: Apr 2005
Posts: 1,287
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Maybe this?

PHP Code:
<if condition="$bbuserinfo[field15] == '15'">
<if 
condition="THIS_SCRIPT != 'chat'"
<if 
condition="is_member_of($vbulletin->userinfo, 5, 7, 6, 16, 12, 11, 17, 10, 13, 9)">
<!-- 
CometChat Footer Code Start -->
<
link type="text/css" rel="stylesheet" media="all" href="/cometchat/cometchatcss.php" charset="utf-8" />
<
script type="text/javascript" src="/cometchat/cometchatjs.php" charset="utf-8"></script>
<!-- 
CometChat Footer Code End -->
</if></if></if> 
--------------- Added [DATE]1277253035[/DATE] at [TIME]1277253035[/TIME] ---------------

No maybe this...

PHP Code:
<if condition="$bbuserinfo[field15] == '15'">
<if 
condition="THIS_SCRIPT == 'chat'"
<if 
condition="is_member_of($vbulletin->userinfo, 5, 7, 6, 16, 12, 11, 17, 10, 13, 9)">
<!-- 
CometChat Footer Code Start -->
<
link type="text/css" rel="stylesheet" media="all" href="/cometchat/cometchatcss.php" charset="utf-8" />
<
script type="text/javascript" src="/cometchat/cometchatjs.php" charset="utf-8"></script>
<!-- 
CometChat Footer Code End -->
</if></if></if> 
Reply With Quote
  #3  
Old 06-22-2010, 11:38 PM
DieselMinded's Avatar
DieselMinded DieselMinded is offline
 
Join Date: Mar 2007
Posts: 1,655
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Neither worked
Reply With Quote
  #4  
Old 06-22-2010, 11:46 PM
KevinL KevinL is offline
 
Join Date: Apr 2005
Posts: 1,287
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What if you got rid of the THIS_SCRIPT?

PHP Code:
<if condition="$bbuserinfo[field15] == 'YES'">
<if 
condition="is_member_of($vbulletin->userinfo, 5, 7, 6, 16, 12, 11, 17, 10, 13, 9)">
<!-- 
CometChat Footer Code Start -->
<
link type="text/css" rel="stylesheet" media="all" href="/cometchat/cometchatcss.php" charset="utf-8" />
<
script type="text/javascript" src="/cometchat/cometchatjs.php" charset="utf-8"></script>
<!-- 
CometChat Footer Code End -->
</if></if> 
hmmm
Reply With Quote
  #5  
Old 06-22-2010, 11:55 PM
DieselMinded's Avatar
DieselMinded DieselMinded is offline
 
Join Date: Mar 2007
Posts: 1,655
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

whole thing goes away , and yes i have field15 set to yes on my profile
Reply With Quote
  #6  
Old 06-23-2010, 12:03 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Check the field15 and see if yes is set as all caps. It needs to be EXACTLY as you entered it in the profile field setup.
Reply With Quote
  #7  
Old 06-23-2010, 12:11 AM
DieselMinded's Avatar
DieselMinded DieselMinded is offline
 
Join Date: Mar 2007
Posts: 1,655
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I went and toggled profile field 15 to no , then yes and it appears to be working with

<if condition="$bbuserinfo[field15] == 'Yes'">
<if condition="is_member_of($vbulletin->userinfo, 5, 7, 6, 16, 12, 11, 17, 10, 13, 9)">
<!-- CometChat Footer Code Start -->
<link type="text/css" rel="stylesheet" media="all" href="/cometchat/cometchatcss.php" charset="utf-8" />
<script type="text/javascript" src="/cometchat/cometchatjs.php" charset="utf-8"></script>
<!-- CometChat Footer Code End -->
</if></if>

But why did i have to toggle it?

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

even tho its Yes at default you have to go to edit options and hit save for it to show how can i fix that?
Reply With Quote
  #8  
Old 06-23-2010, 12:17 AM
noppid noppid is offline
 
Join Date: Mar 2003
Location: Florida
Posts: 1,875
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Did you create the custom field in the acp? If so, you are looking for an integer, not text.
Reply With Quote
  #9  
Old 06-23-2010, 12:20 AM
DieselMinded's Avatar
DieselMinded DieselMinded is offline
 
Join Date: Mar 2007
Posts: 1,655
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes i created the profile field in the admin cp , what do i need to do to get this on track , i got it working but you have to go to edit options and hit save for it to take , and still cant figure out how to keep it off chat.php
Reply With Quote
  #10  
Old 06-23-2010, 12:22 AM
KevinL KevinL is offline
 
Join Date: Apr 2005
Posts: 1,287
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well I had that in my first ones...and he said it didn't work. Maybe if he tries one of the first ones I said and took out THIS_SCRIPT part?
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 03:44 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.04194 seconds
  • Memory Usage 2,281KB
  • Queries Executed 13 (?)
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
  • (5)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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_postinfo_query
  • fetch_postinfo
  • 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