I'll pay for wordpress help - this is custom and has never been done before

Discussion in 'Programming' started by jeeplaw, Oct 24, 2006.

  1. #1
    My wordpress application usage calls for a new user to register with the site, and then Wordpress will automatically create a new "hello world" post for that user and then redirect the user to that post. That's it. No dashboard experience for the user or anything else. There will be only one category on the site so there's no messing with different categories either.

    Eventually I'll fill in the "Hello World" text with something else, but that's it in a nutshell.

    Any takers on this? My idea was to take the code from the install file:

    // First post
    $now = date('Y-m-d H:i:s');
    $now_gmt = gmdate('Y-m-d H:i:s');
    $wpdb->query("INSERT INTO $wpdb->posts (post_author, post_date, post_date_gmt, post_content, post_excerpt, post_title, post_category, post_name, post_modified, post_modified_gmt, comment_count, to_ping, pinged, post_content_filtered) VALUES ('1', '$now', '$now_gmt', '".$wpdb->escape(__('Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!'))."', '', '".$wpdb->escape(__('Hello world!'))."', '0', '".$wpdb->escape(__('hello-world'))."', '$now', '$now_gmt', '1', '', '', '')");

    $wpdb->query( "INSERT INTO $wpdb->post2cat (`rel_id`, `post_id`, `category_id`) VALUES (1, 1, 1)" );

    and plug it into the routine for registering new authors. However, as you can see (`rel_id`, `post_id`, `category_id`) VALUES (1, 1, 1)" ); all point to position 1 in the database. This won't work as it'll keep overrighting the original post. What the code will need to do is tack on the new post at the end of the db so that it doesn't overright anything.

    I hope this makes sense, but am looking to get this going as everything is coming together now, but this is the biggest missing piece. Thanks!

    David
     
    jeeplaw, Oct 24, 2006 IP
  2. Dominicc2003

    Dominicc2003 Peon

    Messages:
    853
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I suck at php but I DO know how to spell "over write".
    Good luck.
    People might wanna know how you want to call them (VOIP/telephone)? Or is that already sorted?
     
    Dominicc2003, Oct 25, 2006 IP