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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-28-2008, 03:11 AM
petteyg359 petteyg359 is offline
 
Join Date: Dec 2007
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Dynamic code for collapsible boxes error on ']'

I get the error "Parse error: syntax error, unexpected '"', expecting ']' in /home/dysplace/public_html/eve-ocf/eveit.php on line 161" when trying to run
PHP Code:
$corp "ocf";
$ocfapidata "<tbody><tr><td class=\"thead\" colspan=\"3\"><a style=\"float:".$stylevar[right]."\" href=\"#top\" ";
$ocfapidata .= "onclick=\"return toggle_collapse('359_eveit_".$i."')\"><img id=\"collapseimg_359_eveit_".$i."\" ";
//OFFENDING LINE BELOW
$ocfapidata .= "src=\"".$stylevar[imgdir_button]."/collapse_thead$vbcollapse[collapseimg_359_eveit_".$i."].gif\" alt=\"\" ";
//OFFENDING LINE ABOVE
$ocfapidata .= "border=\"0\" /></a>".$attr[$corp]['charactername']."</td></tr></tbody><tbody id=";
$ocfapidata .= "\"collapseobj_359_eveit_".$i."\" style=\"\$vbcollapse[collapseobj_359_eveit_".$i."]\"><tr><td class=\"alt1\$
$ocfapidata .= "Character: <font color=\"#FF7800\">".$attr[$corp][$i]['charname']."</font><br />";
$ocfapidata .= "</font></td><td class=\"alt1\">";
$ocfapidata .= $skills[$sit[$corp][$i]['trainid']]['name'];
$ocfapidata .= " ".$sit[$corp][$i]['trainto']."</td><td class=\"alt1\">".$sit[$corp][$i]['trainleft']."</td></tr>";
$ocfapidata .= "</tbody>"
I have $ocfapidata in my template, and it displays just fine when I change the offending line to
PHP Code:
$ocfapidata .= "src=\"".$stylevar[imgdir_button]."/collapse_thead$vbcollapse[collapseimg_359_eveit_0].gif\" alt=\"\" "
except for that the 0 being there means only the last output box is displayed.

None of the other similar lines cause a problem, but as I am looping through an array to display, I need that eveit_$i].gif rather than eveit_0].gif. I could put a switch case for every line, but that'd be rather inefficient with many users.

Any suggestions on how to get around that error? I've tried using {$i} in the code, same error. It really doesn't want me to use a variable there, for some reason. I know $i has a value, if I place echo $i; in my code I get 012345678910 at the top of my page.


One other slightly unrelated question, when the collapsible box is collapsed, there's no title on the bar that the image is on that signifies what is in the box. Is there a way to give the box some header text?
Reply With Quote
 


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 12:01 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.05382 seconds
  • Memory Usage 2,476KB
  • Queries Executed 14 (?)
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
  • (6)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (2)postbit_attachment
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)showthread_list
  • (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_threadedmode.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_threaded
  • showthread_threaded_construct_link
  • 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
  • postbit_attachment
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete