Thread Closed 
 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Plugin Template
Author Message
Nickman Offline
Manager
*******
Management

Posts: 2,680
Joined: May 2008
Reputation: 66
Post: #1
Plugin Template
This is the general outline of a MyBB Plugin


PHP Code:
<?php
/**
 *    Plugin Copyright
 *    ALA
 *    MyBBSource.com  
 */

if(!defined("IN_MYBB")) {
    die(
"This file cannot be accessed directly.");
}
//Add Your Hooks
$plugins->add_hook("HOOK NAME""FUNCTION_NAME");

//REQUIRED
function FILENAME_info()
{
    return array(
        
'name'            => 'Plugin Name',
        
'description'    => 'Plugin Description',
        
'website'        => 'Website',
        
'author'        => 'Author ALA Nickman',
        
'authorsite'    => 'Website',
        
'version'        => '1.0',
    );
}

function 
FILENAME_activate() {
   global 
$db;
//stuff to do on activation of the plugin
}
function 
FILENAME_deactive()
{
//stuff to do on the deactivation of this plugin
//IE Undo the above
}

function 
FUNCTION_NAME() {
    global 
$mybb,$db,$lang;
//DO SOMETHING WHEN THE HOOK IS CALLED
}


?>
01-26-2009, 04:12 AM
Visit this user's website Find all posts by this user
Thread Closed 




User(s) browsing this thread: 1 Guest(s)