2012-10-24, 05:46 PM
I made a simple plugin which does some template edits...and they work fine..the only Issue im seeing is even if the Plugin is activated
In the Plugin List the Control still shows " Install & activate this bad boy "
And does not change to "Deactivate"
This is the structure of the plugin which I have.
When it gets activated all my codes run properly but the only issue I see is that the Text does not change to Deactivate
In the Plugin List the Control still shows " Install & activate this bad boy "
And does not change to "Deactivate"
This is the structure of the plugin which I have.
Quote:<?php
if(!defined("IN_MYBB"))
{
die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}
function myplugin_info()
{
//Return Array code given here!!
}
function myplugin_install()
{
}
function myplugin_activate()
{
global $lang;
require MYBB_ROOT.'/inc/adminfunctions_templates.php';
//The template edit code given here
}
$plugins->add_hook("memberlist_start", "myfunc");
function myfunc_loadhook()
{
global $lang;
//Loaded a lang file
}
function myplugin_is_installed()
{
}
function myplugin_deactivate()
{
require MYBB_ROOT.'/inc/adminfunctions_templates.php';
//Given the template Replace code here to replace what had been changed
}
function myplugin_uninstall()
{
}
?>
When it gets activated all my codes run properly but the only issue I see is that the Text does not change to Deactivate