vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Please take a second and help me with this if conditional (https://vborg.vbsupport.ru/showthread.php?t=245087)

DieselMinded 06-23-2010 12:50 AM

cometchat folder is on root dir

Header of site has
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script>jqcc=jQuery.noConflict(true);</script>
at the top

and footer has
<if condition="$bbuserinfo[field15] == 1 AND THIS_SCRIPT != 'chat' AND 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>
at the bottom

dont see footer code on page source

noppid 06-23-2010 12:55 AM

echo out the custom field by putting this in the template..

Field15 = $bbuserinfo[field15]<br />

See if you can find that in the source code view.

DieselMinded 06-23-2010 12:57 AM

like put

Field15 = $bbuserinfo[field15]<br />

at the bottom of the forum home?

noppid 06-23-2010 01:00 AM

Quote:

Originally Posted by DieselMinded (Post 2057796)
like put

Field15 = $bbuserinfo[field15]<br />

at the bottom of the forum home?

correct.

DieselMinded 06-23-2010 01:03 AM

well ill try that right now but fyi with

<if condition="THIS_SCRIPT != 'chat' AND 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>

i got the bar back and its showing to the right people but its showing on the chat page still


Ill change it back and run your test

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

Footer now has

<if condition="$bbuserinfo[field15] == 1 AND THIS_SCRIPT != 'chat' AND 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>
Field15 = $bbuserinfo[field15]<br />

in it and the source code is...

Field15 = Yes<br /><script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-1620004-1";
urchinTracker();

noppid 06-23-2010 01:11 AM

OK, the answer is being parsed to how you spelled Yes when creating the field.

So, I blew it. Try this...

HTML Code:

<if condition="$bbuserinfo[field15] == 'Yes' AND THIS_SCRIPT != 'chat' AND 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>


Boofo 06-23-2010 01:16 AM

Quote:

Originally Posted by DieselMinded (Post 2057765)
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?

Didn't you change YES to Yes? ;)

DieselMinded 06-23-2010 01:24 AM

THANK YOU THANK YOU !

i also surrounded the header code in the conditional to keep if from loading when it wasnt needed

the final answer was

<if condition="$bbuserinfo[field15] == 'Yes' AND THIS_SCRIPT != 'addonchat' AND is_member_of($bbuserinfo, 5, 7, 6, 16, 12, 11, 17, 10, 13, 9)">STUFF</if>

noppid Please PM me your pay pal for a donation

noppid 06-23-2010 01:28 AM

Glad to help. Sorry it took so long. I forgot about the parsing of the options, but remembered the form.

DieselMinded 06-23-2010 01:48 AM

Thanks Again $ Sent , More people should donate to people who help them and maybe more people would help others on here


All times are GMT. The time now is 12:22 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.01128 seconds
  • Memory Usage 1,745KB
  • 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_html_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete