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 4 of 4
  1. #1
    New Coder
    Join Date
    Jul 2012
    Posts
    68
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Adding Category For PHP Forum Creation?

    Hey,

    I am making a forum with PHP so far this is what I have http://admintalk.net Now how do I add a category feature so all forums are in a specific category??

    The code can be accesed here
    http://admintalk.net/learn/help

    I am currently learning so all this this code is open source whilist i learn.

    I also want to make a feature where if a user is a admin, On the a permission table then dont display the forum or allow access to forum threads how can this be done?

    Been Working Hard going though this proccess think ive done great so far,

    Thanks

    Spudster

  • #2
    Master Coder mlseim's Avatar
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,385
    Thanks
    8
    Thanked 1,077 Times in 1,068 Posts
    The users table needs a username AND encrypted password.
    Also a column for 'userLevel'. I see now you just log in with a username.

    You'll need a column in the table that stores the posts ... a column for "category".

    =======

    What you're doing is a great way to learn PHP/MySQL, but a daunting task
    to actually make a secure and efficient forum. I'm suspecting that your
    MySQL database is not normalized correctly either:
    http://www.anchor.com.au/hosting/sup...tionalDatabase

    I also see you're not even sanitizing strings being put into your database:
    http://php.net/manual/en/function.my...ape-string.php

    Not trying to be picky, but security, validations, structure, user registrations,
    are things that you need to address at the beginning of your project.

    I would never have the guts (nor time) to attempt creating my own forum.
    So, I admire your passion for this.


    .

  • #3
    New Coder
    Join Date
    Jul 2012
    Posts
    68
    Thanks
    5
    Thanked 0 Times in 0 Posts
    Yeah i know there some sql injected thongs that I will fix as soon as i can..

    And how does Mybb or vbulletin make category linked with forums

  • #4
    Senior Coder Len Whistler's Avatar
    Join Date
    Jul 2002
    Location
    Vancouver, BC Canada
    Posts
    1,323
    Thanks
    26
    Thanked 100 Times in 100 Posts
    Quote Originally Posted by Spudster View Post
    Now how do I add a category feature so all forums are in a specific category??


    FORUM_CATEGORY
    category_id | category
    01 | Fishing
    02 | Holidays
    03 | Hiking
    04 | Bikes


    FORUMS
    forums_id | title | category_id
    001 | Biking Tips | 04
    002 | Summer Fun | 02
    003 | Trails | 03
    004 | Boots and Gear | 03
    005 | Mexico | 02
    006 | Fishing Tackle | 01
    007 | Buying Wheels | 04

    Primary Key = Bold
    Foreign Key = Italic


    ----
    Leonard Whistler


  •  

    Posting Permissions

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