hdrotleff Posted July 15, 2005 Share Posted July 15, 2005 I changed in the admin area a text ('Other distributors"), in the english.php-file and got a parse error in line 101 : -------------------------------------------------------------------------- // manufacturers box text in includes/boxes/manufacturers.php define('BOX_HEADING_MANUFACTURERS', 'Manufacturers'); // whats_new box text in includes/boxes/whats_new.php line 101: define('BOX_HEADING_WHATS_NEW', 'What's New?'); // usa and canada box text in includes/boxes/usa.php define('BOX_HEADING_USA', 'USA & Canada'); define('BOX_OTHER_DISTRIBUTORS', 'Other distributors'); -------------------------------------------------------------------------------- Even if I change 'Whats New?' the error disappears in line 101 and appears in line 174! Please help me. I have no experience with php. Many thanks hdrotleff Sorry, I should have posted this in another section. Link to comment Share on other sites More sharing options...
julianpuje Posted July 15, 2005 Share Posted July 15, 2005 It is seeing the inverted comma as code. You need to add a backslash wherever you have an inverted comma in your text as it will see it as the end of the text. It needs to be like 'What\'s New?' The way you have it, it is seeing 'What' as the text then s New?' as the code after it and doesn't understand the command. This will probably be the same for you line 174 aswell. HTH Julian A little knowledge is dangerous, I SHOULD KNOW. If Life Begins At 40, What ends???? Link to comment Share on other sites More sharing options...
hdrotleff Posted July 15, 2005 Author Share Posted July 15, 2005 It is seeing the inverted comma as code. You need to add a backslash wherever you have an inverted comma in your text as it will see it as the end of the text. It needs to be like 'What\'s New?'The way you have it, it is seeing 'What' as the text then s New?' as the code after it and doesn't understand the command. This will probably be the same for you line 174 aswell. HTH Julian <{POST_SNAPBACK}> Thanks, Julian. 'What\'s New?' looks ok in Weaverslave (editor) but highlighted in PHP CoderPro!. With that modification I get an error in line 173: define('JS_REVIEW_TEXT', '* The 'Review Text' must have at least ' . REVIEW_TEXT_MIN_LENGTH . ' characters.n'); I tried also ''What's New?' (this was in the initial file) "What's New?" 'Whats New?' but without positve results. I would appreciate other suggestions. It seems more complicated than I thought (!). A simple change of text in ' ......' and such a problem. Thanks hdrotleff Link to comment Share on other sites More sharing options...
Guest Posted July 15, 2005 Share Posted July 15, 2005 Thanks, Julian. 'What\'s New?' looks ok in Weaverslave (editor) but highlighted in PHP CoderPro!. With that modification I get an error in line 173: define('JS_REVIEW_TEXT', '* The 'Review Text' must have at least ' . REVIEW_TEXT_MIN_LENGTH . ' characters.n'); I tried also ''What's New?' (this was in the initial file) "What's New?" 'Whats New?' but without positve results. I would appreciate other suggestions. It seems more complicated than I thought (!). A simple change of text in ' ......' and such a problem. Thanks hdrotleff <{POST_SNAPBACK}> anywhere you want to output a single quote ' to the browser you must escape it with a slash \', which you found after changing the 'What\'s New?' but the error moved to the next line define('JS_REVIEW_TEXT', '* The 'Review Text' must have at least ' . REVIEW_TEXT_MIN_LENGTH . ' characters.n'); thats because again you have unescaped quotes define('JS_REVIEW_TEXT', '* The \'Review Text\' must have at least ' . REVIEW_TEXT_MIN_LENGTH . ' characters.n'); Link to comment Share on other sites More sharing options...
hdrotleff Posted July 15, 2005 Author Share Posted July 15, 2005 anywhere you want to output a single quote ' to the browser you must escape it with a slash \', which you found after changing the 'What\'s New?' but the error moved to the next line define('JS_REVIEW_TEXT', '* The 'Review Text' must have at least ' . REVIEW_TEXT_MIN_LENGTH . ' characters.n'); thats because again you have unescaped quotes define('JS_REVIEW_TEXT', '* The \'Review Text\' must have at least ' . REVIEW_TEXT_MIN_LENGTH . ' characters.n'); <{POST_SNAPBACK}> Many thanks, mikeq. That was the solution for my problem! I am so grateful. But very strange for me: when I open the file in the admin area I cannot see the \. And everything looks like before ('What's New?') Best regards, hdrotleff Link to comment Share on other sites More sharing options...
Guest Posted July 15, 2005 Share Posted July 15, 2005 Dont use the file manager in Admin to open/edit your files. I contains a function (stripslashes) which removes all the \ from the file. So everytime you use it you'll break your files again :( Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.