txt to php

I hope some of you PHP gurus out there will be able to help.
I’m using OSCommerce on a site and I have to put in the clients Privacy Policy which is held in a php file.
The documentation doesn’t help at all, but I have found where the text has to be inserted.
I have the clients Privacy Policy as a text file, but I realise I can’t just copy/paste this into the php file.

Is there a tool or other technique to enable me to format this text file so I can just copy/paste it into the php file?

You may have realised I am not a coder and definitely not a php coder.


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

To be honest I am a little puzzelled on what you want to do here.

Do you have the Privacy Policy and just want to copy and past the text
into your FW page?
is it PHP code that you want to copy and paste?
or is it a .php file that you need to include on your page?
Is the Privacy Policy a txt file or php file?

If it is a .php file and you want to include the file on your page
somewhere, then insert a mark-up item on the page, position it where
you want this text to appear, then add the following code into the
mark-up window:

<?php include_once ('privacypolicy.php'); ?>

Note: you will need to change ‘privacypolicy’ to the name of the file,
the above would asume you have ‘privacypolicy.php’ in the same
directory as the page that is using the include. Your page will
generally need to end in .php for any php code to be parsed.

If it is a file containing php code and you want to add it into your
document rather than include it into your document, add the mark-up
item as above and copy all the code from the ‘privacypolicy’ file and
past it into the mark-up window.

If this is not what you are trying to do then maybe you could you
explain in a bit more detail please.

Mikepuzzled

On Jan 19, 2008, at 5:35 AM, DillyDog wrote:

I hope some of you PHP gurus out there will be able to help.
I’m using OSCommerce on a site and I have to put in the clients
Privacy Policy which is held in a php file.
The documentation doesn’t help at all, but I have found where the
text has to be inserted.
I have the clients Privacy Policy as a text file, but I realise I
can’t just copy/paste this into the php file.

Is there a tool or other technique to enable me to format this text
file so I can just copy/paste it into the php file?


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Sorry, I didn’t ask my question very well, it was late and I was starting to loose interest!

OK, on the site I am working on, I have an iFrame targetting an installation of osCommerce.

In osCommerce, there is a link for a Privacy Policy. This link calls an include called ‘privacy.php’.

This is the code:

<?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', 'Place Privacy Policy Here'); ?>

Now, I have the Privacy Policy as a plain text file, but obviously I can’t just copy/paste this in as it will all be in the wrong syntax for PHP. So, how do I format the text (which is quite a lengthy legal document) so I can copy/paste it in?

Thanks


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

See where the text says ‘place Privacy policy Here’ the text is between the colons…

Type or paste text between the colons i.e. ‘this is my new policy text’

Basically your are defining what appears the data field ‘TEXT_INFORMATION’,

On 19 Jan 2008, at 3:16 pm, DillyDog wrote:

define(‘TEXT_INFORMATION’, ‘Place Privacy Policy Here’);

David Owen ::
Freeway Friendly Web Hosting and Domains
http://www.PrintlineAdvertising.co.uk/freeway

You can also change what is displayed on the navbar title, and heading title, data fields

At the moment both are displaying the words: Privacy Notice

On 19 Jan 2008, at 3:16 pm, DillyDog wrote:

define(‘NAVBAR_TITLE’, ‘Privacy Notice’);

define(‘HEADING_TITLE’, ‘Privacy Notice’);

David Owen ::
Freeway Friendly Web Hosting and Domains
http://www.PrintlineAdvertising.co.uk/freeway

I tried that, but because the text document contains many tabs, numbered lists and indents, it just comes cack with a syntax error. I don’t know enough about PHP to be able to format the text manually, and as I said, it is a very long document and would take days to do.

Surely there must be an easier way to do this? The client wants the whole of this document to be displayed and is not satisfied with just a brief outline.

The page in question can be seen here:
http://www.trackdaymagazine.com/guests/shopguests.php

The other alternative would be to have the link ‘Privacy Notice’ bring up the policy in a new window, like if you click on the link ‘Privacy Policy’ on the bottom-left of the main page. But, as I have little experience of PHP, I wouldn’t have a clue how to do this.

Thanks


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

You don’t need to know anything about PHP only HTML formatting to add the text between the colons. But certain character might need escaping or an PHP error might come up.

Looking at the Privacy Policy link you posted, it already brings up a Freeway coded page. Did you already replace the page with Freeway code? or change the link in the OSCommerce home page?

On 19 Jan 2008, at 3:41 pm, DillyDog wrote:

I tried that, but because the text document contains many tabs, numbered lists and indents, it just comes cack with a syntax error. I don’t know enough about PHP to be able to format the text manually, and as I said, it is a very long document and would take days to do.

David Owen ::
Freeway Friendly Web Hosting and Domains
http://www.PrintlineAdvertising.co.uk/freeway

Does this do it?

<?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 */ $file_url="privacy.php"; $p_txt_l = join("",file("$file_url")); $p_txt = explode("n", $p_txt_l); $privacy_txt = ""; for($i=0;$i

On Jan 19, 2008, at 4:41 PM, DillyDog wrote:

I tried that, but because the text document contains many tabs,
numbered lists and indents, it just comes cack with a syntax error.
I don’t know enough about PHP to be able to format the text
manually, and as I said, it is a very long document and would take
days to do.

Surely there must be an easier way to do this? The client wants the
whole of this document to be displayed and is not satisfied with
just a brief outline.

The page in question can be seen here:
http://www.trackdaymagazine.com/guests/shopguests.php

The other alternative would be to have the link ‘Privacy Notice’
bring up the policy in a new window, like if you click on the link
‘Privacy Policy’ on the bottom-left of the main page. But, as I have
little experience of PHP, I wouldn’t have a clue how to do this.


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I’ve just had a better idea!

I’ll just remove the link in the shop page because there will always be a link to it on the containing page.

I’ll have to OK that with the client. In a way it’s a shame 'cos I always like to learn something new, and PHP is a weakness.

Thanks for all your help and time.

Regards

Tim


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options