dcsimg
www.webdeveloper.com
Page 1 of 40 12311 ... LastLast
Results 1 to 15 of 599

Thread: Forum building help...

  1. #1
    Join Date
    Sep 2003
    Posts
    283

    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...

  2. #2
    Join Date
    Jan 2003
    Location
    Texas
    Posts
    10,413
    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?

    [J]ona

  3. #3
    Join Date
    Dec 2002
    Location
    High on life
    Posts
    10,104
    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

  4. #4
    Join Date
    Sep 2003
    Posts
    283
    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...

    Please help....

  5. #5
    Join Date
    Sep 2003
    Posts
    283
    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.

  6. #6
    Join Date
    Sep 2003
    Posts
    283
    This is an example of the layout i wish to use...



    <center>
    <TABLE width="550" cellpadding=0 cellspacing=1 border=0>
    <TR bgcolor='#df9d24'>
    <TD>
    <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>
    </TD></TR>
    <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>
    </TD>
    </TR>
    </TABLE>

  7. #7
    Join Date
    Jan 2003
    Location
    Texas
    Posts
    10,413
    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. )

    [J]ona

  8. #8
    Join Date
    Sep 2003
    Posts
    283
    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...

  9. #9
    Join Date
    Jan 2003
    Location
    Texas
    Posts
    10,413
    Not too difficult--just thought it would be easier if you had one. That's all.

    [J]ona

  10. #10
    Join Date
    Sep 2003
    Posts
    283
    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....

  11. #11
    Join Date
    Jan 2003
    Location
    Texas
    Posts
    10,413
    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.)

    [J]ona

  12. #12
    Join Date
    Sep 2003
    Posts
    283
    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....

  13. #13
    Join Date
    Jan 2003
    Location
    Texas
    Posts
    10,413
    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.


    [J]ona

  14. #14
    Join Date
    Sep 2003
    Posts
    283
    Sounds great!!!!!!!

    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!

    Spyke.

    Last edited by spykemitchell; 09-18-2003 at 04:10 PM.

  15. #15
    Join Date
    Sep 2003
    Posts
    283
    Worked it out... Phew this is hard...
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 2 users browsing this thread. (0 members and 2 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles