2009-11-13, 05:08 AM
I'm trying to write a plugin and I guess I am blind. I don't know what most any of these functions do. I know what the hooks do, and thats about it.
I want to make a plugin that adds a bit in the header template to be a link to a spot where they can buy points. I then want to have the page that gives the points to be able to know what userid is invoking the script. I want to then update the database entry of that userid. Just some simple things like this. The only thing I need to show up in the administrator interface is activate and deactivate. I don't need any special options.
Why is it unclear to me as to how to do this?
Here is my code so far.
I've read this... http://wiki.mybboard.net/index.php/Authoring_Plugins
It doesn't tell you anything about the mybb functions. It tells you what is expected in each plugin function.
I want to make a plugin that adds a bit in the header template to be a link to a spot where they can buy points. I then want to have the page that gives the points to be able to know what userid is invoking the script. I want to then update the database entry of that userid. Just some simple things like this. The only thing I need to show up in the administrator interface is activate and deactivate. I don't need any special options.
Why is it unclear to me as to how to do this?
Here is my code so far.
function buynewpoints_info()
{
return array(
"name" => "Buy New Points",
"description" => "Ability to buy new points with paypal.",
"website" => "http://www.x3dev.com",
"author" => "Corey Manshack",
"authorsite" => "http://www.x3dev.com",
"version" => ".1",
"guid" => "",
"compatibility" => "*"
);
}
if(!defined("IN_MYBB"))
die("This file cannot be accessed directly.");
$plugins->add_hook("global_start", "buynewpoints");
function buynewpoints_activate()
{
}
function buynewpoints_deactivate(){
}
I've read this... http://wiki.mybboard.net/index.php/Authoring_Plugins
It doesn't tell you anything about the mybb functions. It tells you what is expected in each plugin function.