Your Ad Here
Google

Tuesday, March 06, 2007

 

ajax Generic Comments Module

Introduction


This article will show you how to use this generic comments module which
implemented using php 4.0, mysql and Ajax.

This module is now running in href="http://www.ajaxprojects.com/">http://www.ajaxprojects.com/ you can see
it in every project review page.

Sample screenshot
Here the user will
enter his information and his comments.

Sample screenshot
When the user
clicks on submit comment button the comment will be submited without any page
refresh and the new coment will appear.

Installing Database Scripts


The database will be located in the source code folder in
sourcecode/sql/script.sql just open your mysql client and run it to install the
database.

How can I add it to my code



  1. Include the files of the comments module in your application folder.
  2. in your code include the comments.php file to be able to show the comments
    module
  3. The comments will show specific comments of every page according to the
    ForiegnID which identifies the page which will show the comment. (ie. the
    ForiegnID of the an article can be "A"+$i where $i is the id of the article in
    your application database. so you can use the same module in many
    pages(articles, news, reviews,..)

<?php
$i =0; // $i can be your article id
$ForeignID = "comment-$i" ;
require("includes/comments.php");?>

 


 


 

 



Labels:


Comments: Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?