Providing commenting capability to legacy PHP websites.

Problem: FamilyEducation Network is a series of websites for Parents and Teachers. They include these and several more sites:

http://life.familyeducation.com
http://fun.familyeducation.com
http://school.familyeducation.com

They wanted to give users of the site the ability to comment on articles on these sites. To do this it was decided that we would use Drupal as wrapper for comments. These comments are hosted on http://comments.familyeducation.com.

To do this I created a new content type "external_page" as a container for the comments. From the external site there is a link at the top of the article called "comments(5)". The number in parenthesis is the number of comments that this article currently has. If there are no comments a 0 will be displayed.

When the user clicks on the comments link they will then be taken to http://comments.familyeducation.com on the unique page for that articles' comments.

I created a module which creates the external_page node if it doesn't already exist. I also did several theme changes to the comments form. It was a good opportunity for me to learn how to use the forms api.

This was the first full scale module and site that I developed for Drupal, as such I am not satisfied with my solution to this problem. Although, I did learn a lot about how to work with Drupal and got a full understanding of the 'hook' methods. I will not post my module here as I don't believe it would be a good thing for anybody to reuse :-)

You can get an idea of how this works by going to this link.

http://life.familyeducation.com/divorce/divorce-counseling/45515.html

This currently has 10 comments on comments.familyeducation.com.

http://comments.familyeducation.com/LFE/divorce/divorce-counseling/45515...

Note: if you want to add a comment you will need to register.

No votes yet