Buying Need PHP setup with Wordpress blog - SIMPLE - $10

Discussion in 'Programming' started by mycompanyname, Jul 29, 2010.

  1. #1
    This is a simple PHP script that I need installed in the root directory of my Wordpress blog. There is also a HTML file that needs to be modified.

    I need the code to work on my wordpress, if you can get it. I'll pay $10. The sooner the better.

    I just can't figure out where to modify code with website info...
    The code is attached below:


    <?PHP
    require( dirname(__FILE__) . '/wp-load.php' );

    //if you want to use a key to protect comment submissions oncomment these lines and pass a k=somekey param
    //$key = "12345";
    //if ($_GET["k"] != $key){
    // echo "Not a valid key";// exit;
    //}


    //id if the post this comment is suppose to go on
    $comment_post_ID = (int) $_GET['/share/'];
    $comment_author = "Mobile App";
    //check if post exists
    $status = $wpdb->get_row( $wpdb->prepare("SELECT post_status, comment_status FROM $wpdb->posts WHERE ID = %d", $comment_post_ID) );
    if ( empty($status->comment_status) ) {
    echo "No Post with that ID Exists";
    exit;
    }

    //get comment info from POST param
    $comment_content = ( isset($_POST['message']) ) ? trim($_POST['message']) : null;

    $commentdata = compact('comment_post_ID', 'comment_author', 'comment_content');

    //http://codex.wordpress.org/Function_Reference/wp_new_comment
    $comment_id = wp_new_comment( $commentdata );
    echo $comment_id;
    ?>
     
    mycompanyname, Jul 29, 2010 IP
  2. agentcris

    agentcris Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #2
    I would like to help you, let me know more
     
    agentcris, Jul 29, 2010 IP
  3. blackemerald

    blackemerald Member

    Messages:
    86
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #3
    I need more details.
    please PM me..
     
    blackemerald, Jul 31, 2010 IP