MyBB Community Forums

Full Version: Help indeed!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
One of our friend, posted a forcepostbit plugin. I was trying to update it but, when I uploaded it. It showed
Fatal error: Cannot redeclare forcepostbit_info() (previously declared in /home/chromium/public_html/inc/plugins/Postpit.php:24) in /home/chromium/public_html/inc/plugins/forcepostbit.php on line 36
Line 36 is

}

This curly bracket is in line 36. Plzz Help

	return array(
		"name"			=> "Force Postbit Layout",
		"description"	=> $donate_button."Forces all your users to use the default postbit style.",
		"website"		=> "",
		"author"		=> "Aries-Belgium",
		"authorsite"	=> "http://community.mybb.com/user-3840.html",
		"version"		=> "1.0",
		"guid" 			=> "058dbc133fe972b9848e02d6386aa3a0",
		"compatibility" => "16*,18*"
	);
}

And how to change the the color of the forum(Category one).
what is the content of postpit.php file in the plugins folder ? (you can use pastebin link)
http://pastebin.com/X9SSVWXB and thats the same thing, I was just editing it with notepad
so both files content is same. rename postpit.php as postpit.old or delete it.
I don't know why postbit.php would have a method called forcepostbit_info. The plugin system uses a pattern for file names and methods.

Plugin X should be in a file inc/plugins/X.php. The method to obtain metadata about the plugin (including friendly name and compatibility) is X_info. The method to install the plugin is X_install. The method to activate is X_activate. You deactivate the plugin in the method X_deactivate. You uninstall in X_uninstall. Furthermore, it is highly recommended to use the prefix X for other methods to avoid name collisions.
^ as I understand it, postpit.php file was a copy of force postbit plugin file (forcepostbit.php) in the plugins folder