12.11 php saved
PhpNut
Tags add more
application, framework and other framework  
Note
Application to be developed using PHP framework of choice.
  1. Users can have many posts
  2. Users can be Admin with control over all other users
  3. Posts can have many comments
  4. Comments are threaded
  5. Posts are tagged
  6. First page will list random latest post from all users and have a tag cloud on the page, linking to lists of posts related to the tag
  7. Clicking on the title will take to full post with comments threaded below it
  8. Clicking on a users name in a post will take you to that users posts list showing all recent posts
  9. Comments editable by admin only
  10. Comments are moderated, not moderated of off all together
  11. Sessions will be used to "authenticate" user
  12. Users can request access to blog, this will create an account for then active being set to 0 until a user with admin rights turns it on
  13. Data output from the database, must be sanitized to remove any chars that could be harmful.
  14. If there is a url in the body or content it needs to be converted to a linked url
  15. Queries can be cached.
  16. Models can be cached.
  17. No view output can be cached (data displayed as html)
  18. Output will be in HTML and RSS feed
  19. If database is altered in anyway, these changes must agreed and changed in all installs
  20.  
  21. CREATE TABLE comments (
  22.   id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  23.   post_id INTEGER(10) UNSIGNED NOT NULL,
  24.   comment_id INTEGER(10) UNSIGNED NOT NULL,
  25.   published TINYINT(1) NOT NULL,
  26.   title VARCHAR(100) NOT NULL,
  27.   body TEXT NOT NULL,
  28.   username VARCHAR(100) NOT NULL,
  29.   email VARCHAR(255) NOT NULL,
  30.   website VARCHAR(255) NULL,
  31.   created DATETIME NULL,
  32.   modified DATETIME NULL,
  33.   PRIMARY KEY(id),
  34.   INDEX PUBLISHED_INDEX(published)
  35. );
  36.  
  37. CREATE TABLE posts (
  38.   id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  39.   user_id INTEGER(10) UNSIGNED NOT NULL,
  40.   title VARCHAR(100) NOT NULL,
  41.   content TEXT NOT NULL,
  42.   comments TINYINT(1) NOT NULL,
  43.   moderate TINYINT(1) NOT NULL,
  44.   created DATETIME NULL,
  45.   modified DATETIME NULL,
  46.   PRIMARY KEY(id)
  47. );
  48.  
  49. CREATE TABLE posts_tags (
  50.   post_id INTEGER(10) UNSIGNED NOT NULL,
  51.   tag_id INTEGER(10) UNSIGNED NOT NULL
  52. );
  53.  
  54. CREATE TABLE tags (
  55.   id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  56.   name VARCHAR(20) NULL,
  57.   keyname VARCHAR(20) NULL,
  58.   created DATETIME NULL,
  59.   modified DATETIME NULL,
  60.   PRIMARY KEY(id),
  61.   UNIQUE INDEX KEYNAME_UNIQUE_INDEX(keyname)
  62. );
  63.  
  64. CREATE TABLE users (
  65.   id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  66.   actvie TINYINT(1) NOT NULL,
  67.   admin TINYINT(1) NOT NULL,
  68.   username VARCHAR(100) NOT NULL,
  69.   email VARCHAR(255) NOT NULL,
  70.   passwd VARCHAR(45) NOT NULL,
  71.   created DATETIME NULL,
  72.   modified DATETIME NULL,
  73.   PRIMARY KEY(id),
  74.   UNIQUE INDEX USERNAME_UNIQUE_INDEX(username),
  75.   UNIQUE INDEX EMAIL_UNIQUE_INDEX(email)
  76. );
Parsed in 0.079 seconds, using GeSHi 1.0.7.14

Modify this Paste