Try this. First, change your page filename to end in .php using the Page Inspector.
Next, draw an HTML box where you want your magic text to appear. With your text cursor in the HTML box, type two spaces, then press the left arrow key once to place your cursor between them. From the main menu, choose Insert / Markup Item. In the dialog that appears on screen, paste the following code, then modify it to match the actual relative path to your text files folder and the name of a particular file in that folder.
<?php echo nl2br(file_get_contents('../text_files/file1.txt')); ?>
Okay the dialog and then select all text (the space - markup item - space sandwich) in the box and apply your preferred styling. Note that there can only be one level of styling here, it’s going to act like a single large paragraph, no matter how many logical paragraphs there are, denoted by two returns in a row.
Upload the resulting page to your server and try it out in a browser. You should see something (maybe an error message) in the middle of the box where you added the markup item. Report back and we can zero in on getting this to work for you.
Notes: The relative path to the folder means “starting with the location of the file with the file_get_contents call, how would you construct a URL to the text files folder?” In the example above, let’s say that the test.php file (the page we have coded in Freeway) lives at the top level of the htdocs folder. If you follow the …/ (up and over) command, you will deduce that the text_files folder lives next to the htdocs folder, that is, in the same parent folder. You don’t have to use a relative path, you can also use a root path if you know it. Say your account folder is found in /var/homes/j/james. Your htdocs folder (or whatever your server admin decided to call it) would be at /var/homes/j/james/htdocs, and thus your text files could be at /var/homes/j/james/text_files. In this example, I am encouraging your to place the text_files folder somewhere outside of the htdocs (or local equivalent) folder, because anything below that level will be visible by default, and if you want to secure it, you will need to follow additional steps to do so.
Also, there is nothing you can count on being installed on your server that will let you read .doc files as anything other than a mash of binary data. Text is fine, any other proprietary format will require translation.
Walter
On Aug 14, 2012, at 3:28 AM, James I wrote:
So… just to try to clarify…
I don’t mind using FTP - all the text doc’s are in a different folder so there a bit of security there.
I just want to “Extract” the text from a .txt or a .doc or any format really and have Freeway show it using it’s own style and formatting as if it were a regular text bow, that way it’l wrap and change size properly.
Maybe there’s nothing out there… I don’t know!
Thanks all:D
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options