[Sig] Test forum is up
Dann S. Washko
Mon, 28 May 2001 06:26:09 -0400
I slapped together a very basic forum this evening. It's written in php
and visible at http://www.thelinuxlink.net/lvlinux/forum . There is also
a link off the home page.
This is a no frills forum so don't expect anything to knock your socks
off. There is very little in the way of layout. Basically, I wanted to
get down posting and having the topic posted to move to the top of the
list. It does this.
Each posting is added to the text of the original post.
Here is what happens:
There is a file called name in the forum directory. It holds the name a
filename located in the data directory and the topic of the file. The
name of the file is actually the date and time: yymmddhhmmss format.
Posting creates a new file with the date/time name. A new file: addname
is created to which the date/time name and topic are added on one line
seperated by "::::" without the quotes. The old name file is read into an
array and appended to the addname file to retain the order of the original
name file while placing the new item at the top of the list. The name
file is deleted and addname is renamed to name.
If you post to a topic that already exists, your information is appended
to the old file. A file called name.new is created. The oldfile in data
is renamed to the new date/time format in data. The date/time name and
topic are written to name.new. An array is called again from name and
this time it is passed through an if loop whereby all the lines in the
file are appended to name.new file except the line that contained the old
information on the file that was edited.
Again, name is deleted and name.new is renamed name.
There is a lot of repetition that could probably be taken out and I should
have a better naming structure for my variables. But, it was my first
Any suggestions (aside from layout and formatting) are requested.
Some things I would like to add:
The ability to edit the entire text of the topic. This would be on a
login/member use only.
Perhaps, scrap the above and make each reply a seperate link, but that
creates another level of complexity.
There is probably more I am missing, but I am very tired right now.
Daniel S. Washko
Lehigh Valley Linux Users Group
get slack (www.slackware.com ) and get happy