MyBB Community Forums

Full Version: Create a Pluginlibrary-based plugin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Full code:

-snip-

There's only an instance there to be honest:

$l['myalerts_setting_revoke'] = "This is a test for my plugin";
Odd. I'm pretty sure it worked when I last tried it. I'll have to give it another try.
Maybe it's my plugin that doesn't work properly. I'm trying to understand why, even if I put myextension_install() and _uninstall() functions, when I upload the plugin to my test board the plugin list in ACP shows that the plugin is already installed and the only working button is activate/deactivate.
Yeah, it will because of your _is_installed() function as frostschutz said.
Didn't noticed this, thanks euan. Still looking for a solution to the settings "bug" though.
If you send me the whole plugin file I'll take a look at it when I get a chance.
(2012-12-11, 06:23 PM)frostschutz Wrote: [ -> ]Serializing is bad, yes, but it could still made to work, if you simply assume the default value when it's not set, and ignore extraneous keys. So you could get by without even updating it at all.

serializing is not bad, it just has "a time and a place" common sense rule where it should be and should not be used.

i use it when i need to store variable data in a single field that i do not need to search on (other then if not null). mybbpublisher v3.x uses serialized data to store status IDs returned from one or more services, so storing the content in a serialized array is simple solution.
(2012-12-12, 01:25 AM)pavemen Wrote: [ -> ]
(2012-12-11, 06:23 PM)frostschutz Wrote: [ -> ]Serializing is bad, yes, but it could still made to work, if you simply assume the default value when it's not set, and ignore extraneous keys. So you could get by without even updating it at all.

serializing is not bad, it just has "a time and a place" common sense rule where it should be and should not be used.

i use it when i need to store variable data in a single field that i do not need to search on (other then if not null). mybbpublisher v3.x uses serialized data to store status IDs returned from one or more services, so storing the content in a serialized array is simple solution.

Technically it should be avoided if you are trying to normalize your database structure though. Even 2nd Normal Form is against serialized data IIRC.
Pages: 1 2