• 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.

Adam K M

Active member
#1
Hello!

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!

Thanks!
 
#3
http://xenforo.com/community/resources/kotomi-generic-script-bridge.122/

As long as you instantiate the XenForo application in your website, you should be able to get the full XenForo suite of functionality.
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:

Code:
<?php
$startTime = microtime(true);
$kotomi_indexFile = "forum";
$kotomi_container = true;
$fileDir = dirname(__FILE__)."/{$kotomi_indexFile}";
require "{$fileDir}/library/Dark/Kotomi/KotomiHeader.php";
echo "
<html>
<head>
<title>kotomi test</title>
</head>
<body>
Hello world!
</body>
</html>";
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?