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
Hey i have been checking this software and it looks great (better than ipb <_< ) but i was wondering before i decided to install this software is if there was forum integration software for the forum. Thanks Big Grin
Well, depends how intergrated. You can change everything from color to the entire look of the forum if that is what you mean. Its all in the Admin CP.
No I mean like having a forum login on my website *outside of the forums* or special things for if the user is an admin or something like that. As what i see it isn't so maybe i will just create some myself ^_^
Well, I have never tried this sort of thing but Im sure it is possible.

And in the furture when myBB has gone final (and free still Smile ), and more themes have been added, and covertors have been made and myBB has won awards because it is the best free forum out there Wink Chris might work on various mods like this in his free time Smile
Attached is a new working copy of sdk.php (the one previously included in the release had bugs). I'm also attaching an example, test.php which will get the user profile for a user with uid 1.

Current the SDK is pretty basic, however it has the following "member centric" functions: validUsername, validPassword, getProfile. Each takes a series of arguments.

Using the sdk (as you can see from test.php is quite simple).

require_once "./path/to/inc/sdk.php";
$mybb = new MyBB;
$mybb->connect();

That will start up the SDK, connect to the MyBB database specified in your MyBB configuration files and load the board settings.

Then you can simply use something like:
$user = $mybb->getProfile(1);
print_r($user);

We plan to build upon the SDK in the future..
hmm, seems to work out except that it is all bunched together but I guess that is to be worked on. Smile Keep up tgw

Edit: In test validPassword, getBirthdays, and getForum all display errors.

Other than that and a few minor graphical changes major needed, this look really awesome.
Quote:hmm, seems to work out except that it is all bunched together but I guess that is to be worked on. Smile Keep up tgw
http://php.net/print_r

print_r prints out directly the contents of an array. getProfile returns an array of the fields.

Quote:Edit: In test validPassword, getBirthdays, and getForum all display errors.
And the errors are...?

Quote:Other than that and a few minor graphical changes major needed, this look really awesome.
Its not meant to be graphical in any way, shape or form. It returns MyBB data for processing in other scripts. How the data is to be presented is to be decided by the other scripts.

Chris.
Errors have now been fixed. Attachment is updated and so is main MyBB release.
Chris Boulton Wrote:
Quote:hmm, seems to work out except that it is all bunched together but I guess that is to be worked on. Smile Keep up tgw
http://php.net/print_r

print_r prints out directly the contents of an array. getProfile returns an array of the fields.
How come it doesn't show like the sample output then?? Its all bunched together
Quote:Array ( [uid] => 1 [username] => Kieran [password] => 384606f16ddf09d4ff650c0bb94b1561 [email] => [postnum] => 0 [avatar] => images/avatars/athlon.gif [usergroup] => 4 [usertitle] => [regdate] => 1097093925 [lastactive] => 1097292124 [lastvisit] => 1097290859 [lastpost] => 1097290453 [website] => [icq] => [aim] => [yahoo] => [msn] => [birthday] => [signature] => [allownotices] => [hideemail] => [emailnotify] => [invisible] => [receivepms] => [pmpopup] => [remember] => [threadmode] => [showsigs] => [showavatars] => [showquickreply] => [ppp] => 0 [tpp] => 0 [daysprune] => 0 [dateformat] => [timeformat] => [timezone] => [dst] => [buddylist] => [ignorelist] => [style] => 0 [away] => no [awaydate] => 0 [returndate] => [awayreason] => [pmfolders] => 1**Inbox$%%$2**Sent Items$%%$3**Drafts$%%$4**Trash Can [notepad] => [rating] => [referrer] => 0 [reputation] => 0 [regip] => [language] => [timeonline] => 6972 [showcodebuttons] => 1 [ufid] => 1 [fid1] => New Zealand [fid2] => [fid3] => Undisclosed [fid4] => Athlon Rulz ) 1

Quote:
Quote:Edit: In test validPassword, getBirthdays, and getForum all display errors.
And the errors are...?
getForum
mySQL error: 1052
Column: 'fid' in where clause is ambiguous
Query: SELECT f.*, t.subject AS lastpostsubject FROM mybb_forums f LEFT JOIN mybb_threads t ON (t.tid = f.lastposttid) WHERE fid='1'

validPassword
Warning: Missing argument 3 for validpassword() in C:\wampp2\htdocs\Forum\inc\sdk.php on line 66

getBirthdays
Fatal error: Call to a member function on a non-object in C:\wampp2\htdocs\Forum\inc\sdk.php on line 157

Quote:
Quote:Other than that and a few minor graphical changes major needed, this look really awesome.
Its not meant to be graphical in any way, shape or form. It returns MyBB data for processing in other scripts. How the data is to be presented is to be decided by the other scripts.
Ah ok then.
Quote:How come it doesn't show like the sample output then?? Its all bunched together
View the page source. It does this because print_r inserts new lines, not <br />'s in HTML.

Quote:validPassword
Warning: Missing argument 3 for validpassword() in C:\wampp2\htdocs\Forum\inc\sdk.php on line 66
Thats an error on your behalf. You called it wrong..

validPassword($uid, $username, $password);

It means you can specify a username OR uid.

If you dont have he uid for example and only the username you call it like

validPassword("", $username, $password);

Or if you have the uid and not username..

validPassword($uid, "", $password);
Pages: 1 2 3 4