Forum building help...
I need some help buling a forum/BB. I have designed a script that lets people post messages but not threads. I want a script that does not use MySQL (preferably a .dat file) where people can post a new thread (i need to be able to easily customise the layout, preferably all in tables) which also creates the appropriate file for the entrys. I just need it to create the file (i will write the code i just need it to create a file with that code in it).
I hope that made sense. I am designing a website for a band street team and i really want this to work but i am having serious difficulty.
If anyone can help please tell me. If you need to see the message script please just ask...
Hmm, I'm too used to using MySQL rather than text files... Could you provide a little more deatial as to what you have done so far?
Are you using separate .dat files for each thread? If so, look at the info at http://us4.php.net/manual/en/function.fopen.php
So far i have the main forum screen which says, welcome to the forum, please select a topic.. followed by a list of topics...
//I want it to take you from this topic to a list of threads which anyone can post (using a .dat file) then upon clicking on this it takes you to the add entry screen//
which i have allready done using a .dat file to store entrys. I need the script to create a file identical to my message script with a coresponding .dat file for logging the entrys. I thought about editing my message script to make it do this but i am a bit of a novice and i can't figure out a way to do it.
The section in // is the bit i can't do...
yeah i am using seperate .dat and php files for each thread but i need the script to create these files for me when a new thread is posted.
This is an example of the layout i wish to use...
<TABLE width="550" cellpadding=0 cellspacing=1 border=0>
<TABLE width="100%" cellpadding=4 cellspacing=1 border=0>
<TR><TD bgcolor='#000000' colspan=3>
<FONT SIZE="1" FACE="verdana" COLOR="#ffffff"><A HREF="/himforum.php?do=add_form&page=1"><FONT SIZE="1" FACE="verdana" COLOR="#ffffff">Click here to post new thread...</a></FONT></B>
<TR><TD bgcolor='#000000' align='right' valign='top'><FONT SIZE=2 FACE='verdana' color='#ffffff' Size='2'>1</FONT></TD><TD bgcolor='#000000' width='535'><a href="himforum.php" onmouseover="self.status=''; return true" onmouseout="self.status='' ; return true"><FONT SIZE='2' color='#df8d24'><u>Thread 1</u></font></a></FONT></TD></TR><TR><TD bgcolor='#000000' align='right' valign='top'><FONT SIZE=2 FACE='verdana' color='#ffffff' Size='2'>2</FONT></TD><TD bgcolor='#000000' width='535'><FONT SIZE='2' color='#df9d24'>Thread 2</font></FONT></TD></TR><TR><TD colspan=3 bgcolor='#000000' align='center'><FONT SIZE='1' FACE='verdana' color='#ffffff'>Page 1 of 1</FONT></TD></TR> </TABLE>
Man, it's so much easier with a database... Do you even have one? If you do, are you sure you don't want to use it? (Not to discourage your already made choice, but just wondering. )
I dont actually have any webspace at the moment and i don't know how to install a MySQL database into abyss... I like what iahve done but if you think it will be too difficult to keep alon this line then i may have to change...
Not too difficult--just thought it would be easier if you had one. That's all.
If it's not that difficult could you please explain it to me?
I could show you the script i have allready done and see if you could edit it to do the thing i want it to?
It's a massive script so i could email you it. It is way to big to put in one of these forum messages....
No, that's all right. It's kind of a multiple-file matter, to me anyways. What I normally do is make an /inc/ folder and include my funtions, headers, and footers in there, that way the only basic thing that's in my "visible" pages's source code is code, and just about only code. (If you caught all that, basically I just use more than one file to call from each file so I don't have to do main things that I'll need for basically every page, and thus I can edit the headers.php file in the inc/ folder and it will update all of the pages.)
I didn't understand that...
Like i said, i'm not very good at PHP and files thats why i'm not using a MySQL database....
I really need you to explain what i need to do in a language i understand...
Sorry i am too much of a dumbass....
Ha, no one is perfect.
Okay, let's get to a little coding... Hmm, this will be an intereseting process. Since you'll be using static files, rather than a database. I've never done this without a database... How do you plan to go about naming the .dat and PHP files? Random numbers (10 characters in length)? The PHP file would have to be named the same as the .dat file, so each PHP file would have to search for itself and replace the .php extension with .dat to select which .dat file will be read. Then, once that is decided, we'll need to write to the file the person's post, and delimit it with some character (preferably a combination, and keep the text in quotes). Then we'll parse it when it's displayed.
Sound good? I'll use this basic logic to see if I can come up with something, then I'll let you know what I come up with... As long as you're willing to learn along with me.
I understand that they need to be named the same and numbers is robably the best bet, I'll attatch the script and you can look at it and see if there is anyway i can do it....
I really want to learn PHP and this script is just one i found and edited a bit...
I will have to go for tonight but i hope to continue the lesson tomorow!
Thankyou for offering to help!
Last edited by spykemitchell; 09-18-2003 at 04:10 PM.
Worked it out... Phew this is hard...
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)