Introduction   Getting Started   Upgrading   Function Reference   Changelog   Support and Feedback

SDK 1.x has been written to make upgrading as easy as possible. There are several changes you'll have to make to your website code in order to make it work with SDK 1.x.

Initalization

In IPB SDK 0.5 you use the following code to initalize IPB SDK.

require_once ("ipbsdk.php"); // Include SDK Functions and Files

IPB SDK 1.x requires you to use the following code to "initalize" or make avaliable the SDK functions.

// Load and Start IPB SDK
require_once "ipbsdk_class.inc.php";
$SDK =& new IPBSDK();

Prefixing calls with $SDK->

In IPB SDK 0.5 all the SDK functions were in the global namespace. In IPB SDK 1.x they are now in one IPBSDK class, making the script less likely to conflict with your website code. As IPB SDK's functions are now in it's own class, you need to add $SDK-> before each call to an SDK function. For example the following IPB SDK 0.5 code:

if (is_loggedin()) {
echo 'you are logged in';
}

will change to:

if ($SDK->is_loggedin()) {
echo 'you are logged in';
}

If you are using the SDK inside your very own functions you may have to use $GLOBALS['SDK']-> or global $SDK; at the start of the function.

Optional Changes

There are several other changes to your SDK code you should make, but are not required in order to make your script work.

Upgrading Problems

If you have any problems with upgrading your scripts to IPB SDK 1.x, please feel free to ask at our Support and Feedback Forum.

Documentation Generated at Sat, 16 Apr 2005 07:36:35 -0700
Find the latest version at http://ipbsdk.sourceforge.net