MyBB Community Forums

Full Version: 1.4 > 1.6 changes
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Hello everybody,
I finally managed to get some important third party integration plugins done and they are working perfectly on 1.4 however something's wrong at 1.6.

MyBB team promised to give us a detailled upgrading / changes overview for 1.6 some time ago but I eighter missed it (in this case please point me to it) or it does not exist.

I got a plugin that hooks at global_start and then uses include_once to embedd a connection file which contacts a third party server.
On 1.4 the plugin returns the correct vars, on 1.6 it seems to be not able to connect to third party server, I am not getting vars there but also no errors I should get.

Does anybody know if MyBB changed something at the permissions of included files or at the global var system?
It's really freaking me out at the moment to have it working on 1.4 and not even having a clue what's going wrong at 1.6 Angry

Thanks for anything that could help...

EDIT: Any changes with the handling of $_GET or $_COOKIE vars?
(2010-09-14, 03:01 PM)Lennart Sauter Wrote: [ -> ]I got a plugin that hooks at global_start and then uses include_once to embedd a connection file which contacts a third party server.
On 1.4 the plugin returns the correct vars, on 1.6 it seems to be not able to connect to third party server, I am not getting vars there but also no errors I should get.

1.6 isn't going to stop connections to a third party server... what code are you actually using?? You can use the exact same plugin file, it works on a 1.4 forum, and then doesn't work on a 1.6 forum?? The core hasn't changed at all, $_GET and $_COOKIE is the same.
I got two MyBBs under the same domain with the same plugin file and the same settings and one works while the other does not. The one working runs with 1.4.14, the other one runs 1.6.
1.6 does not work and it looks like a MyBB problem to me, it's as if some vars are not passed.

Excerpt from the code:
function connect_run(){
    global $db, $mybb, $connect_template, $me;

//If activated
if($mybb->settings[connect_register_on_off] != "0"){

//Define important vars here!
    $config['appid' ]  = $mybb->settings[connect_app_id];
    $config['api'   ]  = $mybb->settings[connect_api_key];
    $config['secret']  = $mybb->settings[connect_secret_key];


//Include Main methods!
include_once("main.php");

if(!$me){
echo "ARRG!";
exit;
}

main.php should return $me but does not on 1.6, it works on 1.4.

main.php does use a public function to get the $me from a different server with a session.

Again, the plugin was installed and set up in exactly the same way on both forums, the forums are identical and the third party server is the same aswell. The only difference is the MyBB version.
i assume that the 1.6 forum is working correctly?

i have not run across any 1.4 to 1.6 changes other than a few class variables that were made private. have not seen any functions have their access level changed. not saying there are not any, i just have not run across any.
The forum itself works properly, yes.

Is there a list of the now private class variables? Otherwise somebody should make one although I don't think that's an issue here...
Have you viewed a diff report on ./inc/class_core.php, ./inc/init.php, ./global.php, ./inc/class_session.php, all the main files...?? There's practically no changes in them. What's actually in main.php??
No, do I have to do that using the bug tracker?

main.php includes another file which then uses the public function getSession().
To be more clear - I am working with the facebook sdk.
There's software you can download to view diff reports, some text editors have it inbuilt.

Is there anything MyBB related at all in main.php?? Because if there's not, the only MyBB code here is the bit you posted above, and nothing there would have changed in the upgrade.
(2010-09-14, 04:22 PM)pavemen Wrote: [ -> ]i assume that the 1.6 forum is working correctly?

i have not run across any 1.4 to 1.6 changes other than a few class variables that were made private. have not seen any functions have their access level changed. not saying there are not any, i just have not run across any.

That's mostly what was changed as far as I remember. And also the parser options (because of the video code). Can't think of anything else right now
No, it's only included by MyBB and should give me back the vars. My thoughts are that MyBB does not pass certain vars to this included script although I have no idea how this could happen.

I'll look for my old dreamwaver disc for a diff report later.

EDIT: I just updated the working 1.4 MyBB to 1.6 using the updater and the plugin stopped working. No idea why but something has to change with 1.6
Using the following hooks:
global_start
misc_start
newthread_do_newthread_end
member_profile_end
newthread_start
Pages: 1 2 3