Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-01-2012, 09:39 PM   PM User | #1
DigitalMikey
New to the CF scene

 
Join Date: Jun 2011
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
DigitalMikey is an unknown quantity at this point
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?
DigitalMikey is offline   Reply With Quote
Old 04-02-2012, 05:24 AM   PM User | #2
Keleth
Senior Coder

 
Join Date: Jun 2008
Location: New Jersey
Posts: 2,354
Thanks: 45
Thanked 247 Times in 244 Posts
Keleth is on a distinguished road
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.
Keleth is offline   Reply With Quote
Old 04-03-2012, 01:37 PM   PM User | #3
dk4210
New Coder

 
Join Date: Nov 2002
Posts: 99
Thanks: 13
Thanked 0 Times in 0 Posts
dk4210 is an unknown quantity at this point
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
dk4210 is offline   Reply With Quote
Old 04-03-2012, 03:15 PM   PM User | #4
tangoforce
Senior Coder

 
tangoforce's Avatar
 
Join Date: Feb 2011
Location: Your Monitor
Posts: 3,504
Thanks: 45
Thanked 439 Times in 428 Posts
tangoforce will become famous soon enoughtangoforce will become famous soon enough
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.
__________________
Please wrap your code in [php] tags. It is a sticky topic and it HELPS us to HELP YOU!
TIP: Coding styles and $end errors :::::::::: TIP: Warning: Cannot modify header information - headers already sent :::::::::: TIP: Quotes / Parse error: syntax error, unexpected T_..
PHP Code:
//Please don't use this for your form processing:
if (isset($_POST['submit']))
//Internet explorer has a bug and does not always send the submit value. 
Explanation: The IE if(isset($_POST['submit'])) bug explained.
tangoforce is offline   Reply With Quote
Old 04-03-2012, 03:29 PM   PM User | #5
dk4210
New Coder

 
Join Date: Nov 2002
Posts: 99
Thanks: 13
Thanked 0 Times in 0 Posts
dk4210 is an unknown quantity at this point
yea ... What he said..
dk4210 is offline   Reply With Quote
Reply

Bookmarks

Tags
forum, php forum

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:32 PM.


Advertisement
Log in to turn off these ads.