1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Using Xenforo users for external site.

Discussion in 'XenForo Development Discussions' started by Adam K M, Jul 9, 2013.

  1. Adam K M

    Adam K M Active Member


    Me and my friends are currently developing a website, and we've got Xenforo as our forums, and we want to make it so that our website can contact our Xenforo installation and:
    1. Query whether the following user is logged in on xenforo or not
    2. If they are logged in, retrieve their username
    Any help is greatly appreciated!

  2. Jeremy

    Jeremy Well-Known Member

  3. mongy910

    mongy910 New Member

    I work with muffin, thanks for the link! We tried implementing that script, with the xenforo files in a folder named forum and our test file in the main directory. We used the following code:

    $startTime = microtime(true);
    $kotomi_indexFile = "forum";
    $kotomi_container = true;
    $fileDir = dirname(__FILE__)."/{$kotomi_indexFile}";
    require "{$fileDir}/library/Dark/Kotomi/KotomiHeader.php";
    echo "
    <title>kotomi test</title>
    Hello world!
    require "{$fileDir}/library/Dark/Kotomi/KotomiFooter.php";
    When we did this, the xenforo header and footer loaded, however, the css and images all had the wrong link/src and thus did not display. For example, when we used inspect element, it had loaded the css file "css.php" instead of what should have been "forum/css.php".

    You can see the actual page at http://cubeuniverse.org
    Do you have any idea why this is happening?
  4. Jeremy

    Jeremy Well-Known Member

  5. mongy910

    mongy910 New Member

    We tried that already but it didn't work. Probably because php is all calculated server side before the html, so the base url would not affect the php.
  6. Daniel Hood

    Daniel Hood Well-Known Member

    What do you mean "not working"?

Share This Page