2011-06-11, 11:48 PM
i am trying to create my first plugin. And i need major help. im way confused. can someone tell me if this is right so far. (also, i have no idea what to do for the first plugin so if someone can give me an easy idea. its ok if someone else made it, i wont publish it or anything. thanks!)
function sample_info()
{
return array(
"name" => "Sample Plugin!",
"description" => "A sample plugin ...",
"website" => "http://www.wizard101society.com",
"author" => "-------",
"authorsite" => "http://www.wizard101society.com",
"version" => "0.1",
"guid" => "",
"compatibility" => "16*"
);
}
function sample_activate()
{
// Things to do when the plugin is activated
}
function hello_is_installed()
{
global $db;
if($db->table_exists("sample"))
{
return true;
}
return false;
}
function sample_deactivate()
{
// Things to do when the plugin is deactivated
// ... things like template changes, language changes etc....
}