RojanUK Posted August 3, 2004 Posted August 3, 2004 Hi, I've been having a play trying to change the privicy notice page to reflect my text. First I went into catalog/privacy.php and changed this bit: <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main"></td> </tr> I know that between the <td class="main"> and the closing </td> there used to be a PHP code, which I removed. Instead of that I pasted my privacy notice (which is in HTML) and this worked. However I've since learned that the actual place to change the privacy notice text is in catalog/includes/languages/english/privacy.php. So I cut the HTML from the first one and pasted it into the correct file. The result was not good. No text appeared on the page and all header normally saying 'Privacy Notice' changed to HEADING_TITLE and I got parse errors where I've inserted the text. My guess is that it's not possible to use HTML in the catalog/includes/languages/english/privacy.php, where it is possible to use it in catalog/privacy.php. Is there any way to solve that, by still using HTML and using the proper file in the english directory? RojanUK
Guest Posted August 3, 2004 Posted August 3, 2004 All text is in the languages folder catalog/includes/languages/english/privacy.php The_Bear
ozcsys Posted August 3, 2004 Posted August 3, 2004 Hi, I've been having a play trying to change the privicy notice page to reflect my text. First I went into catalog/privacy.php and changed this bit: ? ? ? ?<td><table border="0" width="100%" cellspacing="0" cellpadding="2"> ? ? ? ? ?<tr> ? ? ? ? ? ?<td class="main"></td> ? ? ? ? ?</tr> I know that between the <td class="main"> and the closing </td> there used to be a PHP code, which I removed. Instead of that I pasted my privacy notice (which is in HTML) and this worked. However I've since learned that the actual place to change the privacy notice text is in catalog/includes/languages/english/privacy.php. So I cut the HTML from the first one and pasted it into the correct file. The result was not good. No text appeared on the page and all header normally saying 'Privacy Notice' changed to HEADING_TITLE and I got parse errors where I've inserted the text. My guess is that it's not possible to use HTML in the catalog/includes/languages/english/privacy.php, where it is possible to use it in catalog/privacy.php. Is there any way to solve that, by still using HTML and using the proper file in the english directory? The parse errors are probably caused by not escaping out your ' in your text. what you need to do is type let's as let\'s . An easy way to get around worrying about parse errors it to use a html file instead of the php file for your text. To do this find <td class="main"><?php echo TEXT_INFORMATION; ?></td> and replace it with <td class="main"><?php require('privacy.html'); ?></td> Then create a privacy.html file and put it in the same directory where your privacy.php file is and enter in the text you want to have on your page. There should not be any body tags in the file just the text and formatting html tags you want to show up on the page. This is handy for pages with a lot of text or a page you want to change often. You can even format the text in a wysiwyg editor. The Knowledge Base is a wonderful thing. Do you have a problem? Have you checked out Common Problems? There are many very useful osC Contributions Are you having trouble with a installed contribution? Have you checked out the support thread found Here BACKUP BACKUP BACKUP!!! You did backup, right??
RojanUK Posted August 4, 2004 Author Posted August 4, 2004 I've tried this and this works like a charm. However, the line you're refering to is actually in catalog/privacy.php. I had already pasted the HTML code in that <td> and this worked already. However, I've heard that the place to change the text is not in that file but in the catalog/includes/languages/english/privacy.php file, in which no <td>'s are used at all. This is my current catalog/includes/languages/english/privacy.php file: <?php /* $Id: privacy.php,v 1.4 2002/11/19 01:48:08 dgw_ Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 osCommerce Released under the GNU General Public License */ define('NAVBAR_TITLE', 'Privacy Notice'); define('HEADING_TITLE', 'Privacy Notice'); define('TEXT_INFORMATION', 'Put here your Privacy Notice Information'); ?> So, in catalog/privacy I can easily change the text and that will work like a charm. Both by pasting the HTML directly into the <td> you mentioned, or via the separate HTML file and calling on it. Both work fine. (I actually quite liked the idea of a separate HTML file. Easy editing). Even though I've got this working now - and I should leave it when something works - I hear from several people that this is actually the wrong file in which to make these changes. It should've been the file I pasted above. But I don't see where I can do that. If I replace the 'Put her your Privacy Notice Information' line - keeping the ' at the beginning and end - with the HTML (without <body> etc) it doesn't work. So have I done it correctly or should I use the above pasted file and if so, how? Or a better question: What is the difference between the one and the other? RojanUK
ozcsys Posted August 4, 2004 Posted August 4, 2004 You are correct you should be changing the text in the file in your english folder. You should be using this line define('TEXT_INFORMATION', 'Put here your Privacy Notice Information'); Try setting it up like this so you make sure that the text you are adding is seperate from the beginnging and end of the define. You should also be using an editor that color codes you text to make it easier to pick out problems. define('TEXT_INFORMATION', ' Put here your Privacy Notice Information '); add you text to the above file and then post it here so we can take a look at it. What my earlier suggestion does is have the privacy.php file file look for your html for the text instead of the php file. This will remove the problem of having to worry about making your text php ready and for quicker and easier editing. The Knowledge Base is a wonderful thing. Do you have a problem? Have you checked out Common Problems? There are many very useful osC Contributions Are you having trouble with a installed contribution? Have you checked out the support thread found Here BACKUP BACKUP BACKUP!!! You did backup, right??
Recommended Posts
Archived
This topic is now archived and is closed to further replies.