MyBB Community Forums

Full Version: Site Integration
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
I would double check the chmod (file permissions) settings for sdktest.php and sdk.php (755), and also make sure that if safe mode is on that the same user accessing sdktest.php has permission to access sdk.php.

Chris.
Thanks, that stopped those errors, but now i get the following error:
Fatal error: Cannot instantiate non-existent class: mybb in /home/carrot/public_html/sdktest.php on line 3
what code are you using in sdktest.php??
oh yea that would help Smile
<?php
require_once "/forum/inc/sdk.php";
$mybb = new MyBB;
$mybb->connect();

$user = $mybb->getProfile(1);
print_r($user);
?>
try
<?php
require "./forum/inc/sdk.php";
$mybb = new MyBB;
$mybb->connect();

$user = $mybb->getProfile(1);
print_r($user);
?>
making sure that sdktest.php is in the root folder, and that the foler where inc/sdk.php is located is called forum, not Forum.

Oh, and are you running the latest version??
Thanks Smile
Its working now then??
yea, it returns the array. How can i show just one item from the array, say the username?
Just change the line reading print_r($user); to this...

echo $user['username'];

Wink
How can i find the uid of the current logged in user?
Pages: 1 2 3 4