Code
I only have one project here right now: It's a simple standalone comments thing which is a cut down version of the comments system I use on this site. It's very much a matter of plugging it into your system.
Python Comment System
Download this here: comments.tar.gz -- last updated 15/08/2010What it does:
This is made up of a Python CGI script that will write and retrieve comments for a particular "entry_id" to/from a database. A handy sample index.html is included to show you what you need to include in the form for this to work. It uses Ajax for retrieving comments so you can use it on plain HTML pages. To do this you need the Jquery libraries (the version that I know works is included).
What you need:
- sqlite3
- Python 2.6 (other versions may work but have not been tested)
- Python modules: sqlite3 cgi cgitb os time urllib urllib2 smtplib
- An SMTP server that can send email from your server
- A ReCaptcha account with a private key http://www.google.com/recaptcha
- a CGI capable web server or similar
If you want to use the sample index/index.html:
- jquery libraries (included)
- Edit the variables in comments.py and the URLs in index.html to point to the right places.
- uncomment the create_db() line, second-to-last line of the file comments.py
- browse to where comments.py is located on your web server, or run comments.py using `python comments.py' from the command line.
- re-comment or delete the create_db() line (yes I know this is dodgy)
- test it out by browsing to wherever your index.html is (this could be the same directory, but it could be elsewhere on your server).