Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 7 of 7
  1. #1
    Join Date
    May 2006
    Location
    Hull
    Posts
    7,701
    Tokens
    2,430
    Habbo
    Moh

    Latest Awards:

    Default PHP Form to vB Thread

    Is there any way I can have a PHP Form (Different Server to Forum) which submits the information to a Forum Thread?

    So it would log into an account with permissions to post in that cat, and post the inflammation submitted as a new thread (With a custom title also).

    Does anyone know anyway of doing this?

    Thanks in advanced.

  2. #2
    Join Date
    Dec 2007
    Posts
    1,683
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Jack120 View Post
    Is there any way I can have a PHP Form (Different Server to Forum) which submits the information to a Forum Thread?

    So it would log into an account with permissions to post in that cat, and post the inflammation submitted as a new thread (With a custom title also).

    Does anyone know anyway of doing this?

    Thanks in advanced.
    Copy the code of the postreply, then set the database up so it connects and does the thread?

  3. #3
    Join Date
    Mar 2007
    Location
    Kent
    Posts
    11,415
    Tokens
    787

    Latest Awards:

    Default

    There's a mod to send all contact us emails to threads instead? Edit the templates for the contact us page.?

  4. #4
    Join Date
    Oct 2006
    Location
    Peterborough, UK
    Posts
    3,855
    Tokens
    216

    Latest Awards:

    Default

    Quote Originally Posted by Jack120 View Post
    Is there any way I can have a PHP Form (Different Server to Forum) which submits the information to a Forum Thread?

    So it would log into an account with permissions to post in that cat, and post the inflammation submitted as a new thread (With a custom title also).

    Does anyone know anyway of doing this?

    Thanks in advanced.
    Yep, there's definitely a way to do it


    visit my internet web site on the internet
    http://dong.engineer/
    it is just videos by bill wurtz videos you have been warned

  5. #5
    Join Date
    May 2006
    Location
    Hull
    Posts
    7,701
    Tokens
    2,430
    Habbo
    Moh

    Latest Awards:

    Default

    Quote Originally Posted by Independent View Post
    Copy the code of the postreply, then set the database up so it connects and does the thread?
    Yea, I kinda did that, but didn't copy the code.

    It takes a second to load though :@

    It has to do:

    • Inserts the post to the posts database
    • Gets the post id from the post database
    • Inserts the thread to the thread database
    • Gets the thread id from the thread database
    • Updates the posts if with the thread information in the posts database
    • Updates the forum information in the forum database - this allows us to see them on the "New Posts" and the "Newest Posts".


    Quote Originally Posted by today View Post
    There's a mod to send all contact us emails to threads instead? Edit the templates for the contact us page.?
    Yea, we got that one for the forum contact us, but we also have one for the site.

  6. #6
    Join Date
    Jun 2005
    Location
    Selby
    Posts
    3,357
    Tokens
    2,165

    Latest Awards:

    Default

    There used to be a hack for vBulletin called "Form Hack" which you can see here. It's a 3.6 addon however so it might not work aswell as you hope. But if your handy with PHP you might be able to use elements of this to get what your looking for.

    Matt lurvs Jay

  7. #7
    Join Date
    May 2006
    Location
    Hull
    Posts
    7,701
    Tokens
    2,430
    Habbo
    Moh

    Latest Awards:

    Default

    Quote Originally Posted by mat64 View Post
    There used to be a hack for vBulletin called "Form Hack" which you can see here. It's a 3.6 addon however so it might not work aswell as you hope. But if your handy with PHP you might be able to use elements of this to get what your looking for.
    Yea, I did it manually.

    If any one else wishes to do this, this is the code which does it:
    PHP Code:
    require_once('./global.php');
    require_once(
    './includes/class_dm.php');
    require_once(
    './includes/class_dm_threadpost.php'); 

    $title "$name - $reason";
    $pagetext "[b]Name[/b]: $name
    [b]Email[/b]: 
    $email
    [b]Reason[/b]: 
    $reason
    [b]Message[/b]: 
    $message
    [b]IP[/b]: 
    $ip";
    $dateline time();
    $username "Admin"// Enter the username of the user you wish to submit the post
    $userid "1"// Enter the user id of the username
    $forumid "1"// Enter the forum cat id you wish the post to be posted in

    mysql_query("INSERT INTO `post` (`username`, `userid`, `title`, `dateline`, `pagetext`, `ipaddress`, `visible`, `allowsmilie`) VALUES ('$username', '$userid', '$title', '$dateline', '$pagetext', '$ip', '1', '1')");

    $sql mysql_query("SELECT * FROM `post` WHERE `username` = '$username' AND `userid` = '$userid' AND `ipaddress` = '$ip' AND `title` = '$title'");
    $fetch mysql_fetch_array($sql);

    $post_id $fetch["postid"];

    mysql_query("INSERT INTO `thread` (`title`, `firstpostid`, `lastpostid`, `lastpost`, `forumid`, `postusername`, `postuserid`, `lastposter`, `dateline`, `visible`) VALUES ('$title', '$post_id', '$post_id', '$dateline', '$forumid', '$username', '$username', '$username', '$dateline', '1')");

    $sqls mysql_query("SELECT * FROM `thread` WHERE `lastpost` = '$dateline'");
    $fetchs mysql_fetch_array($sqls);

    $thread_id $fetchs["threadid"];

    mysql_query("UPDATE `post` SET `threadid` = '$thread_id', `parentid` = '$thread_id' WHERE `postid` = '$post_id'");    

    $sqlss mysql_query("SELECT * FROM `forum` WHERE `forumid` = '$forumid'");
    $fetchss mysql_fetch_array($sqlss);
    $threadcount $fetchss["threadcount"];
    $newthreadcount $threadcount 1;

    mysql_query("UPDATE `forum` SET `lastpost` = '$dateline', `lastposter` = '$username', `lastpostid` = '$post_id', `lastthread` = '$title', `lastthreadid` = '$thread_id', `threadcount` = '$newthreadcount' WHERE `forumid` = '$forumid'"); 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •