Tutorials Home Scripts Home

Advanced PHP Comments System With jQuery

Advanced PHP Comments System With jQuery

This PHP Comments System is


  • Clearly programmed, very easy to use in your application.
  • designed specifically for the development to fit with your web site.

Required


jQuery 1.2.6+


demonstration

thanks you Freddy for hosting the demo
the link here

Features


  • its very fast and very easy to use.
  • it has standard validation.
  • From now on,there is no spamming comments by robots because its not useing the <form></form> tags.
  • its working without loading the page or redirect to other page.
  • its has cool loading effect when tring to post your comment.
  • much more...

how it work

It Using append() to add the new comment body to the comments element with jQuery.


jQuery's function append() can be used to add text or html to an element. It's very easy to use and this post shows some example code and has a working example where you can type in some text that will be appended to a div.

This operation is the best way to insert elements inside, at the end, of all matched elements. It is similar to doing an appendChild to all the specified elements, adding them into the document.

NOTICE:


  1. if you want to insert the new comment in the lowest of comments (the bottom of comments) use the append() function (this is the default).
  2. if you want to display the inserted comment in the upper of comments use the prepend() function.

this mean if you want to do that go to the style/jooria-js.js on line 30 replace the


$("ul#list").append(html);
to
$("ul#list").prepend(html);

the script depend on this function

$(function() {
    $(class or id).jooria_comment(url);
});

function Parameters

url

is the url which the date will send to it.

example:

$(function() {
    $('.submit').jooria_comment('index.php?case=add');
});

what is '.submit'?

is the botton class

<button class="submit">Posting Quick Reply</button>

you can download the full code and the examples and test it in your local host and open the index.php to change the mysql login information

Category: Website development | Views: 4,244 | on: December 15, 2009 | by: jooria
Enjoyed the article? Subscribe and get the new Tutorials

Enter your email address:

Last 6 Responses

Comment form

  1. xtremex About 3 months ago
    good tutorial :)
  2. ysfun About 2 months ago
    Good Man
  3. Eblek Gublek About 1 months ago
    Nice scripts....
  4. Gust About 4 weeks ago
    Where can we see a demo?
  5. muftah About 3 weeks ago
    yes this excullent tutorials
  6. Trevor About 1 weeks ago
    Nice script. The demo openly displays email addresses in the code. That could be fixed with a quick js function.

Leave a Comment

Comment form