Topic awaiting preservation: A Little Lost... (Page 1 of 1) |
|
---|---|
Paranoid (IV) Inmate From: everywhere |
posted 03-29-2003 14:43
Ok, I've taken on a project that I can see myself getting a little drowned under, and would quite like some help in what direction I should be moving in. It's basically going to be a small site for students at my school, where a few of the interested ones can post articles on various topics. These people will obviously not have knowledge of HTML or the mechanics of the web, I don't expect, so therefore I'm going to need some server side stuff to take care of things. The only language (server-side) that I know is PHP, so I'm pretty limited there. What I want is a page where a user can enter a password, upload a plain text file of the article, fill in a few text fields (name, title of article, etc.). Then what the script needs to do is somehow convert the text file into maybe an XML file, with tags enclosing the name, title, content etc. (however I have no real experience with XML. Finally index and display pages for the articles will have to be made by parsing the files and extracting the relevant content. That's an awful lot, I know, especially since I want to avoid a database, but I'd just like a few pointers/suggestions, and whether this is the right direction, and whether this can be done with PHP. Thank you very much in advance. |
Paranoid (IV) Mad Scientist with Finglongers From: Germany |
posted 03-29-2003 16:34
certainly can be done with php! |
Paranoid (IV) Inmate From: everywhere |
posted 03-29-2003 19:14
OK, I've thought about this some more, and set up a page which will create a file from an input, list all the files created, and print a specified file. The only thing to do now (other than prettyfying it) is to be able to parse the files and extract the title and name info from them. Currently having links to 4727567265.txt aint good. I've Structured the data as follows: |
Paranoid (IV) Mad Scientist with Finglongers From: Germany |
posted 03-29-2003 20:39
looking nice. |
Paranoid (IV) Inmate From: everywhere |
posted 03-29-2003 22:33
OK, almost finished on the coding side of this. Only one niggle left, that I can't figure out. If the input in in multiple paragraphs (i.e. there are more newlines than just in the headers) then I only get the first paragraph in $text. How can i fix this? |
Paranoid (IV) Inmate From: everywhere |
posted 04-01-2003 16:34
Thanks very much for the help, it's all up and running now, and ready for tomorrow's launch... http://members.lycos.co.uk/patespolitics (check out the articles sections for the php). Thanks again, couldn't have done it without you... |
Paranoid (IV) Inmate From: |
posted 04-01-2003 18:48
quisja how did you fix your paragraph issue? because I've been haveing the same one with a script of my own |
Paranoid (IV) Inmate From: everywhere |
posted 04-01-2003 19:32 |
Paranoid (IV) Inmate From: |
posted 04-01-2003 19:42
LOL, I think im going to have to Resort to search for HEX A0 I think it is :S and replacing it with <P>'s .. wich should be ehum....fun.. |