MyBB Community Forums

Full Version: Few idea's
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
It will do you little good if you do not know how to code php, im going to provide a live demo as soon as I have it up and code a small example page powered with it.

basicly you need to create a new php file and stick this in it:

require_once('./sdk.php');
im still lost. Sad
SDK stands for 'software development kit', this kit will add nothing to your board unless you understand how to read and write PHP and also understand how to talk to mySQL

An SDK allows developers to develop for myBB more quickly and with standardized calls. It also makes it a bit easier to build add-on's that a new version will not break.
Can you explain what you mean about the loading of classes within the script?

Also, at the moment this is an external sdk meaning that MyBB wont actually be using it. I have to figure out how I am going to do that whilst trying to keep the class as separated as possible for external use and making it easy to use (such as the connect function).
It would be nice to load the sections of the sdk I need on demand.

something like this:

$sdk->load('user_functions');

would include a file containg all the user functions in the sdk, this way php is not grabing stuff it dose'nt need for a process.

It would also be nice to load custom scripts (to be accessed via the sdk) from a certain folder, this way I can code a .php, drop it into the directory, load the sdk, do this:

$sdk->load_module('filename');

and have it ready to go in the script. This would also make it easy to distro/manage add-on's to the sdk.
Chris I did not get to this last night, its already 8 am and i've yet to sleep Smile.

I will have to get to it tomorrow sometime after my exam. Right now I need to study all this math i've been putting off for two months Big Grin
I noticed an error with the getProfile function, it would break when trying to get profiles by usernames because $uid is hard coded in the query, this should fix it altho I did not check it.


$query = $this->db->query("SELECT u.*, f.* FROM ".TABLE_PREFIX."users u LEFT JOIN ".TABLE_PREFIX."userfields f (ON f.uid=u.uid) WHERE '$uquery'");

I do not ussally use var's in querys that way but did so for the sake of complying more with your coding style.
Thanks, I hadn't actually got around to testing it yet anyway, I was more interested in how you thought it was turning out..
Does this work on MyBB 1.0? I'd really like to use it for MyBB 1.0
Yep, it doesn't work on MyBB 1.0 Sad
Pages: 1 2 3