Can you run a wordpress installation and vbulletin installation allowing simultaneous registration with both sites?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jdj
    Senior Member
    • Jan 2009
    • 824
    • 5.1.x

    Can you run a wordpress installation and vbulletin installation allowing simultaneous registration with both sites?

    I can see the odd question about using vB5 with wordpress e.g. this one here

    https://www.vbulletin.com/forum/foru...etin-wordpress

    Does anybody know if it is technically possible for a user registering with a site using wordpress to then be automatically registered with a vbulletin forum, i.e. simultaneous registration.

    If it's possible, how do you do it? And do they have to be on the same instance of mysql or is there a way to get two MySQL installations to talk to each other?
  • Wayne Luke
    vBulletin Technical Support Lead
    • Aug 2000
    • 74122

    #2
    You can use custom code to create a user in vBulletin via the API.

    Something like (provided you have already created a proper session with vBulletin):

    PHP Code:
    <html>
        <head>
        </head>
        <body>
            <form method="post" action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']);?>">
                Server URL  <input type="text" size="40" name="remotehost"> (no trailing '/' please)<br/>
                User Name  <input type="text" size="40" name="username"><br/>
                Email  <input type="text" size="40" name="email"><br/>
                Password <input type="password" size="40" name="password"><br/>
                <input type="submit" value="submit" name="submit"><br/>
            </form>
            <?php

                
    if (!empty($_POST['username']) AND !empty($_POST['password']) AND !empty($_POST['remotehost']))
                {
                    echo 
    "submitting to " $_POST['remotehost'] . '/ajax/api/user/save' "<br />\n";
                    
    $data = array('userid' => 0'password' => $_POST['password'],
                        
    'user[email]' => $_POST['email'],
                        
    'user[username]' => $_POST['username'],
                        
    'options' => array(),
                        
    'adminoptions' => array(),
                        
    'userfield' => array());
                    echo 
    "Post data is " var_export($datatrue) . "<br />\n";
                    
    $curl curl_init();    
                    
    curl_setopt($curlCURLOPT_URL$_POST['remotehost'] . '/ajax/api/user/save');
                    
    curl_setopt($curlCURLOPT_HEADER0);
                    
    curl_setopt($curlCURLOPT_POSTtrue);
                    
    curl_setopt($curlCURLOPT_RETURNTRANSFERtrue);
                    
    curl_setopt($curl,CURLOPT_POSTFIELDS$data);
                    
    $userData curl_exec($curl);
                    echo 
    "response: " var_export($userDatatrue) . "<br />\n";
                    
    curl_close($curl);      
                }
            
    ?>

        </body>
    </html>
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API

    Comment

    • Wayne Luke
      vBulletin Technical Support Lead
      • Aug 2000
      • 74122

      #3
      If Wordpress and vBulletin are on the same server, you can call the API directly as shown by this login script here:
      When designing your website and integrating vBulletin with the rest of your site, it's often desirable to have a centralized login form for users to initiate a vBulletin session. Here are some instructions


      The entire API is documentated at http://vb5support.com/resources/mapi
      Translations provided by Google.

      Wayne Luke
      The Rabid Badger - a vBulletin Cloud demonstration site.
      vBulletin 5 API

      Comment

      • jdj
        Senior Member
        • Jan 2009
        • 824
        • 5.1.x

        #4
        Originally posted by Wayne Luke
        If Wordpress and vBulletin are on the same server, you can call the API directly as shown by this login script here:
        When designing your website and integrating vBulletin with the rest of your site, it's often desirable to have a centralized login form for users to initiate a vBulletin session. Here are some instructions


        The entire API is documentated at http://vb5support.com/resources/mapi
        Is it technically possible to do this connecting two different domains on two different servers?

        I.e. User registers with wordpress installation on https://AnothersiteA.com, hits a button allowing his or her user details to be shared with another server and the details are then automatically logged into the vbulletin installation on https://mysiteB.com?

        Comment

        • Wayne Luke
          vBulletin Technical Support Lead
          • Aug 2000
          • 74122

          #5
          Technically? Yes. How to do it? I don't know. It is beyond my area of expertise. However, both applications can share information through REST interfaces so it is technically possible. There would be custom development involved on both applications.
          Translations provided by Google.

          Wayne Luke
          The Rabid Badger - a vBulletin Cloud demonstration site.
          vBulletin 5 API

          Comment

          • jdj
            Senior Member
            • Jan 2009
            • 824
            • 5.1.x

            #6
            Originally posted by Wayne Luke
            Technically? Yes. How to do it? I don't know. It is beyond my area of expertise. However, both applications can share information through REST interfaces so it is technically possible. There would be custom development involved on both applications.
            What's a REST interface?

            Comment

            • Mark.B
              vBulletin Support
              • Feb 2004
              • 24287
              • 6.0.X

              #7
              Originally posted by jdj

              What's a REST interface?
              MARK.B
              vBulletin Support
              ------------
              My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
              My Unofficial vBulletin Cloud Demo: https://www.adminammo.com

              Comment

              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
              Working...