2012-10-26, 10:41 AM
Hello Sir, I am facing issue while install and activate plugin, Plugin not installing and me getting error "The selected plugin does not have to be activated."
How I can install this plugin?
How I can install this plugin?
(2012-08-31, 03:18 AM)Omar G. Wrote: [ -> ]I think the most current appreciate feature in this is the ability to patch files. I personally wrote my own function similar to the is_member one.
(2012-08-31, 02:26 PM)frostschutz Wrote: [ -> ][...]
That's kinda what PluginLibrary is all about. It makes settings easy to create and maintain; it creates templates in a way that allows users to edit and revert them; stuff that's useful for many plugins and which isn't really that simple to implement yourself and not usually covered in tutorials.
[...]
There are advantages to it being a third party library, as long as the developer is active anyway: If there is a bug report today, I can release a bugfix tomorrow. No need to wait months for the next MyBB version, and no need to tell admins to update their entire boards instead of just a plugin.
function ougc_annbars_activate()
{
// Add our settings
$PL->settings('ougc_plugins', 'OUGC Plugins', $lang->ougc_plugins, array(
'annbars_limit' => array(
'title' => $lang->ougc_annbars_setting_limit,
'description' => $lang->ougc_annbars_setting_limit_desc,
'optionscode' => 'text',
'value' => 5,
),
));
// Insert template/group
$PL->templates('ougcplugins', 'OUGC Plugins', array(
'annbars_bar' => '<div class="ougc_annbars_{$bar[\'style\']}">
{$bar[\'content\']}
</div><br/>',
));
}
// Delete settings
#$PL->settings_delete('ougc_annbars'); // we can't use this :(
$db->delete_query('settings', 'name=\'ougc_plugins_annbars_limit\'');
$query = $db->simple_select('settinggroups', 'gid', 'name=\'ougc_plugins\'');
while($gid = $db->fetch_field($query, 'gid'))
{
$gid = (int)$gid;
$q = $db->simple_select('settings', 'gid', 'gid=\''.$gid.'\'');
if($db->num_rows($q) < 1)
{
$db->delete_query('settinggroups', 'gid=\''.$gid.'\'');
}
unset($q);
}
// Delete template/group
#$PL->templates_delete('ougc_annbars'); // we can't use this :(
$db->delete_query('templates', 'title=\'ougcplugins_annbars_bar\''); // Delete template
$query = $db->simple_select('templates', 'tid', 'title=\'ougcplugins\' OR title LIKE \'ougcplugins=_%\' ESCAPE \'=\'');
if(!$db->num_rows($query))
{
$db->delete_query('templategroups', 'prefix=\'ougcplugins\''); // Delete template groups
}
(2012-11-01, 09:47 AM)Omar G. Wrote: [ -> ]I see this will fail upon activation..