Cajunali Posted October 30, 2006 Posted October 30, 2006 I was simply trying to edit some Main text and managed to screw up the code bad enough that I cannot read my page anymore. I bought a book to learn PHP to see where I messed up in syntax--but that did not help. This is the error message: Parse error: syntax error, unexpected T_STRING in /home/inspirb0/public_html/includes/languages/english/index.php on line 14 Here is the code as is right now: */ define('TEXT_MAIN', 'As a stay at home mom, I love to find time to create and design jewelry.<br><br><table border="0" width="100%" cellspacing="5" cellpadding="2"><td class="main" valign="top">'. tep_image(DIR_WS_IMAGES . 'default/1.gif') .' </td><td class="main" valign="top"><b></b><br><br>You will find unique handmade gifts<br><br>Please send comments, questions, or suggestions to Ali at [email protected].<br><br>More text I guess</td><tr> define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For %s'); define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products'); define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected');<tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . 'default/2.gif') . '</td><tr>class="main" valign="top"<b>High Quality Materials</b><br><br>All pieces are crafted with genuine stones, freshwater pearls, and sterling silver.<br><br>Pearls are a favorite of mine and their classic subtle beauty is what enticed me to begin designing jewelry.'); if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) { define('HEADING_TITLE', 'List of Products'); define('TABLE_HEADING_IMAGE', ''); define('TABLE_HEADING_MODEL', 'Model'); define('TABLE_HEADING_PRODUCTS', 'Product Name'); define('TABLE_HEADING_MANUFACTURER', 'Manufacturer'); define('TABLE_HEADING_QUANTITY', 'Quantity'); define('TABLE_HEADING_PRICE', 'Price'); define('TABLE_HEADING_WEIGHT', 'Weight'); define('TABLE_HEADING_BUY_NOW', 'Buy Now'); define('TEXT_NO_PRODUCTS', 'There are no products to list in this category.'); define('TEXT_NO_PRODUCTS2', 'There is no product available from this manufacturer.'); define('TEXT_NUMBER_OF_PRODUCTS', 'Number of Products: '); define('TEXT_SHOW', '<b>Show:</b>'); define('TEXT_BUY', 'Buy 1 \''); define('TEXT_NOW', '\' now'); define('TEXT_ALL_CATEGORIES', 'All Categories'); define('TEXT_ALL_MANUFACTURERS', 'All Manufacturers'); } elseif ($category_depth == 'top') { define('HEADING_TITLE', 'Meet the Designer'); } elseif ($category_depth == 'nested') { define('HEADING_TITLE', 'Categories'); } ?> Thanks in advance!
Guest Posted October 30, 2006 Posted October 30, 2006 try this <?php /* $Id: index.php,v 1.1 2003/06/11 17:38:00 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ define('TEXT_MAIN', 'As a stay at home mom, I love to find time to create and design jewelry.<br><br><table border="0" width="100%" cellspacing="5" cellpadding="2"><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . 'default/1.gif') . '</td><td class="main" valign="top"><b></b><br><br>You will find unique handmade gifts<br><br>Please send comments, questions, or suggestions to Ali at [email protected].<br><br>More text I guess</td><tr>'); define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For %s'); define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products'); define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected'); if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) { define('HEADING_TITLE', 'List of Products'); define('TABLE_HEADING_IMAGE', ''); define('TABLE_HEADING_MODEL', 'Model'); define('TABLE_HEADING_PRODUCTS', 'Product Name'); define('TABLE_HEADING_MANUFACTURER', 'Manufacturer'); define('TABLE_HEADING_QUANTITY', 'Quantity'); define('TABLE_HEADING_PRICE', 'Price'); define('TABLE_HEADING_WEIGHT', 'Weight'); define('TABLE_HEADING_BUY_NOW', 'Buy Now'); define('TEXT_NO_PRODUCTS', 'There are no products to list in this category.'); define('TEXT_NO_PRODUCTS2', 'There is no product available from this manufacturer.'); define('TEXT_NUMBER_OF_PRODUCTS', 'Number of Products: '); define('TEXT_SHOW', '<b>Show:</b>'); define('TEXT_BUY', 'Buy 1 \''); define('TEXT_NOW', '\' now'); define('TEXT_ALL_CATEGORIES', 'All Categories'); define('TEXT_ALL_MANUFACTURERS', 'All Manufacturers'); } elseif ($category_depth == 'top') { define('HEADING_TITLE', 'Meet the Designer'); } elseif ($category_depth == 'nested') { define('HEADING_TITLE', 'Categories'); } ?>
Guest Posted October 30, 2006 Posted October 30, 2006 You had 2 errors that I could see define('TEXT_MAIN', 'As a stay at home mom, I love to find time to create and design jewelry.<br><br><table border="0" width="100%" cellspacing="5" cellpadding="2"><td class="main" valign="top">'. tep_image(DIR_WS_IMAGES . 'default/1.gif') .' </td><td class="main" valign="top"><b></b><br><br>You will find unique handmade gifts<br><br>Please send comments, questions, or suggestions to Ali at [email protected].<br><br>More text I guess</td><tr> missing '); define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For %s'); define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products'); define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected');<tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . 'default/2.gif') . '</td><tr>class="main" valign="top"<b>High Quality Materials</b><br><br>All pieces are crafted with genuine stones, freshwater pearls, and sterling silver.<br><br>Pearls are a favorite of mine and their classic subtle beauty is what enticed me to begin designing jewelry.'); Define is already closed.
Cajunali Posted October 31, 2006 Author Posted October 31, 2006 Thanks Stuart! It worked! Now, the website is too wide for the screen and I have to scroll left to right to see it all. How can I fix that? Thanks again! try this <?php /* $Id: index.php,v 1.1 2003/06/11 17:38:00 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ define('TEXT_MAIN', 'As a stay at home mom, I love to find time to create and design jewelry.<br><br><table border="0" width="100%" cellspacing="5" cellpadding="2"><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . 'default/1.gif') . '</td><td class="main" valign="top"><b></b><br><br>You will find unique handmade gifts<br><br>Please send comments, questions, or suggestions to Ali at [email protected].<br><br>More text I guess</td><tr>'); define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For %s'); define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products'); define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected'); if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) { define('HEADING_TITLE', 'List of Products'); define('TABLE_HEADING_IMAGE', ''); define('TABLE_HEADING_MODEL', 'Model'); define('TABLE_HEADING_PRODUCTS', 'Product Name'); define('TABLE_HEADING_MANUFACTURER', 'Manufacturer'); define('TABLE_HEADING_QUANTITY', 'Quantity'); define('TABLE_HEADING_PRICE', 'Price'); define('TABLE_HEADING_WEIGHT', 'Weight'); define('TABLE_HEADING_BUY_NOW', 'Buy Now'); define('TEXT_NO_PRODUCTS', 'There are no products to list in this category.'); define('TEXT_NO_PRODUCTS2', 'There is no product available from this manufacturer.'); define('TEXT_NUMBER_OF_PRODUCTS', 'Number of Products: '); define('TEXT_SHOW', '<b>Show:</b>'); define('TEXT_BUY', 'Buy 1 \''); define('TEXT_NOW', '\' now'); define('TEXT_ALL_CATEGORIES', 'All Categories'); define('TEXT_ALL_MANUFACTURERS', 'All Manufacturers'); } elseif ($category_depth == 'top') { define('HEADING_TITLE', 'Meet the Designer'); } elseif ($category_depth == 'nested') { define('HEADING_TITLE', 'Categories'); } ?>
Guest Posted October 31, 2006 Posted October 31, 2006 Use the Fixed Width Site contribution from Vger.
Gameprodigy Posted October 31, 2006 Posted October 31, 2006 Only thing I can think of would be to try this <?php /* $Id: index.php,v 1.1 2003/06/11 17:38:00 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ define('TEXT_MAIN', 'As a stay at home mom, I love to find time to create and design jewelry.<br><br><table border="0" width="600" cellspacing="5" cellpadding="2"><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . 'default/1.gif') . '</td><td class="main" valign="top"><b></b><br><br>You will find unique handmade gifts<br><br>Please send comments, questions, or suggestions to Ali at [email protected].<br><br>More text I guess</td><tr>'); define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For %s'); define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products'); define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected'); if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) { define('HEADING_TITLE', 'List of Products'); define('TABLE_HEADING_IMAGE', ''); define('TABLE_HEADING_MODEL', 'Model'); define('TABLE_HEADING_PRODUCTS', 'Product Name'); define('TABLE_HEADING_MANUFACTURER', 'Manufacturer'); define('TABLE_HEADING_QUANTITY', 'Quantity'); define('TABLE_HEADING_PRICE', 'Price'); define('TABLE_HEADING_WEIGHT', 'Weight'); define('TABLE_HEADING_BUY_NOW', 'Buy Now'); define('TEXT_NO_PRODUCTS', 'There are no products to list in this category.'); define('TEXT_NO_PRODUCTS2', 'There is no product available from this manufacturer.'); define('TEXT_NUMBER_OF_PRODUCTS', 'Number of Products: '); define('TEXT_SHOW', '<b>Show:</b>'); define('TEXT_BUY', 'Buy 1 \''); define('TEXT_NOW', '\' now'); define('TEXT_ALL_CATEGORIES', 'All Categories'); define('TEXT_ALL_MANUFACTURERS', 'All Manufacturers'); } elseif ($category_depth == 'top') { define('HEADING_TITLE', 'Meet the Designer'); } elseif ($category_depth == 'nested') { define('HEADING_TITLE', 'Categories'); } ?>
Cajunali Posted October 31, 2006 Author Posted October 31, 2006 I used the solution from Vger and it did not fix the width--there are still scrollbars. Also, I lost my cute background from the template that I am using. How do I restore the background?
Guest Posted October 31, 2006 Posted October 31, 2006 Assuming you're still using the fixed width contribution and you're talking about the background on the main page, then put your image in here in the stylesheet.css: .fixcenter { width: 758px; border: solid; border-width: 1px; background: #ffffff; color: #000000; margin: auto; margin-top: 20px; text-align: left; }
Gameprodigy Posted October 31, 2006 Posted October 31, 2006 well I am not sure what you changed with the contribution, but if the only change was made to the english.php file then you can just copy and paste the code I posted above to restore the old code that you had. I haven't used the fixed site contribution but the code is this: 1. A minor modification is required to your stylesheet.css file. Replace the following code: --------------------------- BODY { background: #ffffff; color: #000000; margin: 0px; } with: ----- BODY { text-align: center; background: #ffffff; color: #000000; margin: 0px; } .fixcenter { width: 758px; border: solid; border-width: 1px; background: #ffffff; color: #000000; margin: auto; margin-top: 20px; text-align: left; } 2. On-page changes: In /catalog/includes/header.php ------------------------------- immediately below this piece of code if ($messageStack->size('header') > 0) { echo $messageStack->output('header'); } ?> add <div class="fixcenter"> In catalog/includes/footer.php ------------------------------ Immediately below the closing php tag ?> add this </div> The first part where is says body then has the background below it as fffff, that probably changed your page to white and your text to black. Did you happen to keep a copy of your old stylesheet before changing the code. I recommend to always copy the code to notepad or word and save it as the name of the file like in this case correctstylesheet.php and put it in your documents, that way if anything unwanted happened you can go back to what you had. I don't what you had before so I don't know what to tell you to change.
Cajunali Posted October 31, 2006 Author Posted October 31, 2006 Bennstein--thanks for all of your help--I am still using the fixed width contribution and talking about the background on the main page. When you say put your image I am assuming I replace the #fffffff? Do I replace it with the file name of the image? i.e. ra_background.gif Or something else? Oh, and my site still has left to right scroll bars--Do you know a solution? Assuming you're still using the fixed width contribution and you're talking about the background on the main page, then put your image in here in the stylesheet.css: .fixcenter { width: 758px; border: solid; border-width: 1px; background: #ffffff; color: #000000; margin: auto; margin-top: 20px; text-align: left; }
Guest Posted October 31, 2006 Posted October 31, 2006 Bennstein--thanks for all of your help--I am still using the fixed width contribution and talking about the background on the main page. When you say put your image I am assuming I replace the #fffffff? Do I replace it with the file name of the image? i.e. ra_background.gif Or something else? Basically use something like: background-image: url("images/ra_background.gif"); Oh, and my site still has left to right scroll bars--Do you know a solution? I can only think this has something to do with how a table has been defined. If able, perhaps give us a link to your site so we can check it out.
Cajunali Posted October 31, 2006 Author Posted October 31, 2006 Basically use something like: background-image: url("images/ra_background.gif"); I can only think this has something to do with how a table has been defined. If able, perhaps give us a link to your site so we can check it out. I had my hosting co. restore my site and the side scrolls are no longer there. Unfortunately, I tried getting my background back up by sustituting the above code in the place in the stylesheet where you suggested. Is there something I am missing? My site is www.inspirationsbyali.com/index.php Thanks again for all of your help!
Guest Posted October 31, 2006 Posted October 31, 2006 Hmm, looking at your site it appears that the fixed width contribution has been blown away with the restore. With that in mind the background image code should be added to this bit in stylesheet.css: BODY { background: #ffffff; color: #000000; margin: 0px; } If/when you put the fixed width contrib back then it would go in here: .fixcenter { width: 758px; border: solid; border-width: 1px; background: #ffffff; color: #000000; margin: auto; margin-top: 20px; text-align: left; } Oh, ensure the image name is correct including the path (eg. images/).
crash3903 Posted October 31, 2006 Posted October 31, 2006 you could try changing your thumbnails to a smaller size in admin...Say 100? Regards Mark A Reynolds
Gameprodigy Posted November 1, 2006 Posted November 1, 2006 I sent you an email with a new version of your main page, in your coding there was an extra table row that wasn't necessary, and the image with the one in it was pushing your text to the right. I included the new as well as the old so that you have the original file.
Cajunali Posted November 1, 2006 Author Posted November 1, 2006 Which address did you send it to? Thanks
Cajunali Posted November 1, 2006 Author Posted November 1, 2006 Here is the code in my stylesheet. Can you see the problem with me scrolling left to right? How do I fix it? Also, I plugged the background info in and at first my site was showing the background. Then a couple of minutes later the background was gone again. I changed my thumbnail sizes and that seemed to shrink the width of the screen. But next time I refreshed the website, the width was too big again. What did I do right and what have I done wrong? When should I give up? :( .boxText { font-family: Verdana, Arial, sans-serif; font-size: 10px; } .errorBox { font-family : Verdana, Arial, sans-serif; font-size : 10px; background: #ffb3b5; font-weight: bold; } .stockWarning { font-family : Verdana, Arial, sans-serif; font-size : 10px; color: #cc0033; } .productsNotifications { background: #f2fff7; } .orderEdit { font-family : Verdana, Arial, sans-serif; font-size : 10px; color: #70d250; text-decoration: underline; } body {scrollbar-arrow-color:#ffffff; scrollbar-base-color:#ffffff; scrollbar-dark-shadow-color:#ffffff; scrollbar-track-color: #91709d; scrollbar-face-color:#efe6f8; scrollbar-shadow-color: #ffffff; scrollbar-highlight-color:#ffffff; scrollbar-3d-light-color: #ffffff;} BODY { text-align: center; background: ("images/ringaround/ra_background.gif"); color: #000000; margin: 0px; } .fixcenter { width: 758px; border: solid; border-width: 1px; background: ("images/ringaround/ra_background.gif"); color: #000000; margin: auto; margin-top: 20px; text-align: left; } A { color: #5c4066; text-decoration: none; } A:hover { color: #91709D; text-decoration: underline; } FORM { display: inline; } TR.header { background: #ffffff; } TR.headerNavigation { background: #FFFFFF; } TD.headerNavigation { font-family: Verdana, Arial, sans-serif; font-size: 12px; background: #FFFFFF; color: #91709d; font-weight : bold; } A.headerNavigation { color: #91709d; } A.headerNavigation:hover { color: #5c4066; } TR.headerError { background: #ff0000; } TD.headerError { font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 12px; background: #F1C4C6; color: #ffffff; font-weight : bold; text-align : center; } TR.headerInfo { background: #91709D; } TD.headerInfo { font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 12px; background: #91709D; color: #ffffff; font-weight: bold; text-align: center; } TR.footer { background: ; } TD.footer { font-family: Verdana, Arial, sans-serif; font-size: 12px; background: ; color: #91709d; font-weight: bold; } .infoBox { background: #91709D; } .infoBoxContents { background: #FFFFFF; font-family: Verdana, Arial, sans-serif; font-size: 10px; } .infoBoxNotice { background: #91709D; } .infoBoxNoticeContents { background: #FFFFFF; font-family: Verdana, Arial, sans-serif; font-size: 10px; } TD.infoBoxHeading { font-family: Verdana, Arial, sans-serif; font-size: 10px; font-weight: bold; background: #91709D; color: #FFFFFF; } TD.infoBox, SPAN.infoBox { font-family: Verdana, Arial, sans-serif; font-size: 10px; } TR.accountHistory-odd, TR.addressBook-odd, TR.alsoPurchased-odd, TR.payment-odd, TR.productListing-odd, TR.productReviews-odd, TR.upcomingProducts-odd, TR.shippingOptions-odd { background: #efe6f8; } TR.accountHistory-even, TR.addressBook-even, TR.alsoPurchased-even, TR.payment-even, TR.productListing-even, TR.productReviews-even, TR.upcomingProducts-even, TR.shippingOptions-even { background: #FFFFFF; } TABLE.productListing { border: 1px; border-style: solid; border-color: #91709d; border-spacing: 1px; } .productListing-heading { font-family: Verdana, Arial, sans-serif; font-size: 10px; background: #91709d; color: #FFFFFF; font-weight: bold; } TD.productListing-data { font-family: Verdana, Arial, sans-serif; font-size: 10px; } A.pageResults { color: #5c4066; } A.pageResults:hover { color: #91709d; background: #FFFFFF; } TD.pageHeading, DIV.pageHeading { font-family: Verdana, Arial, sans-serif; font-size: 20px; font-weight: bold; color: #91709d; } TR.subBar { background: #FFFFFF; } TD.subBar { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #91709d; } TD.main, P.main { font-family: Verdana, Arial, sans-serif; font-size: 11px; line-height: 1.5; } TD.smallText, SPAN.smallText, P.smallText { font-family: Verdana, Arial, sans-serif; font-size: 9pt; } TD.accountCategory { font-family: Verdana, Arial, sans-serif; font-size: 13px; color: #91709d; } TD.fieldKey { font-family: Verdana, Arial, sans-serif; font-size: 12px; font-weight: bold; } TD.fieldValue { font-family: Verdana, Arial, sans-serif; font-size: 12px; } TD.tableHeading { font-family: Verdana, Arial, sans-serif; font-size: 12px; font-weight: bold; } SPAN.newItemInCart { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #ff0000; } CHECKBOX, INPUT, RADIO, SELECT { font-family: Verdana, Arial, sans-serif; font-size: 11px; } TEXTAREA { width: 100%; font-family: Verdana, Arial, sans-serif; font-size: 11px; } SPAN.greetUser { font-family: Verdana, Arial, sans-serif; font-size: 12px; color: #5c4066; font-weight: bold; } TABLE.formArea { background: #efe6f8; border-color: #91709d; border-style: solid; border-width: 1px; } TD.formAreaTitle { font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 12px; font-weight: bold; } SPAN.markProductOutOfStock { font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 12px; color: #c76170; font-weight: bold; } SPAN.productSpecialPrice { font-family: Verdana, Arial, sans-serif; color: #ff0000; } SPAN.errorText { font-family: Verdana, Arial, sans-serif; color: #ff0000; } .moduleRow { } .moduleRowOver { background-color: #2B2C7A; cursor: pointer; cursor: hand; } .moduleRowSelected { background-color: #FFFFFF; } .checkoutBarFrom, .checkoutBarTo { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #2B2C7A; } .checkoutBarCurrent { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #000000; } /* message box */ .messageBox { font-family: Verdana, Arial, sans-serif; font-size: 10px; } .messageStackError, .messageStackWarning { font-family: Verdana, Arial, sans-serif; font-size: 10px; background-color: #ffb3b5; } .messageStackSuccess { font-family: Verdana, Arial, sans-serif; font-size: 10px; background-color: #99ff00; } /* input requirement */ .inputRequirement { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #ff0000; }
Guest Posted November 1, 2006 Posted November 1, 2006 BODY { text-align: center; background: ("images/ringaround/ra_background.gif"); color: #000000; margin: 0px; } .fixcenter { width: 758px; border: solid; border-width: 1px; background: ("images/ringaround/ra_background.gif"); color: #000000; margin: auto; margin-top: 20px; text-align: left; } Change to background-image: url("images/ringaround/ra_background.gif"); Btw, you have a heap of code relating to scrollbars at the top of your stylesheet.css file ... that has me intrigued. Can you try deleting this? Also, it sounds like you might have some caching issues going on to. Perhaps try turning off Caching in Admin-->Configuration-->Cache and see if that helps. Other than that, someone above posted something about an extra table in your code. You might need to fix that as well.
crash3903 Posted November 1, 2006 Posted November 1, 2006 you could try changing your thumbnails to a smaller size in admin...Say 100? Regards Mark A Reynolds
Recommended Posts
Archived
This topic is now archived and is closed to further replies.