Add comments to any PHP script

I recently updated My Two Cents. My Two Cents (or MTC) is a simple PHP class to add comments to any PHP driven site. It is was written with simplicity in mind but still has some strong features and is easily tweakable.

It consists of a single PHP file and can be added with just a few lines of code.

MTC comes with a CAPTCHA mechanism and a blacklist feature to fight comment spam. The new release adds audible CAPTCHAs as described in Joining .WAVs with PHP. I also tweaked the way Gravatars are used to make additions like MonsterID easier to add.

International users will be happy to hear that all string now can be easily changed through a single language array.

To see the script in action just have a look at the comment form below. It's powered by MTC. Detailed usage infos are available in the manual.

Tags:
php,
comments,
captcha,
mtc
Similar posts:

 
Posted on Saturday January the 27th, 2007 (23 months ago).

Comments

1
This is pretty awesome. I can't wait to install this on my web site!! I've been wanting to do something like this for years!!
2007-03-13 15:27:41
2
Very nice!  I will give it a try!
2007-03-15 05:08:47
3
do i get to pick my icon? hmm.. nice script!
2007-04-02 04:19:50
4
I deleted all test comments, because they add no value to the site. Just a note because some people seem to confuse it: The monster icons are *not* provided by MTC but by MonsterID which is a separate script. But both can easily work together.
2007-08-25 20:34:02
5
does it prevent the same person from constantly posting?
2007-12-18 21:57:36
Jay
6
Jay, there is no flood control. But the CAPTCHA makes flooding much harder.
2007-12-18 22:05:42
7
Wow, that wasn't all that bad to figure out.  Thank you.
2008-01-04 01:05:18
Josh
8
Looks like the kind of code I was wanting. Thanks for the info.
2008-01-19 00:57:10
9
Good one, seems nice...
2008-03-10 16:01:45
Shane
10
I will try it... Thank you!
2008-03-10 16:02:50
11
cool i hope this works!
2008-03-20 09:42:07
meg
12
Captcha is best protect!
2008-03-23 18:10:20
13
I get this error Fatal error: Call to a member function comments() on a non-object in E:\wamp\www\radiouri\admin\db_fns.php on line 35 , on this line i have inside a function wich display the page content :
$MTC -> comments();
$MTC -> comment_form();
2008-03-29 14:09:17
Marius
14
I figure it out !
if is inside a function it must be global, so make it global - global $MTC. That all.
And if your site is dynamic ( ?cat=1&id=2 ) you must change in mtc.class.php on line 88 from $_SERVER['PHP_SELF'] to $_SERVER['REQUEST_URI'] and probably on line 513.
2008-03-29 14:42:46
Marius
15
this is awesome
2008-08-27 07:49:23
pepe
16
testing...
2008-11-05 06:28:34
thamil
17
does this work?
2008-11-12 18:55:53
bob
18
Testing MTC
2008-11-12 19:33:19
Sid
CAPTCHA

No HTML allowed. URLs will be linked with nofollow attribute. Whitespace is preserved.

 
 

Blog

Older Weblog articles are available in the Archive, subscribe to the
Full Content RSS Feed
to stay tuned. (learn more)

Subscribe to the Feed

Recent Blog Entries

 

This is the personal web site of Andreas Gohr - human being, blogger and web geek from Berlin, Germany.

This page was last updated at 2007/01/27 11:49.
Imprint/Impressum

Tagged at del.icio.us:

Bookmarks: 5

View blog reactions

Advertising:

Advertise Here
advertise here

Recent readers: