AJAX/PHP Comment Script

Discussion in 'JavaScript' started by XT Gohan, Sep 1, 2008.

  1. #1
    I was wondering if there was a stand-alone "posting comment script" for AJAX. Not for blogs, wordpress or anything like that, I am trying to use this on website just so that people can comment on my website without having to reload or refresh a page.

    I also don't mind paying someone for a script of this caliber either, if it is possible please let me know
     
    XT Gohan, Sep 1, 2008 IP
  2. Panzer

    Panzer Active Member

    Messages:
    381
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    58
    #2
    Well its fairly simple to create.

    You need to attach a button click (the submit button) to an event, and for it to return false to the form doesn't submit. Then send a request with AJAX..

    I have one that i made with jQuery for sale if you want..
     
    Panzer, Sep 1, 2008 IP
  3. xlcho

    xlcho Guest

    Messages:
    532
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #3
    It's pretty simple, but it depends on your site's database and structure. I mean, sending an AJAX request is easy, but without knowing what to execute on the server is a problem :) I assume you just need to insert the comment into a database. Give a little bit more info, cause all I can tell you for now is you need a textarea and a button..
     
    xlcho, Sep 1, 2008 IP
  4. koolman

    koolman Peon

    Messages:
    76
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You may use the UpdatePanel of KoolAjax, it is as simple as bellow:
    
    <?=KoolScripting::Start();?>
        <updatepanel id="comment">
            <content>
                <?php
                    if (isset($_POST["txtComment"])
                    {
                        //Add new comment to the database
                    }
                    //Out put all available comments from database here
                ?>
                <input type="textarea" id="txtComment" name="txtComment"/>
                <input type="button" id="btnPost"/>
            </content>
            <triggers>
                <trigger elementid="btnPost" event="onclick"/>
            </triggers>
        </updatepanel>
    <?=KoolScripting::End();?>
    
    Code (markup):
    How does it work?

    First load, [all the comments] + [a comment textarea] + [a post button] is output to screen.

    When btnPost is clicked, UpdatePanel will do callback and post txtComment to server without reloading the page.

    At server-side, if $_POST["txtComment"] exist then add new comment to comment list in database.

    Out put all available comments including new one to client. The client will update change from server.

    Pretty simple. You do not need any Javascript code to make this thing work.

    Hope that help.

    PS: If you think KoolAjax is nice, please help me to vote for KoolAjax on Hotscripts: http://www.hotscripts.com/Detailed/82735.html :)
     
    koolman, Sep 1, 2008 IP
  5. webinsane

    webinsane Well-Known Member

    Messages:
    210
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    155
    #5
    Our company created currently the best comment script in the market (considering the features). The idea behind it is that can be easily integrated into existing websites.
     
    webinsane, Nov 8, 2009 IP
  6. bigtime

    bigtime Peon

    Messages:
    226
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Does your script offer pagination?

    Is full source code available for customization?

    Thanks,

    Tim

     
    bigtime, Feb 10, 2010 IP
  7. nayes84

    nayes84 Member

    Messages:
    34
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #7
    nayes84, Mar 24, 2010 IP
  8. Wrighty

    Wrighty Peon

    Messages:
    199
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Will happily code something like this up for you for some money. Would then mean that you get what you want, and would be to suit your needs.
    PM me if you're interested (as stated in your original post). :)
     
    Wrighty, Mar 24, 2010 IP
  9. sameeraemail

    sameeraemail Peon

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Thanx ur script
     
    sameeraemail, Mar 24, 2010 IP
  10. webinsane

    webinsane Well-Known Member

    Messages:
    210
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    155
    #10
    Yes we included pagination in the new version of the script and you will receive full source code. Check the demo: http://www.cubescripts.com/comments.php
     
    webinsane, Aug 31, 2010 IP
  11. bigtime

    bigtime Peon

    Messages:
    226
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #11
    webinsane, excellent comments script!! Bookmarked...
     
    bigtime, Aug 31, 2010 IP
  12. bangonkali

    bangonkali Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Thank you very much! This site is a GOLDMINE! :D
     
    bangonkali, Mar 8, 2011 IP
  13. mysqscripter

    mysqscripter Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #13
    Here is a turnkey php script comment posting manager website script download

    Readytogo No Database Required - No Installation Just Upload it and start using it right away.

    Uses a .txt file to store and retrieve comment info, no mysql database required.

    Comes with an admin area to view and delete comments. Also tracks and displays ip address in the admin area.

    For More Information or to Purchase the script you can visit this Url: tinyurl.com/66h48r8
     
    mysqscripter, Mar 22, 2011 IP