MyBB Community Forums

Full Version: MyBB Integrator / MyBB SDK (Version 1.3)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
First of all, use a different name for the Integrator Object - $mybb is built by the MyBB forums.
Other than that you are not forced to hand over an ID to these particular functions.
However, if it somehow should not work, use $IntegratorObject->mybb->user['uid'] as parameter (or $mybb->user['uid'])
That is not my name for the intergrator object, it was just an example, my name for the object is $MyBBI... That wouldn't make any errors?

Second I don't fill in an ID, but then the script does nothing... If I make, for example, a script like:

echo "Yes";
echo "No";

It will always answer No... When i'm logged in our not...

I just tried "$mybb->user['uid']" and "$MyBBI->mybb->user['uid']" as paramaters, but it doesn't work either...

Then I echo-ed "$mybb->user['uid']" and "$MyBBI->mybb->user['uid']" but they both give 0...

And i am logged in to the forum...

Any ideas?
Are you calling the functions with the object at all?!
The code you provided definitely fails, since you need to call $MyBBI->isLoggedIn().

Furthermore, check if MyBB's cookies are accessable by the integrator class. Every guy, who had the problem, had the same issue. It's always cookies.
Other than that, put the integrator class into the folder of your actual script. (not in another folder)
Yeh, that was just a fail in the example I gave you, I use the good objects and stuff...

But how can I check if the cookies are accessable? What are the MyBB cookies (names)?
Alright, It finally worked...
I just needed to change the cookie path from the Mybb admin, from "/forum/" to "/"

And on the MyBB wiki tell they that the path must be "/forum/"...

So maybe an idea to put that info on your site?
Does anyone know how I need to put the birthday in the updateUser functions?

I tried:

"birthday" => array("bday1" => "1", "bday2" => "4", "bday3" => "1956")
"birthday" => "2 3 1988"
"birthday" => "2-3-1988"
"birthday" => "2 march 1988"

But none of them change the birthday...

And how can I change the user fields (The options fields you can make)?
(2009-07-22, 11:05 AM)Sar Wrote: [ -> ]Alright, It finally worked...
I just needed to change the cookie path from the Mybb admin, from "/forum/" to "/"

That might not work in IE, I'm pretty certain it did *not* work in IE7.


(2009-07-22, 09:48 AM)No0oB Wrote: [ -> ]...It's always cookies...

(2009-06-01, 10:22 PM)Pirata Nervo Wrote: [ -> ]The bad thing is that your forum cookies path must cover your website's folder Toungue

Maybe not...
I had really good luck getting this to work with the MyBB Integrator once, but need to test it more:
"This plugin will try to set the correct cookie paths on your board..."

Just use the plugin with MyBB's cookies set to / (your other site), and I had it working, even in IE.
Thanks! I will try this!
I am having difficulties logging out. I cannot seem to grab the logoutkey for my script. I can login no problem.

define('IN_MYBB', NULL);
require_once './forum/global.php';
include './inc/class.MyBBIntegrator.php';
$MyBBI = new MyBBIntegrator($mybb, $db, $cache, $plugins, $lang, $config); 

I can read the sessionid no problem, but the logoutkey cannot be read. It doesn't log me out if I suppy the sid. e.g.

echo '<a href="logout.php?logoutkey='.$logoutkey.'">Logout</a>';

What does the sending of the $logoutkey have to do with it, if my logout.php script isn't using it? I don't understand this bit.

Help please.
Okay, it didn't log me out because the cookie path of my forum was /forum/ and my login script was /.
No one knows how the birthday need to be filled in? In what format?
I made a script and function already to fill in the custom userfields...
Got the birthday input..!
Can I at the captcha to the registration somehow?
It has been some time since the last update, but get ready for a new release within a week or so.
I was busy with exams and other stuff, but have now found time to work on the Integrator some more.
Here is a list with its new features (I might have forgotten some).

I will work on the documentation, so you can get Coding Help for the new functions.

Quote:- updatePost
- updateThread
- removePost
- removeThread
- removeCategory / removeForum
- deletePrivateMessage
- deletePrivateMessagesOfUser
- sendPrivateMessage
- return Captcha for login against brute force attacks!
- openThread / closeThread
- getForumStaff
- createPoll
- deletePoll
- performVote / vote
- getWhoVoted (like IPB or vB can do)
- getPostersOfThread (in MyBB, this can be fetched by clicking on the amount of posts in a thread - it will return you such a list!)
- getMembers
- checkForumPassword
- logModeratorAction
- getPoll
- getUnreadThreadsOfForum
- generateCaptcha
- validateCaptcha
Very, very, nice!

I like the new function already... I use your class alot now, and it's a realy nice system to put a forum and site together...

I Like it... Keep up the good work!
Btw, Maybe an idea to put somekind of search function on? So people can search the forums with the class? Or isn't this possible?
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15