MyBB Community Forums

Full Version: MyBB 1.6
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Quote:AdminCP URLs have been changed to being separated by / to -, is probably the only generic thing I can think of.

I'm expecting that change. It shouldn't be too hard to do some search replacements in various files to fix that.

Just curious what behaviors are going to effect plugins though. 1.2x->1.4x had basic changes to install functions as well as the way $db worked.

I'll probably do with 1.6x what I did with 1.4x and wait a month or so before caring to update.
(2010-03-17, 11:09 PM)labrocca Wrote: [ -> ]So far I haven't seen anyone explain exactly what changes to plugins will need to be made. Are we basically talking about the activate/install functions are changing or what?

I was able to update your Contact Page mod with absolute ease for 1.6 Beta. I imagine only extensive mods will need overhauls of any magnitude.
What needed to be changed?
I could not find any code in the files that needed to be alter to work with 1.6 at all accept this.

"compatibility" => "14*" to "compatibility" => "16*"

Other than that, I found no need to change or update any other code in order to use it that I could see. The differences between 14 core and 1.6 core are so minute.
From the looks of things, themes shouldn't be too difficult to update other than the version numbers. The only real thing that might be touched besides that is styling that reputation box thingy for most dark themes.
(2010-03-17, 11:09 PM)labrocca Wrote: [ -> ]So far I haven't seen anyone explain exactly what changes to plugins will need to be made. Are we basically talking about the activate/install functions are changing or what?

I'm sure they will give everyone more details once we get beta stages like they did for 1.4.
I hope that's soon Big Grin
If I'm not mistaken, 1.4 themes will work OK in 1.6. When a page is opened that has a new template in it, MyBB will use the one from the Master Theme, I think. Either that, or I shouldn't be eating when posting...
(2010-03-17, 11:09 PM)labrocca Wrote: [ -> ]So far I haven't seen anyone explain exactly what changes to plugins will need to be made. Are we basically talking about the activate/install functions are changing or what?

Some class variables are private in MyBB 1.6 now. If you used them in MyBB 1.4 Plugins you are not able to use them in MyBB 1.6.
My Undo Delete Plugin for example checked the content of such a variable (only for backend listings, no "core" features) so I had to write an object-oriented "work around". Took 10 min of my time. Rolleyes
But 90% of all my plugins (18/20) are compatible with change of the compatibility string only.

This is possible with most plugins:
"compatibility" => "14*, 16*"
Big Grin

(2010-03-17, 11:15 PM)Yumi Wrote: [ -> ]AdminCP URLs have been changed to being separated by / to -, is probably the only generic thing I can think of.

The "/" runs in custom (plugin) created sections in 1.6 too. Wink Of course it's better to change it to "-".
Probably should've checked. I tend to read code more than test things out >_>

The private variable business can sometimes lead one to write rather exotic workarounds, like this one:
	global $parser;
	// try to obtain parser options
	$opts = array('allow_mycode' => 1, 'filter_badwords' => 1); // defaults if we can't retrieve options
	if(is_object($parser)) {
		if($GLOBALS['mybb']->version_code >= 1600) {
			// it's a private variable on MyBB 1.6 :(
			// so we have to do an elaborate hack to get this to work... >_>
			$ptxt = serialize($parser);
			$p = strpos($ptxt, "s:19:\"\0postParser\0options\";a:");
			if($p) {
				$ptxt = substr($ptxt, $p + 27);
				$ptxt = substr($ptxt, 0, strpos($ptxt, '}') + 1);
				$opts = @unserialize($ptxt);
			}
		} else
			$opts =& $parser->options;
	}
Pages: 1 2 3