Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Jun 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Creating a PHP Forum

    Hello everyone,

    I'm possibly looking in to creating a custom forum with PHP and was wondering if anyone knows any good basic scripts/frameworks that are simple but easy to build upon?

  • #2
    Senior Coder
    Join Date
    Jun 2008
    Location
    New Jersey
    Posts
    2,535
    Thanks
    45
    Thanked 259 Times in 256 Posts
    Read phpBB or vBulletin code and get at it. I've been writing a custom forum for quite a while now, and its very complex to do right. If you're looking for something simple, just basic threading, that's pretty straight forward, and a simple google search yields plenty of results.

  • #3
    Regular Coder
    Join Date
    Nov 2002
    Posts
    103
    Thanks
    13
    Thanked 0 Times in 0 Posts
    Well to me it's depending on if you want to learn or you need to get the forum added to your site soon.

    If you want to learn, it's best to sit down and plan it out. Make sure you have access to a database(phpmyadmin), because you will need it. Just start coding piece by piece.


    If you are in a hurry (Like your boss in on your back) you can't beat phpBB or vBulletin.. I am sure hundreds if not thousands of hours have went into development of those projects. You can get a solution up quick.. The only part you would have to worry about is customizing the look.

    As far a great framework. There are many out there like yii framework, Cake, Zend.. You can google php frameworks and you will prob go through the results all day..Each one of the frameworks have a learning curve.


    Hope this helps
    Dan

  • #4
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,283
    Thanks
    57
    Thanked 523 Times in 510 Posts
    Blog Entries
    5
    I haven't got anything for you to use but I do have some advice..

    Limit the number of queries you need to execute on the mysql / database server. Anything you'll need to refer to more than once per http call (eg a permissions table) should be pulled out and stored in a global variable. Failure to adhere to this can result in you having in excess of 200 database calls which upscaled by 100 visitors will grind your forum / site to a halt very quickly. To counter this you're best pulling data out, storing it globally either as a variable or object and then having a method for changing certain parts of data which will update the database and then update the var/object.

    Reason I'm bringing this up is because I started PHP moons ago by creating my own CMS for my site. I've tidied bits up as the years have gone by and made things far more efficient etc but even now I'm still seeing 65-70 queries per http call (it's proving to be a pain to rewrite too - I've been scratching my head for days). On my localhost it can grind down my machine quite considerably. You need to plan it out from the ground up even if that is rather boring. If you're not good with table joins then master that now to save yourself too much hassle later down the line as getting that clear in your head now will be your saving grace. Also learn to update tables that are joined too - you'll thank yourself for it later.
    See my new CodingForums Blog: http://www.codingforums.com/blogs/tangoforce/

    Many useful explanations and tips including: Cannot modify headers - already sent, The IE if (isset($_POST['submit'])) bug explained, unexpected T_CONSTANT_ENCAPSED_STRING, debugging tips and much more!

  • #5
    Regular Coder
    Join Date
    Nov 2002
    Posts
    103
    Thanks
    13
    Thanked 0 Times in 0 Posts
    yea ... What he said..


  •  

    Tags for this Thread

    Posting Permissions

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