MyBB Community Forums

Full Version: PluginLibrary 13
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
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?
If you had read the docs, you'd know you don't need to install the plugin. You just have to upload it...
Even the sentence he posted says that. =)
Hello tecca and technician sir, please help me how to install & activate plugin library, I read about this plugin but not understanding.

I just uploaded files on the specific directories but its not activating.

As I said, you do not have to activate it. Just simply upload it and you're done.
Oh okay Sir, Thank you Smile
frosts i read each and every posts in this thread just to understand how updated the plugin is now..and I must say u have added a lot more functions to the library which would make a plugin developers live so easy!!

Ive just started developing MyBB plugins few weeks back and I had tough time fiddling with the templates manually which your plugin has made it easy!!

Im surely gonna use it and post here incase if I face issues thanks Wink
(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.

I now feel bad! It does increase your productivity and it saves me a lot of time when writing free plugins.

May you help me with this?

Upon activation I insert my settings (which are updated if already created):
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\']}">

The problem is that, I don't want to delete the setting group if there are left some settings within it, the same for the template set. You see, that plugin only uses one setting and one template, I do have some plugins like that (one/few setting(s) and/or template(s)). Do you think this will work correctly for uninstallation (seems to work for me)?:
	// 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.'\'');

	// 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 \'=\'');
		$db->delete_query('templategroups', 'prefix=\'ougcplugins\''); // Delete template groups

Do you think such feature could make it to your library? Thanks in advance!
I see this will fail upon activation..
(2012-11-01, 09:47 AM)Omar G. Wrote: [ -> ]I see this will fail upon activation..

It doesn't support sharing a single group with multiple plugins - the automatic update routine would never work that way. Adding that kind of functionality would complicate things unnecessarily. Having one setting group per plugin does not really hurt anyone, even if it's just a single setting at the beginning... you can always add more settings later.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16