MyBB Community Forums

Full Version: Plugin Not Showing Up in Manager
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi, my plugin isn't showing up in the plugin manager. I have everything in my php document laid out correctly. The <?php and ?> tags are there. My info function looks proper as well.
<?php
function testplugin_info()
{
	return array(
		"name"			=> "Testplugin",
		"description"	=> "Testplugin",
		"website"		=> "http://test.com",
		"author"		=> "Test",
		"authorsite"	=> "http://test.com",
		"version"		=> "1.0",
		"guid" 			=> "",
		"compatibility" => "16*"
	);
}
?>

What could be the problem?
Make sure the info function name matches the file name.

If the function is testplugin_info the file name must be testplugin.php, if they don't match it won't show up.
Thank you. That did the trick. Big Grin

But now I have another problem. Below is my deactivation function. The query is successful, but the problem is that the enable setting on the settings page still says yes. Am I missing another query for the settings page?
function testplugin_install()
{
	global $db;

	$gid = $db->insert_id();
	$testplugin_setting_1 = array(
	"sid" => "NULL",
	"name" => "testplugin_enable",
	"title" => "testplugin Enable",
	"description" => "enable testplugin?",
	"optionscode" => "yesno",
	"value" => "1",
	"disporder" => "1",
	"gid" => intval($gid),
	);
	$db->insert_query("settings", $testplugin_setting_1);
}

function testplugin_deactivate()
{
	global $db;

	if(testplugin_is_installed()) {
		$db->query("UPDATE ".TABLE_PREFIX."settings SET value='0' WHERE name='testplugin_enable'");
	}
}
After the query

rebuild_settings();
Thank you! Works perfectly now. Big Grin