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 01-05-2010, 02:56 PM
Mythotical Mythotical is offline
 
Join Date: Jun 2004
Location: Booneville, AR, USA
Posts: 1,428
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No worries, sleep was calling me too.

I am missing something here, I know I am. I just can't put my finger on it.

Maybe I should move the if condition to the plugin instead. I am searching all forums dealing with vB coding for that warning and I'm still reading threads.
Reply With Quote
  #12  
Old 01-05-2010, 03:06 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am stumped. I mean, our code looks almost identical and yet mine works and I do not get that error. Try really shortening it just to see what happens...

HTML Code:
<if condition="in_array($foruminfo['forumid'], $pl9_quoteloc)">
And did you try spitting out those variables? And did you check you data type for the field?
Reply With Quote
  #13  
Old 01-05-2010, 03:15 PM
Mythotical Mythotical is offline
 
Join Date: Jun 2004
Location: Booneville, AR, USA
Posts: 1,428
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Interesting, if I spit out $pl9_quoteloc it returns:
Code:
Array
And $vboptions[pl9_qloc] returns:
Code:
1,2,3,31,4,5,6,7,8,9,23,10,24,11,25,12,26,13,27,14,15,28,16,29,17,30,18,19,20,21,22
So this is very very interesting considering it works for you but not me.
Reply With Quote
  #14  
Old 01-05-2010, 04:58 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

And $pl9_quoteloc *should* return an array and it *should* work in that condition. Did you try just using the one simple condition? If you get the error, have you tried just telling it to use it anyway and seeing what happens? (And yes, I get the same results you do - Array for the first variable and the string of forumids if I print out the other.)
Reply With Quote
  #15  
Old 01-05-2010, 06:06 PM
Mythotical Mythotical is offline
 
Join Date: Jun 2004
Location: Booneville, AR, USA
Posts: 1,428
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yep I tried the one simple condition. I have saved it and told it to use it anyway and it still works so I don't see the problem.

I have discovered something though. If I change it to include array() like so:
HTML Code:
in_array($foruminfo['forumid'], array($pl9_quoteloc))
It saves without that Warning but if I remove array() it gives the warning.
Reply With Quote
  #16  
Old 01-05-2010, 06:11 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

But it doesn't work like that, right?

Try printing out $foruminfo['forumid'] also and see what prints out. Also, did you ever check the data type of the option and see if it is set to Free?
Reply With Quote
  #17  
Old 01-05-2010, 06:23 PM
Mythotical Mythotical is offline
 
Join Date: Jun 2004
Location: Booneville, AR, USA
Posts: 1,428
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Right, it stops working as soon as I add array()

I tried printing $foruminfo['forumid'] and it caused my if condition to stop working so I had to move that inside the if condition and it prints out the forum id properly.
Reply With Quote
  #18  
Old 01-05-2010, 06:32 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Steve M View Post
I tried printing $foruminfo['forumid'] and it caused my if condition to stop working so I had to move that inside the if condition and it prints out the forum id properly.
That is weird. It should print it out (as $foruminfo[forumid] <- no single quotes).

Quote:
Also, did you ever check the data type of the option and see if it is set to Free?
!!!!!

Seriously, please check that. I've said it a couple of times now.
Reply With Quote
  #19  
Old 01-05-2010, 06:44 PM
Mythotical Mythotical is offline
 
Join Date: Jun 2004
Location: Booneville, AR, USA
Posts: 1,428
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh sorry, I keep forgetting to mention that, yeah I checked it and it is set to Free.

Also I am using $foruminfo[forumid] without single quotes as well. The warning is referring to $pl9_quoteloc portion.

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

You know what, let me try this on my fresh vb test site.
Reply With Quote
  #20  
Old 01-05-2010, 06:49 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When I set the option to Numeric on my site, I get the exact problem you get - it only works for the first forumid. That's why I emphasized you needing to verify that datatype.
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 06:07 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.04487 seconds
  • Memory Usage 2,258KB
  • 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
  • (2)bbcode_html
  • (2)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
  • (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_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