Are you familiar with MySQL/PHP? If you are then it should be a walk in the park in most respects. If you're not, then you'll need to read up on it a bit here at SitePoint...there's not really any true turnkey solution, and in the long run it's better to check it out for yourself.
go back to the main page for sitepoint, and look for either Kevin Yank. What you are looking for is a tutorial written by him on mysql/ php. in the tutorial is a working joke text thing where folks can send in jokes, the jokes be managed and just about everything you mention.
the tutorial is 10 parts and is really complete. it is very compactly written and very precise.
check out the index for the tutorial and the vastness covered will be apparent.