assignment #3

Download Report

Transcript assignment #3

Web Programming
Assignment #3:
Admin, Moderator and User Functions
due: 11/16/2010
Old Dominion University
Department of Computer Science
CS 418/518 Fall 2010
Martin Klein <[email protected]>
Requirements - Users
• “Registration” function for new users
– use a 2 step procedure to reduce illegitimate registrations:
1. a person requests an account on your BBS
2. you send them an email with the necessary information to
complete the registration
(typically a confirmation link with a 1-time key used to verify that
particular registration request)
• “Forgot password?” function to email password
reminders (or password reset) to existing users
– Implies user login with credentials (email address)
• At registration, users can specify if they want to
receive:
• text/html email
• text/plain email
• both
Requirements - Users
• Users can edit their own posts
– (leave some indicator that the post was edited)
• e.g. “this post edited on 2010-11-09T17:20:11 by mklein”
• Users have a “remember me?” option when
logging in
– example: http://tt.tennis-warehouse.com/index.php
– server will send a cookie to the client so the user will
automatically be logged in if they return to the BBS in,
say, 5 minutes (a real value would be longer)
• Explicit “log out” function that terminates the
current session & the “remember me” cookie from
the above requirement
Requirements - Users
• Keep track of user stats:
–
–
–
–
number of posts
date of last post
date registered in the BBS
Define your own user “ranking” scheme
• e.g.: “newbie, user, veteran, no life” or “walk-on, travel squad, 2nd
line, starter”…
• make up your own values & formula
• Users can upload avatars during registration
– example: http://tt.tennis-warehouse.com/showthread.php?t=354394
• some users have avatars, some don’t
• Avatars & “user levels” are displayed when users read
posts
Requirements - Admins &
Moderators
• Administrator should have an “overview” of all registered users,
summarizing their activities (date registered, posts, replies, etc)
• Administrators and Moderator functions:
– “freeze” entire threads (no more replies, but not deleted)
– edit & delete message (leave some indicator that the message was edited
or deleted)
• Do ‘the right thing“ when deleting msgs re: replies
• check for race conditions: e.g. a msg being deleted after a user has begun the
reply process but before they hit “submit”
– “suspend” & “un-suspend” user
– suspend = no messages until suspension is lifted
• send email re: action to the user
• Administrator only functions (in addition to those introduced in A2):
– delete users
– also send email informing why
baseURL for Submission
• http://mln-web.cs.odu.edu/~username/a3/
• These URLs will be valid for all students
– If you are in a group, only 1 URL will have the actual
PHP
– The “other” URL will auto-redirect to the “right” URL
Recommendations
• Debug within your group first, then ask for
other groups to help debug your operations
• Your status report on 11/09/2010 is for your
benefit and the benefit of your peers!
• Not for me…
• It is not optional
Grading
• There will be an in-class demo on 11/16/2010
• Nitin will assign 17 points based on a detailed examination
after the class
– Do not edit the files after midnight!
– Late penalty: 3pts for every 24hrs
• Each group will grade the aesthetic appearance of the other
groups’ BBSs
• Email Nitin and cc me a score of 0-3
• Each group will receive the average value (same rounding
principle)
– If you do not send your grades in within 24 hours, your group will lose 3 points
from your assignment
• Grades should be available before the next class
START NOW!!!