Guest Posted March 2, 2008 Posted March 2, 2008 Please help me out! I tried to change define('HEADING_TITLE', 'Lets See What We Have Here"'); to define('HEADING_TITLE', 'Jennifer's Bridal Utopia'); and this is what happened Parse error: syntax error, unexpected T_STRING in /mnt/w0503/d31/s08/b02d3771/www/jennifersbridal.ca/boutique/catalog/includes/languages/english/index.php on line 13 <?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, products shown are for demonstrational purposes, <b>any products purchased will not be delivered nor will the customer be billed</b>. Any information seen on these products is to be treated as fictional.<br><br><table border="0" width="100%" cellspacing="5" cellpadding="2"><tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . 'default/1.gif') . '</td><td class="main" valign="top"><b>Error Messages</b><br><br>If there are any error or warning messages shown above, please correct them first before proceeding.<br><br>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>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', 'Jennifer's Bridal Utopia'); 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'); } ?>
Jan Zonjee Posted March 2, 2008 Posted March 2, 2008 Please help me out! I tried to change define('HEADING_TITLE', 'Lets See What We Have Here"'); to define('HEADING_TITLE', 'Jennifer's Bridal Utopia'); and this is what happened Parse error: syntax error, unexpected T_STRING Classic error of not escaping the single quotes in your define with a backslash: define('HEADING_TITLE', 'Jennifer\'s Bridal Utopia');
♥FWR Media Posted March 2, 2008 Posted March 2, 2008 Wow huge .. multiple errors :) Don't worry though it is a standard mistake for those who don't understand PHP. I'll explain (and this refers to changing text in ANY language file ok.) In a language file text is defined. What this means is that a bit of text is defined as the "holder" of that text information. E.g. define('WORLD_STATEMENT', 'Hello World'); The text WORLD_STATEMENT now holds the text "Hello World" So if (in PHP) I issue the following statement .. <?php echo WORLD_STATEMENT; ?> It will actually print to the screen Hello World Now to your specific question. Firstly delete everything above (AND I MEAN EVERYTHING) .. define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For %s'); Then add back in at the very top .. <?php /* $Id: index.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2007 osCommerce Released under the GNU General Public License */ define('TEXT_MAIN', ''); Now we can start afresh .. you see the bit ... define('TEXT_MAIN', ''); That is where we will define our index page text. The rules .. define('TEXT_MAIN', ''); See the red bits? The text/html you add MUST go between the two ' Example .. define('TEXT_MAIN', 'THIS IS MY TEXT<span>this is some my html</span>'); I know I'm labouring the point but it is intentional. Last important rule NEVER use an unescaped ' in your text, it will break it. Unescaped??? I can hear you say .. example .. There's It's Must be .. There\'s it\'s The character \ escapes the '. Hope it helps. Rob Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work.
♥FWR Media Posted March 2, 2008 Posted March 2, 2008 @ Monsieur Le Zonjee OI!!!! I've been typing that for 15 minutes .. and you nip in with a quick "one liner"!!!! Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work.
Jan Zonjee Posted March 2, 2008 Posted March 2, 2008 I've been typing that for 15 minutes .. and you nip in with a quick "one liner"!!!! Sorry!!!
♥geoffreywalton Posted March 2, 2008 Posted March 2, 2008 I thought you boys from Suffolk could count :-) Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile Virus Threat Scanner My Contributions Basic install answers. Click here for Contributions / Add Ons. UK your site. Site Move. Basic design info. For links mentioned in old answers that are no longer here follow this link Useful Threads. If this post was useful, click the Like This button over there ======>>>>>.
♥FWR Media Posted March 2, 2008 Posted March 2, 2008 I thought you boys from Suffolk could count :-) London imigrant Geoff :D And what is a Norfolk lad doing here .. last time I was in Norfolk they were saying "what's t'internet" and "my email is www. ......" :D Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work.
Guest Posted March 2, 2008 Posted March 2, 2008 Thanks Robert, I appreciate your 15 minutes of typing, obviously i'm a newbee, and without the indepth explanations, i don't get it. I did what you said, tried the backward slash bewore the ' and for some reason it won't save it, This is what I have now; ( I'm sure it's because of that ', but like I said I can't get it to save the\.) Parse error: syntax error, unexpected T_STRING in /mnt/w0503/d31/s08/b02d3771/www/jennifersbridal.ca/boutique/catalog/includes/languages/english/index.php on line 20 <?php /* $Id: index.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2007 osCommerce Released under the GNU General Public License */ define('TEXT_MAIN', 'Testing'); 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', 'Welcome to Jennifer's Bridal Utopia"); 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'); } ?>
♥FWR Media Posted March 2, 2008 Posted March 2, 2008 Thanks Robert, I appreciate your 15 minutes of typing, obviously i'm a newbee, and without the indepth explanations, i don't get it.I did what you said, tried the backward slash bewore the ' and for some reason it won't save it, This is what I have now; ( I'm sure it's because of that ', but like I said I can't get it to save the\.) Parse error: syntax error, unexpected T_STRING in /mnt/w0503/d31/s08/b02d3771/www/jennifersbridal.ca/boutique/catalog/includes/languages/english/index.php on line 20 <?php /* $Id: index.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2007 osCommerce Released under the GNU General Public License */ define('TEXT_MAIN', 'Testing'); 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', 'Welcome to Jennifer's Bridal Utopia"); 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'); } ?> Now Jennifer read my (15 minute long :D ) tutorial (garalous diatribe) define('HEADING_TITLE', 'Welcome to Jennifer's Bridal Utopia"); Should be .. define('HEADING_TITLE', 'Welcome to Jennifer\'s Bridal Utopia"); Never miss the \' they'll get you!!!! Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work.
♥geoffreywalton Posted March 2, 2008 Posted March 2, 2008 If you can't save it, you have not corrected the problem. Are you using ftp to download the file, edit it and then upload it back or just editing it using the admin area? (that is a 2 line response, and I am here cos I got lost. Ventured over the border to Oulton Broad today, very windy in your neck of the woods. ) Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile Virus Threat Scanner My Contributions Basic install answers. Click here for Contributions / Add Ons. UK your site. Site Move. Basic design info. For links mentioned in old answers that are no longer here follow this link Useful Threads. If this post was useful, click the Like This button over there ======>>>>>.
clvahlberg Posted March 13, 2008 Posted March 13, 2008 Thanks Robert, I appreciate your 15 minutes of typing, obviously i'm a newbee, and without the indepth explanations, i don't get it.I did what you said, tried the backward slash bewore the ' and for some reason it won't save it, This is what I have now; ( I'm sure it's because of that ', but like I said I can't get it to save the\.) Parse error: syntax error, unexpected T_STRING in /mnt/w0503/d31/s08/b02d3771/www/jennifersbridal.ca/boutique/catalog/includes/languages/english/index.php on line 20 define('TABLE_HEADING_IMAGE', ''); Your error says it's on line 20. You have nothing entered in ' '. I'm not sure, but I think that's your new error.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.