Guest Posted January 31, 2004 Share Posted January 31, 2004 I am trying to add a new box to column_left. I have copied information.php exactly, changing NOTHING but the link names and file names. The syntax remains EXACTLY the same...no extra " or ' or ; or slashes, dashes, commas, periods or spaces. Yet I cannot get it to add without getting this darn message: Parse error: parse error, expecting `')'' in /home/adoratio/public_html/catalog/includes/boxes/infobox-occasion.php on line 33 Here is line 33 from my new file: new infoBox($info_box_contents); EXACTLY the same as it appears in the existing information.php Can someone PLEASE tell me what I am doing wrong? It is getting VER frustrating! Thanks Link to comment Share on other sites More sharing options...
mitchd Posted January 31, 2004 Share Posted January 31, 2004 At line 33 it realized there were unmatched ()'s. Line 33 is just where it realizes there's a problem, not necessarially where you need to look for the problem. You've got some open parenthesis somewhere leading up to line 33. Check them carefully or post the full code and someone will find it. Mitch Link to comment Share on other sites More sharing options...
Guest Posted January 31, 2004 Share Posted January 31, 2004 But Mitch...as I said, I changed NONE of the syntax in information.php...so how come that one shows up correctly??? Anyway, heres the entire file: <?php /* $Id: information.php,v 1.6 2003/02/10 22:31:00 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ ?> <!-- information //--> <tr> <td> <?php $info_box_contents = array(); $info_box_contents[] = array('text' => BOX_HEADING_INFOBOX-OCCASION); new infoBoxHeading($info_box_contents, false, false); $info_box_contents = array(); $info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_CHRISTMAS) . '">' . BOX_INFORMATION_CHRISTMAS . '</a><br>' . '<a href="' . tep_href_link(FILENAME_EASTER) . '">' . BOX_INFORMATION_EASTER . '</a><br>' . '<a href="' . tep_href_link(FILENAME_MOTHERS) . '">' . BOX_INFORMATION_MOTHERS . '</a><br>' . '<a href="' . tep_href_link(FILENAME_ROMANCE) . '">' . BOX_INFORMATION_ROMANCE . '</a><br>' . '<a href="' . tep_href_link(FILENAME_SECRETARIES) . '">' . BOX_INFORMATION_SECRETARIES . '</a><br>' . '<a href="' . tep_href_link(FILENAME_THANKSGIVING) . '">' . BOX_INFORMATION_THANKSGIVING . '</a><br>' . '<a href="' . tep_href_link(FILENAME_VALENTINE) . '">' . BOX_INFORMATION_VALENTINE . '</a><br>' . new infoBox($info_box_contents); ?> </td> </tr> <!-- information_eof //--> Bear in mind that screen width constraints are breaking up the lines. In the file, they do, naturally, only occupy a single line each. Link to comment Share on other sites More sharing options...
Noobish-n-stuff Posted January 31, 2004 Share Posted January 31, 2004 you need a ) to close the array above line 33 Link to comment Share on other sites More sharing options...
Guest Posted January 31, 2004 Share Posted January 31, 2004 Sometimes all it takes is a fresh pair of eyes. THANK YOU noob! I would like to point out that i DID NOT remove that closing ), so i'm surprised it is not throwing me the same error with information.php Thanks again. Link to comment Share on other sites More sharing options...
Guest Posted January 31, 2004 Share Posted January 31, 2004 OK...spoke too soon. Can you tell me WHERE to put the closing ), because wherever I am putting it after line 29 and before line 33, it is still giving me a parse error Parse error: parse error in ..../infobox-occasion.php on line[whatever line i put the ) in] :( I have left my site with the error showing if you want to check it out Adorations Online Link to comment Share on other sites More sharing options...
Noobish-n-stuff Posted January 31, 2004 Share Posted January 31, 2004 this is how it's normall closed new infoBoxHeading($info_box_contents, false, false); $info_box_contents = array(); $info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_GALLERY) . '">' . BOX_INFORMATION_GALLERY . '</a><br>' . '<a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' . '<a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' . '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>'); new infoBox($info_box_contents); so when you changed the array, you actually did get rid of it that doesn't really seem like the standard way of closing that. usually the ) is on the nex blank line, right?? Link to comment Share on other sites More sharing options...
Guest Posted January 31, 2004 Share Posted January 31, 2004 This time i checked it before posting my thanks. hehe Thank you, Jason. Yes...that did it...but while I have your ear...can ya tell me possibly why the box heading might not be showing up? Gawd I wish I was a programmer. *sigh* :blink: Link to comment Share on other sites More sharing options...
Noobish-n-stuff Posted January 31, 2004 Share Posted January 31, 2004 i don't think that it likes this "BOX_HEADING_INFOBOX-OCCASION" try getting rid of the - and make it a _ double check the define too i wish i was a programmer too :lol: Link to comment Share on other sites More sharing options...
Guest Posted January 31, 2004 Share Posted January 31, 2004 Yup...that did it Jason. Thanks much for your help! :) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.