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

Reply
 
Thread Tools Display Modes
  #11  
Old 06-23-2010, 12:24 AM
noppid noppid is offline
 
Join Date: Mar 2003
Location: Florida
Posts: 1,875
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Do a view source on your profile page where you select the option. See if yes is 0, 1 or 2 or whatever depending on your settings. each input will have a label and a value.

What type field is it, radio or menu?
Reply With Quote
  #12  
Old 06-23-2010, 12:26 AM
DieselMinded's Avatar
DieselMinded DieselMinded is offline
 
Join Date: Mar 2007
Posts: 1,655
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It is radio - Yes No

Here is the source

<fieldset class="fieldset">
<legend>Enable Cometchat Software?</legend>
<table cellpadding="0" cellspacing="3" border="0" width="100%">

<tr>
<td>If you are a Premium Member, Sponsor or Staff, You Can Use the Cometchat Software. It Adds a Bar to the bottom of the page and allows you to instantly chat with other users. Click YES if you want to use it or NO if you do not want to use it.</td>
</tr>
<tr>
<td>
<table cellpadding="2" cellspacing="0" border="0">
<tr><td valign="top"><label for="rb_cpf_field15_1"><input type="radio" name="userfield[field15]" value="1" id="rb_cpf_field15_1" checked="checked" />Yes</label></td><td valign="top"><label for="rb_cpf_field15_2"><input type="radio" name="userfield[field15]" value="2" id="rb_cpf_field15_2" />No</label></td></tr>

</table>
<input type="hidden" name="userfield[field15_set]" value="1" />
</td>
</tr>

</table>
</fieldset>
Reply With Quote
  #13  
Old 06-23-2010, 12:30 AM
noppid noppid is offline
 
Join Date: Mar 2003
Location: Florida
Posts: 1,875
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

HTML Code:
<if condition="$bbuserinfo[field15] == 1 AND THIS_SCRIPT != 'chat.php' 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>
If field 15 is yes, and the script is NOT chat.php, and the member is in these groups.

Of course chat.php must have define('THIS_SCRIPT', 'chat.php'); in it.
Reply With Quote
  #14  
Old 06-23-2010, 12:33 AM
KevinL KevinL is offline
 
Join Date: Apr 2005
Posts: 1,287
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PHP Code:
<if condition="$bbuserinfo[field15] == '1'">
<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> 
Also make sure that the cometchat is actually defined as 'chat' otherwise you have to change that to what ever it is defined as.

If you get rid of that line then it will be on all pages


EDIT:

Or use his it is cleaner
Reply With Quote
  #15  
Old 06-23-2010, 12:33 AM
DieselMinded's Avatar
DieselMinded DieselMinded is offline
 
Join Date: Mar 2007
Posts: 1,655
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

its not showing at all even with a visit to the edit options page and hitting save

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

the chat that im not showing the Cometchat on is the Addonchat page , VBSEO is not showing on the Chat Page with chat.php added to the exclude list so chat.php must be the script
Reply With Quote
  #16  
Old 06-23-2010, 12:36 AM
noppid noppid is offline
 
Join Date: Mar 2003
Location: Florida
Posts: 1,875
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The condition is set to this in post 13...

If field 15 is yes, and the script is NOT chat.php, and the member is in these groups.

Of course chat.php must have define('THIS_SCRIPT', 'chat.php'); in it.
Reply With Quote
  #17  
Old 06-23-2010, 12:37 AM
DieselMinded's Avatar
DieselMinded DieselMinded is offline
 
Join Date: Mar 2007
Posts: 1,655
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by noppid View Post
HTML Code:
<if condition="$bbuserinfo[field15] == 1 AND THIS_SCRIPT != 'chat.php' 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>
If field 15 is yes, and the script is NOT chat.php, and the member is in these groups.

Of course chat.php must have define('THIS_SCRIPT', 'chat.php'); in it.
Thats EXACTLY what im looking for but its not showing up at all with this code

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

chat.php has

define('THIS_SCRIPT','chat');

in it
Reply With Quote
  #18  
Old 06-23-2010, 12:40 AM
noppid noppid is offline
 
Join Date: Mar 2003
Location: Florida
Posts: 1,875
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

P.S. I'm not so sure about those paths to the css and js either. Make sure they are correct in view source. See if they show at all in the view source. It may be there but not working due to a bad path.

Do this then for the chat condition....

HTML Code:
<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>
Reply With Quote
  #19  
Old 06-23-2010, 12:43 AM
DieselMinded's Avatar
DieselMinded DieselMinded is offline
 
Join Date: Mar 2007
Posts: 1,655
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Im sorry but nothing is showing for

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

Please dont give up
Reply With Quote
  #20  
Old 06-23-2010, 12:45 AM
noppid noppid is offline
 
Join Date: Mar 2003
Location: Florida
Posts: 1,875
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK, update to the code in post 18 to fix the chat part.

Then go to a page the code should run on and view source. See if you can find: <!-- CometChat Footer Code Start -->

If it's there, the condition is working, but the css and js paths are wrong as I suspect perhaps. Post the code you see so we can review those paths?

Where is the cometchat folder on your site?

If you have to, echo out the custom field by putting this in the template..

Field15 = $bbuserinfo[field15]<br />
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:14 AM.


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.04978 seconds
  • Memory Usage 2,271KB
  • 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
  • (3)bbcode_html
  • (1)bbcode_php
  • (1)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
  • (3)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