rejetto forum

Software => HFS ~ HTTP File Server => Topic started by: bugz000 on March 21, 2011, 07:51:33 AM

Title: open in browser rather than download?
Post by: bugz000 on March 21, 2011, 07:51:33 AM
Hello, i am looking to make a page where i can log funny quotes from IRC and such, i have tried to create a database but HFS does not support PHP, so i have decided to go with a flat text file, but the problem i have is that the text file (after becoming too big) tends to appear as a download, rather than view inside the browser itself, is there a way to force it to open in the browser?
i ticked "do not consider a download" in the options but to no effect :-\
Title: Re: open in browser rather than download?
Post by: rejetto on March 21, 2011, 01:04:50 PM
how big is it?
what's the full name of the file?
Title: Re: open in browser rather than download?
Post by: bugz000 on March 21, 2011, 03:56:00 PM
well my quotes page is not on the website at the moment, although i can show you some samples.

http://www.bugz000.co.uk/Files/Program%20Development/commandlist.txt at 1.04 KB opens fine in the browser

http://www.bugz000.co.uk/Files/Program%20Development/source.txt  at 22.56 KB however is opening as a download

is there a way to force a file similar to "source.txt" to open the same way "commandlist.txt" opens?
Title: Re: open in browser rather than download?
Post by: rejetto on March 21, 2011, 04:37:00 PM
both are showing in the browser to me.

anyway, HFS has an option for it
menu > other options > open directly in browser

check if the .txt is in the list
but keep in mind that's only a suggestion to the browser, there's no way really force it.
Title: Re: open in browser rather than download?
Post by: bugz000 on March 21, 2011, 05:27:51 PM
okay instead of having a flat text file, is there a way to create a page that will use a text file as a source, for example, the HFS template uses the filesystem as a source, and generates the tables of files etc that you see on the site.

is there a way to have a flat text file which a template reads and then displays each line as an entry?
meaning i only have to put new entries into the quote.txt and it will generate pretty graphics etc around that?
Title: Re: open in browser rather than download?
Post by: rejetto on March 22, 2011, 12:52:05 PM
yes, it's possible, but it's not a ready-made only-click solution,
it's actually as creating a program for your specific purpose, and you (or someone for you) have to make it.

If you are good at html then you can solve with a decent text editor.
If you are not, you see 2 options
- let someone else make the work for you (for money or friendship)
OR
- open the file into a word processor (like Microsoft Word), format it as you like it, and save as html. This format is easily displayed by the browser itself.
Title: Re: open in browser rather than download?
Post by: bugz000 on March 22, 2011, 06:00:13 PM
okay, thanks loads for the advice,

as i have very limited knowledge on HTML, let alone PHP, i have decided to try and battle with Apache HTTP server and get that running, but using HFS as the main "website" as such, binding apache server to port 8080, set a link on the index page to point to domain:8080 (apache server) which will be hosting a pre-made quote database php/mysql system!

that way i get the best of both worlds, the smooth GUI, easy filesystem etc of HFS while having the PHP support of apache
Title: Re: open in browser rather than download?
Post by: rejetto on March 23, 2011, 10:49:24 AM
it's a bit overkilling, but ok.
if you post a bit of your text file here, someone may find the time for an HFS-only solution.