Guest Posted December 12, 2003 Posted December 12, 2003 Tried to edit the Language index.php module and as soon as I opened it and just saved it I started getting errors. I did get rid of a blank it inserted at the end of the code, but I still kept getting this error: Parse error: parse error, unexpected T_STRING in /home/info-sit/public_html/shop/catalog/includes/languages/english/index.php on line 13 HERE IS THE CODE: <?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 © 2003 osCommerce Released under the GNU General Public License */ define('TEXT_MAIN','This is a default setup of the osCommerce project Error messages are displayed at the very top of the page with a complete <span class="messageStackError">background</span> color.<br><br>Several checks are performed to ensure a healthy setup of your online store - these checks can be disabled by editing the appropriate parameters at the bottom of the includes/application_top.php file.</td></tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . 'default/2.gif') . '</td><td class="main" valign="top"><b>Editing Page Texts</b><br><br>The text shown here can be modified in the following file, on each language basis:<br><br><nobr class="messageStackSuccess">[path to catalog]/includes/languages/' . $language . '/' . FILENAME_DEFAULT . '</nobr><br><br>That file can be edited manually, or via the Administration Tool with the <nobr class="messageStackSuccess">Languages->' . ucfirst($language) . '->Define</nobr> or <nobr class="messageStackSuccess">Tools->File Manager</nobr> modules.<br><br>The text is set in the following manner:<br><br><nobr>define('TEXT_MAIN', '<span class="messageStackSuccess">This is a default setup of the osCommerce project...</span>');</nobr><br><br>The text highlighted in green may be modified - it is important to keep the define() of the TEXT_MAIN keyword. To remove the text for TEXT_MAIN completely, the following example is used where only two single quote characters exist:<br><br><nobr>define('TEXT_MAIN', '');</nobr><br><br>More information concerning the PHP define() function can be read <a href="http://www.php.net/define" target="_blank"><u>here</u></a>.</td></tr><tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . 'default/3.gif') . '</td><td class="main" valign="top"><b>Securing The Administration Tool</b><br><br>It is important to secure the Administration Tool as there is currently no security implementation available.</td></tr><tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . 'default/4.gif') . '</td><td class="main" valign="top"><b>Online Documentation</b><br><br>Online documentation can be read at the <a href="http://wiki.oscommerce.com" target="_blank"><u>osCommerce Wiki Documentation Effort</u></a> site.<br><br>Community support is available at the <a href="http://www.oscommerce.com/forums" target="_blank"><u>osCommerce Community Support Forums</u></a> site.</td></tr></table><br>If you wish to download the solution powering this shop, or if you wish to contribute to the osCommerce project, please visit the <a href="http://www.oscommerce.com" target="_blank"><u>support site of osCommerce</u></a>. This shop is running on osCommerce version <font color="#f0000"><b>' . PROJECT_VERSION . '</b></font>.'); 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', 'Let's See What We Have Here'); 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', 'What's New Here?'); } elseif ($category_depth == 'nested') { define('HEADING_TITLE', 'Categories'); } ?> PLEASE help, everything was fine until I decided to change my main page. Thank You, Frank
Jim1 Posted December 17, 2003 Posted December 17, 2003 I had the same problem. It seems like the editor in admin changes the files when it opens them. My advise is to upload the file english.php again, if you have a backup, or get it from oscommerce again. If you want to change it, download it, change with notepad and upload it again.
batha01 Posted January 25, 2004 Posted January 25, 2004 I had similar problems and upon closer inspection realised that some of the \n charcters were simply being saved as n therefore the were being parsed as a normal letter of the alphabet.
Nea1 Posted January 25, 2004 Posted January 25, 2004 Similar problem! My web has a cPanel installed osCommerce script. I'm VERY new at this, so trying to change only the text, and not mess up the location of the coding marks/punctuation. In trying to input or change text in the index.php file and the conditions.php file, I'm getting parse errors on the lines where the text goes. I finally cut the text from the index.php file, saved it elsewhere, then put it back in; greatly pared down, but this time it worked. However, the same trick didn't work for the conditions.php file, even after hacking my message to one or two sentences. I've tried going to the php site to find the "php for dummies" section, but apparently this is such an elementary thing, that it isn't addressed. So, two questions for starters: 1. Since the index file "returned to function" with only 5 lines (including 2 breaks), does this sound like there is a limit or restriction on the amount of text you can input? 2. If so, where and how can I alter those limits to allow more text to show up without getting parse errors? All replies appreciated.
241 Posted January 25, 2004 Posted January 25, 2004 If you think about how much text was in the default page when you installed osc, then you will reason that you can have far more than 5 lines and 2 breaks. the problem is usually with special characters sich as what's this need to be what\'s there are also problems caused where the error returned is headers allready sent by blahblah this is due to using the online file manager to edit the files, far better to ftp the file to your computer make the changes with a php editor or dreamweaver save and upload the file this usually stops any extra spaces or lines being added which is what can happen when you edit the file online. No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.