Admun's NUDN

admun

  • San Francisco, CA

Navigation

Navigation

Categories

Having a getMinNucleusVersion

In the plugin API, there is a getMinNucleusVersion function that helps a plugin to report to Nucleus that the minimum Nucleus version it supports. This is a way to ensure a plugin is not install on a old Nucleus setup that certain support is missing. ie user defined table prefix

I found that often this function is not declared in plugin, which cause problem if a user with old Nucleus setup trying to install it. This caused issues on the support front that user will come to the forum and ask why the plugin blah didn't work on my blog..... which is tragic and preventable if the code is done right, IMHO.

I believed this function should always define in a plugin. If a developer doesn't know whether the plugin will work in a older version, they should simply set the min version to the current version they're using.

In the long run, maybe we should put in a mechanism to force plugin writer to define the minimum version in each plugin. This can be done by changing the default getMinNucleusVersion in PLUGIN.php to report a min of version 10, so all plugins will failed if they do not declare this their minimum support version.

11:15:13 on 06/15/04 by Admun - Category: Developer Notes - tags: none - print

Comments

TeRanEX wrote:

n00b: "The plugin I tried to install asks for Nucleus version 999999, where can i get that?" wink
It is indeed a good idea admun!

06/21/04 16:38:27

gRegor wrote:

I would suggest a Nucleus Core check for the function on plugin install, and have the install fail (with an appropriate message) if this function isn't used. That way when developers make plugins and test them, they'll know right away because they won't be able to proceed with testing until they add the function.

06/21/04 17:13:32

gRegor wrote:

I would suggest having Nucleus do a check for this function on plugin install, and give an appropriate error message if it's not included. This way developers would not be able to proceed with testing (or even install) until they had added the function. This of course could be extended to other necessary plugin functions, too. Just a thought.

06/21/04 17:23:52

Admun wrote:

hum, TeRanEX, you have a point...... but I'd expect the install just failed and won't tell the user that what version it expected..... maybe I should rethink that.

06/21/04 21:24:17

Admun wrote:

Good idea gRoger, I will keep that in mind....

06/21/04 21:25:20

Add Comments