A blog post system using PHP and MYSQL
- Log in/out with password
- Mobile responsive
- Cached drafts
- Paging
- Comments
- Editing for owners
- API for articles
- Users have to log in to post/comment
- Topics/contents have to be long enough
- Only owners can edit
Working on url rewrite with mod_rewrite
module but failing.
/api.php?request=post&number=all
Retrieve all article objects in json array/api.php?request=post&number={articleId}
Retrieve article object with id 'articleId'
- Auth:
+--------------+-------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +--------------+-------------+------+-----+---------+----------------+ | id | int(11) | NO | PRI | NULL | auto_increment | | username | varchar(20) | YES | | NULL | | | passwordhash | varchar(50) | YES | | NULL | | +--------------+-------------+------+-----+---------+----------------+
- Post:
+-----------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-----------+--------------+------+-----+---------+----------------+ | id | int(11) | NO | PRI | NULL | auto_increment | | topic | varchar(255) | YES | | NULL | | | content | longtext | YES | | NULL | | | author | tinytext | YES | | NULL | | | post_time | tinytext | YES | | NULL | | +-----------+--------------+------+-----+---------+----------------+
- Comment:
+-----------+----------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-----------+----------+------+-----+---------+----------------+ | id | int(11) | NO | PRI | NULL | auto_increment | | articleId | int(11) | NO | | NULL | | | author | tinytext | YES | | NULL | | | content | longtext | YES | | NULL | | | post_time | tinytext | YES | | NULL | | +-----------+----------+------+-----+---------+----------------+
- Delete posts for owners
- Make log in/out prettier
- Make pagination prettier
- Add some JS animations
- Move log in/out to main page
- Different authorization levels for users
- APIs for articles, comments and users