32

I am building a new site which will consist of a mix of dynamic and static pages.

I would like to add commenting functionality to those pages with as little work as possible. I'm curious as to whether such a solution exists in PHP.

The ideal set of features would be:

  • Completely independent from the surrounding page / site: PHP code gets dropped into page, a page ID is added, done.
  • Simple "write a comment" form
  • Comments for each page are displayed using a PHP function
  • Nice, clean output of <ul><li>.... that can be styled by the surrounding site
  • Optional Captcha
  • Optional Gravatar sensitivity
  • Minimalistic administration area to moderate/delete comments, no ACL, can protect it using .htaccess

The ideal integreation would be like this:

<?php show_comments("my_page_name"); ?>

this would 1. display a form to add a new comment that gets automatically associtated with my_page_name; and 2. display all comments that were made through this form using this ID.

Does anybody know a solution like this?

Bounty

I am setting up a bounty because while there were some good suggestions, they all point to external services. I'm really curious to see whether there isn't anything self-hosted around. If this doesn't exist yet, it sure would be great to see as an Open Source project.

Community
  • 1
  • 1
Pekka
  • 442,112
  • 142
  • 972
  • 1,088
  • 1
    Note: Using short tags should be avoided when developing applications or libraries that are meant for redistribution, or deployment on PHP servers which are not under your control, because short tags may not be supported on the target server. For portable, redistributable code, be sure not to use short tags. From PHP Manual :) – OcuS Jan 12 '10 at 23:25
  • :) :) :) You're completely right, OcuS. Editing. – Pekka Jan 12 '10 at 23:25
  • Peeking into some WordPress commenting plugins might help. – John Jan 12 '10 at 23:26
  • Naaah, that would be almost as much work as doing it myself, if not more! I need a ready-made, standalone solution for a man who has decided to be lazy. :) – Pekka Jan 12 '10 at 23:27
  • When you say "building a site" is it from the ground up? Or are you using a blogging engine? – John Jan 12 '10 at 23:36
  • I mean from the ground up, using a mixture of techniques. I want to be able to drop a simple php command into every page I want to activate comments for. – Pekka Jan 13 '10 at 00:12
  • @Pekka - Great question, it reminds me an image gallery that I recently built - something simple, quick and usable. But obviously the current dev world is full of selling over-complicated solutions for simple thing. When people ask you to develop a simple html page, they will ask you to use apps like wordpress; when you write javascript, they ask why not use jQuery, awesome, huh :) – Jay Zeng Feb 08 '10 at 21:03
  • See also [*Free alternative to Disqus* - Software Recommendations SE](https://softwarerecs.stackexchange.com/questions/3439/free-alternative-to-disqus). – Franklin Yu Sep 30 '19 at 06:05

5 Answers5

13

If you really want an easy to use solution, then just download the intensedebate or Disqus comment HTML and you can leave spam checking, OpenID support, Comment sharing, and every other cool feature to them. You get the comments with no work!

It's a win-win. Then later on you can use their API's to pull the comments and put them in your database if you want to switch to a home-made solution.

This also means that you can still get SEO from the comments because when you pull them from the API you can display them in an <noscript> tag or hidden div for the search engines.

Xeoncross
  • 55,620
  • 80
  • 262
  • 364
7

This?:

http://www.gentlesource.com/comment-script/ - paid if used commercial, but...

http://cellbiol.com/scripts/free_php_guestbook/free_php_guestbook.html - flat-based, weird design of page (... :]), but has free and simple version

http://www.playaparaiso.org/talkback/doc/ - free, they "require" small donation if you want to remove their logo

sventechie
  • 1,859
  • 1
  • 22
  • 51
Adam Kiss
  • 11,811
  • 9
  • 48
  • 81
6

HashOver is an up-and-coming free and open source (AGPL) PHP comment system that has both a simple JavaScript and PHP implementations. It is self-hosted with a flat file (XML) database.

Further reading: http://tildehash.com/?article=why-im-reinventing-disqus

Test it out: http://tildehash.com/comments.html (JavaScript, change '.html' to '.php' for PHP-mode)

It will be getting its official version 1.0 release this March (the 25th). With features like spam filtering, language localizations, comment sorting, IP address blocking, and better administration control.

Coffee'd Up Hacker
  • 1,356
  • 11
  • 23
3

IntenseDebate or Disqus are good enough, but they are not open-source and you are dependent. The open-source solution I suggest you to look at is these Projects:

Riceball LEE
  • 1,541
  • 18
  • 18
0

Comment systems can be very database heavy and bog things down. I would checkout:

http://intensedebate.com/

You could call it the Wufoo of comments (only better). I've not used it on my own site, but know some people who do and they love it.

Pekka
  • 442,112
  • 142
  • 972
  • 1,088
orokusaki
  • 55,146
  • 59
  • 179
  • 257