We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40352
    • 5 Posts
    Take a look at vanilla and jsconnect. After some tweaeking, got it to work. Testing it now with a small community. (using revo 2.2..2 and the latest vanilla 2.0.18.4)
      • 38705
      • 101 Posts
      Hi Lordcurse,

      are you able to elaborate on how you did that?

      I'm also fiddling around with it, but cant get it to work in a good way..

      I have taken these steps:

      * Install Vanilla
      * Install jsConnectPlugin
      * Put a copy of the PHP connect-library in my assets folder
      * Created a snippet from the index.php that is included with the connect library
      * Tested the test-url succesfully

      But there must be some thing i dont get somehow because it still keeps saying "howdy stranger".
        Addict since 2012....
        • 37393
        • 68 Posts
        The mybb bolt on won't integrate the user into modx, it only matches up against the userid and displays personal information, for login/logout integration you will need to create plugins using the OnWebLogin/OnWebLogout events.

        MyBB is easily integrated into MODx with some creativity. When I'm done with my site I'll give you a showcase of it.
          IntoVPS - VPS hosting service with super-fast response.
          If MODx does not suit your needs then you have a lack of imagination.
          • 40352
          • 5 Posts
          Hi mintnl,

          here is the basic code I use. I use the Login addon.

          <?php
          require_once '**PATH_TO_**/functions.jsconnect.php'; //change to path to functions.jsconnect.php
          require_once dirname(__FILE__) .'/config.core.php';
          require_once dirname(__FILE__) .'/core/model/modx/modx.class.php';
          $modx = new modX();
          $modx->initialize('web');
          $modx->getService('error','error.modError');
          
          // 1. Get your client ID and secret here. These must match those in your jsConnect settings.
          $clientID = "YOUR_CLIENT_ID"; //add your client id here
          $secret = "YOUR_SECRET"; //add your secret here
          
          // 3. Fill in the user information in a way that Vanilla can understand.
          $user = array();
          
          $signedIn = $modx->user->isAuthenticated('web');
          if ($signedIn) {
             // CHANGE THESE FOUR LINES.
             $user['uniqueid'] = $modx->user->get('id');
             $user['name'] = $modx->user->get('username');
             $profile = $modx->user->getOne('Profile');
             $user['email'] = $profile->get('email');
             $user['photourl'] = '';
          }
          //echo $user['name'];
          // 4. Generate the jsConnect string.
          
          // This should be true unless you are testing. 
          // You can also use a hash name like md5, sha1 etc which must be the name as the connection settings in Vanilla.
          $secure = true; 
          WriteJsConnect($user, $_GET, $clientID, $secret, $secure);


            • 38705
            • 101 Posts
            Thanx for your help LordCurse...

            But: $%^&*&*
            Can't get it to work.... somehow i must do something wrong? It keeps saying "Connecting..." in the popup that is generated when i click "sign in with MYNAME" button.
            Can you help me?
              Addict since 2012....
              • 38705
              • 101 Posts
              Finally! I solved my problem.

              I used a relative URL for my JSON address (e.g. ../assets/forumconnect.php)
              This should be a static URL: e.g. http://websitedomain.com/assets/forumconnect.php

              Thanx to all thinking with me.
                Addict since 2012....
                • 40352
                • 5 Posts
                Good to see you could get it working! smiley Have fun! smiley
                  • 41169
                  • 2 Posts
                  Quote from: lordcurse at Aug 31, 2012, 01:06 PM
                  Good to see you could get it working! smiley Have fun! smiley


                  could you please help me?

                  <?php
                  require_once 'http://ourplaybook.org/modx/assets/functions.jsconnect.php '; //change 
                  
                  require_once '/config.core.php';
                  require_once MODX_CORE_PATH.'model/modx/modx.class.php';
                  $modx = new modX();
                  $modx->initialize('web');
                  $modx->getService('error','error.modError');
                   
                  // 1. Get your client ID and secret here. These must match those in your jsConnect settings.
                  $clientID = "????"; //add your client id here
                  $secret = "????"; //add your secret here
                  
                  
                  // 3. Fill in the user information in a way that Vanilla can understand.
                  $user = array();
                   
                  $signedIn = $modx->user->isAuthenticated('web');
                  if ($signedIn) {
                     // CHANGE THESE FOUR LINES.
                     $user['uniqueid'] = $modx->user->get('id');
                     $user['name'] = $modx->user->get('username');
                     $profile = $modx->user->getOne('Profile');
                     $user['email'] = $profile->get('email');
                     $user['photourl'] = '';
                  }
                  //echo $user['name'];
                  // 4. Generate the jsConnect string.
                   
                  // This should be true unless you are testing.
                  // You can also use a hash name like md5, sha1 etc which must be the name as the connection //settings in Vanilla.
                  $secure = true;
                  WriteJsConnect($user, $_GET, $clientID, $secret, $secure);
                  
                  


                  What am I doing wrong? does something have to happen for step 2?

                  Most recent version of everything.

                  ugh, if you could help me with this I would be eternally indebted to you.
                    • 41169
                    • 2 Posts
                    also it is an embedded forum. Is there anything that could be done? I feel hopeless and lost right now.

                    ugh
                      • 40352
                      • 5 Posts
                      hi mr_thehun,

                      Can you tell me your steps? Did you get jsconnect plugin for Vanilla2? You need that plugin.

                      Greetz,