motorsportclocks Posted May 28, 2006 Posted May 28, 2006 Hey, I've searched but can't find the answer to this. I was editing /httpdocs/shop/includes/languages/english/index.php and long story short lost my original backup, as well as the modifications. :'( I had to download a fresh OScommerce in order to get the original index.php code, which worked fine except that it had that stupid new user etc message. ANY attempts to edit this resulted in Parse errors all over the place, so I was going to come on here to ask for help/shell code to allow me to type a personalised message or get rid of the message entirely. . However, now even the original code (copied and pasted back in from wordpad) is producing said errors! I can't work it out as it's literally the entire code just copied from the edit window, pasted into wordpad then pasted back into the window. I'm failing to understand how this is possible? Just how stupid am I being? Shop is www.ultimatemotorsportclocks.co.uk/shop if that helps. Thanks very much for considering my problem. :(
crash3903 Posted May 28, 2006 Posted May 28, 2006 can you post the code for that file Regards Mark A Reynolds
motorsportclocks Posted May 28, 2006 Author Posted May 28, 2006 That's the lot. I guess Dreamweaver might have something to help find errors? I couldn't afford it though. Thanks :) <?php /* $Id: index.php,v 1.1.1.1 2005/08/16 08:31:31 sstolyarov 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>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'); } ?>
crash3903 Posted May 28, 2006 Posted May 28, 2006 <?php /* $Id: index.php,v 1.1.1.1 2005/08/16 08:31:31 sstolyarov Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright ? 2003 osCommerce Released under the GNU General Public License */ define('TEXT_MAIN', 'easy eh????'); 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'); } ?> try this Regards Regards Mark A Reynolds
motorsportclocks Posted May 28, 2006 Author Posted May 28, 2006 Thanks man, you've just saved me from many more hours of pain! Not how do I replace the text? Do I have to do it via another module? If I make any changes at all for the "easy eh???" bit, it brings up parse errors? Do I have to change something else as well as just editing that bit of text? I feel really stupid, sorry for this. I've managed to do the rest without asking, but this and 2 other things are really causing me problems.
crash3903 Posted May 28, 2006 Posted May 28, 2006 Thanks man, you've just saved me from many more hours of pain! Not how do I replace the text? Do I have to do it via another module? If I make any changes at all for the "easy eh???" bit, it brings up parse errors? Do I have to change something else as well as just editing that bit of text? I feel really stupid, sorry for this. I've managed to do the rest without asking, but this and 2 other things are really causing me problems. No problems What you need to do is this define('TEXT_MAIN', 'easy eh????'); change it to read what you want between the 2 ' - like so define('TEXT_MAIN', 'change the text between the single quotes'); when you are putting something like define('TEXT_MAIN', 'What's new?'); You need to make sure you escape the ' with a backslash like so define('TEXT_MAIN', 'What\'s new?'); HTH Mark Regards Mark A Reynolds
motorsportclocks Posted May 28, 2006 Author Posted May 28, 2006 Ahah, that was the problem. I wasn't using the \' :D You learn something new every day! Is all text formatting in stylesheet.css, or do I need to edit the colour in the module itself for things such as this: http://ultimatemotorsportclocks.co.uk/shop/login.php You can see it's black, but needs to be gray or it's invisible! As far as stylsheet goes, I can't find any text that I've left black... I couldn't find color codes in login.php, but then again you've seen how prone I am to mistakes. ;)
crash3903 Posted May 28, 2006 Posted May 28, 2006 The font colors and sizes are controlled w/ the stylesheet. You'll find the file in catalog/stylesheet.css Your smaller text (in the paragraphs) on the 'conditions' page is class "main", in the stylesheet it looks like TD.main, P.main { font-family: Verdana, Arial, sans-serif; font-size: 11px; line-height: 1.5; } Your headings ("contact us" and "conditions of sale") are class "page heading", in the stylesheet it looks like TD.pageHeading, DIV.pageHeading { font-family: Verdana, Arial, sans-serif; font-size: 20px; font-weight: bold; color: #9a9a9a; } Regards Mark A Reynolds
motorsportclocks Posted May 28, 2006 Author Posted May 28, 2006 Woohoo! I now have a fully working shop again. :D I have quick easy checkout (the latest version from the contrib. page on here) to install after my exams are done, then just tweaking (need to tidy up some buttons, get a larger logo at the top of the homepage) removing login requirement and getting ssl secured. Then let the advertising commence! Thanks so much man, I know it can be a pain dealing with beginners in any field but you've been very patient and clear! :)
crash3903 Posted May 28, 2006 Posted May 28, 2006 Woohoo! I now have a fully working shop again. :D I have quick easy checkout (the latest version from the contrib. page on here) to install after my exams are done, then just tweaking (need to tidy up some buttons, get a larger logo at the top of the homepage) removing login requirement and getting ssl secured. Then let the advertising commence! Thanks so much man, I know it can be a pain dealing with beginners in any field but you've been very patient and clear! :) no worries you are very welcome Regards Mark A Reynolds
Sherlock Posted May 30, 2006 Posted May 30, 2006 Hello I have the same problem. I deleted all the text in the define(MAIN_TEXT) section and I left it looking like this: define('MAIN_TEXT', "); and I got a parse line #19 error message alsp a line 18 message when I made it look like this: ('MAIN_TEXT',); . I tried the define('TEXT_MAIN', 'easy eh ????'); and I got the parse line #19 back again. What am I doing wrong? Thanks
Recommended Posts
Archived
This topic is now archived and is closed to further replies.