Is there a good method of disabling a plugin after a demo time-period has expired?
How about a serialization routine?
I would like to release plugins so they can be downloaded and installed, but after a set time, they expire.
My early thoughts on rolling my own, would be to install a few $mgr->install_options
something like (sudo code)...
$mgr->install_options ('PluginName', ['SerialNum'], Default='' );
$mgr->install_options ('PluginName', ['InstallDate'], = NOW );
Then during script execution, grab...
my $opts = Links::Plugins->get_plugin_user_cfg('PluginName');
Then somehow check if x days have passed since install...
my $opts = Links::Plugins->get_plugin_user_cfg('PluginName');
today = NOW();
if(!($opts->{SerialNum}) {
unless ( (InstallDate - today) < 30 days)
return (error, "Plugin Has Expired, please register");
}
else {
temp = $opts->{SerialNum};
if(! ( temp == domain_as_a_number?))
return (error, "Invalid serial number");
}
I don't need a bullet-proof method, just something that will work.
I realize that uninstalling and reinstalling would reset the date, giving
another 30 days, but I was thinking I might be able to use language.txt
$language->{CF_INSTALL_DATE} = 'NOW';
then check that value. After all, I don't delete language text on uninstall :-)
Average users may not understand why deleting all plugin files still knows it is expired on reinstall.
Suggestions, Comments?
Thank you,
Chris
RGB World, Inc. - Software & Web Development.
rgbworld.com
How about a serialization routine?
I would like to release plugins so they can be downloaded and installed, but after a set time, they expire.
My early thoughts on rolling my own, would be to install a few $mgr->install_options
something like (sudo code)...
$mgr->install_options ('PluginName', ['SerialNum'], Default='' );
$mgr->install_options ('PluginName', ['InstallDate'], = NOW );
Then during script execution, grab...
my $opts = Links::Plugins->get_plugin_user_cfg('PluginName');
Then somehow check if x days have passed since install...
my $opts = Links::Plugins->get_plugin_user_cfg('PluginName');
today = NOW();
if(!($opts->{SerialNum}) {
unless ( (InstallDate - today) < 30 days)
return (error, "Plugin Has Expired, please register");
}
else {
temp = $opts->{SerialNum};
if(! ( temp == domain_as_a_number?))
return (error, "Invalid serial number");
}
I don't need a bullet-proof method, just something that will work.
I realize that uninstalling and reinstalling would reset the date, giving
another 30 days, but I was thinking I might be able to use language.txt
$language->{CF_INSTALL_DATE} = 'NOW';
then check that value. After all, I don't delete language text on uninstall :-)
Average users may not understand why deleting all plugin files still knows it is expired on reinstall.
Suggestions, Comments?
Thank you,
Chris
RGB World, Inc. - Software & Web Development.
rgbworld.com