🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Time For The Blog Module!

posted in Rarely Spoken
Published June 08, 2005
Advertisement
Time for a more specific description of the blog module!

Main Features

  • Addition, modification, and deletion of entries (duh!)

  • Each entry may be placed in one or more categories

  • Support for comments

  • Per-entry privacy levels

  • Multiple owners



Addition, Modification, Deletion
These actions should be done using a very simple form which should look largely the same for each of these operations. The addition of an entry creates a timestamp representing the original post time. Modification will change a last-modified timestamp (preserving the original post time). The initial value for the last-modified timestampe is the original post time. Deleting an entry will also delete all comments associated with the entry.

Entries may be created by the owner(s) of a blog but only the original owner may modify the text of or delete a particular entry.

On the creation of an entry the owner will have the option to place it within one or more of the currently registered categories. The interface for creating a new category should exist at this time as well.

Also at creation time, a privacy level for the post can be selected. The post may be set to be viewable by anyone, those registered as 'friends', or by only the owners of the blog.

Finally, the original post time of an entry need not be the current time. An entry may have an original post time for sometime in the past (for reposted material) or sometime in the future (so that a blog may be appear to be updated even while the owner is away).

This is my planned database schema for each entry

Table: Entries
+--------------------------------------------------+| ID: unsigned int primary key                     |+--------------------------------------------------+| Author: (ID from Central User Database)          |+--------------------------------------------------+| Title: varchar(100)                              |+--------------------------------------------------+| Body: text not null                              |+--------------------------------------------------+| PostTime: datetime                               |+--------------------------------------------------+| LastModified: datetime key                       |+--------------------------------------------------+| Visibility: enum('public', 'friends', 'private') |+--------------------------------------------------+


Categories
Categories are a method of organizing entries. Viewers of the blog should be able to search for entries within a category. On top of the interface for creating categories in the add/modify/delete entry form, there will also be a separate interface for creating categories and managing which entries are within a category.

This is my planned schema for the categories

Table: Categories
+------------------------------+| ID: unsigned int primary key |+------------------------------+| Name: varchar(25)            |+------------------------------+


Table: CategoryLink
+----------------------------+| CatID: (key from Category) |+----------------------------+| EntryID: (key from Entry)  |+----------------------------+


Comments
Blogs arent too fun without comments but since they are a way for others to post things that you might not want posted so there needs to be a method of regulating and moderating comments. First, the privacy level on a post regulates exactly who can post a comment on a specific entry. Second, the administrators of the blog will have the power to delete comments as necessary. Since comments may also have reason to have a more restricted visibility, even in public entries, the comments will also have their own visibility setting.

Not all comments are replies to the original post and so each comment will have a designated 'parent' comment (where the original post is the same as the original comment) in order to preserve the structure of the discussion and there should be an interface that represents this structure. Deleting a comment will also delete all of its children comments.

Comments may be edited by either admins of the blog or by the member that posted them however only admins may delete a comment after the comment has children.

This is my planned schema for a comment

Table: Comments
+--------------------------------------------------+| ID: unsigned int primary key                     |+--------------------------------------------------+| Author: (ID from Central User Database)          |+--------------------------------------------------+| Title: varchar(100)                              |+--------------------------------------------------+| Body: text not null                              |+--------------------------------------------------+| PostTime: datetime                               |+--------------------------------------------------+| ParentID: unsigned int key                       |+--------------------------------------------------+| ParentType: enum ('comment', 'entry')            |+--------------------------------------------------+| Visibility: enum('public', 'friends', 'private') |+--------------------------------------------------+


Per-Entry Privacy Levels
Not all entries or comments should be public. Some may only be wanted for friends and other may only be wanted for individual viewing and so there are various privacy levels:

Private:
-Visible to the original poster and the admins of the blog

Friends:
-Visible only those listed in Private and to friends of the original poster

Public:
-Visible to everyone

These levels are inherited so that by default all comments to an entry or comment listed as 'Friends' will also have the 'Friends' privacy level. A comment may not have a less restrictive privacy level than any of its ancestors. A comment may set a more restrictive privacy level, however.

If the privacy level of a comment is changed to a less restrictive level, the privacy levels of its descendents will not change. If the privacy level of a comment is changed to a more restrictive level, the privacy levels of its children will be changed to that new level if and only if their original level was less restrictive.

Multiple Owners
A blog may have multiple owners that can make new entries to the blog. This will allow the blog to be used as, for example, a developer blog that each developer could make entries to.

This is my planned schema to implement multiple owners

Table: Owners
+----------------------------------+| ID: (From Central User Database) |+----------------------------------+
Previous Entry 4E4 = Awesome
Next Entry Blog Progress
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement

Latest Entries

4E6 PyGame

1381 views

4E5

1116 views

Happy Yesterday!

1071 views

Another Game

1278 views

Merry Christmas!

1051 views

Hello There

1050 views

Yay!

1065 views
Advertisement