Page 1 of 1

pluginloader enhancement for inactive plugins

Posted: Tue Oct 11, 2011 12:54 pm
by manu
Regarding to the vast enhancements done in version 1.5 beta I notice that also the pluginloader has modified (after a long time).
I propose a little modification that enables me to leave inactive plugins on the server. Why? If I want to update a plugin I prefer to install the new one, set the old version inactive before on the server. If anything fails I'm very quick back on the previous state instead of upload the old version again.
With the 3 modifications below in the pluginloader (plugins/index.php) all plugins with an ending like '_inactive' will be ignored. If I rename the old plugin directory name with a trailing "_inactive" it won't be overwritten by the new release.

line ~183:
if($plugin != '.' && $plugin != '..' && is_dir($pth['folder']['plugins'].$plugin) AND substr($plugin,-9,9)!='_inactive') { //EM~

line ~223:
if($plugin != "." AND $plugin != ".." AND $plugin != $pluginloader_cfg['foldername_pluginloader'] AND is_dir($pth['folder']['plugins'].$plugin) AND substr($plugin,-9,9)!='_inactive') { //EM~

line~237:
if($plugin != "." AND $plugin != ".." AND $plugin != $pluginloader_cfg['foldername_pluginloader'] AND is_dir($pth['folder']['plugins'].$plugin) AND substr($plugin,-9,9)!='_inactive') { //EM~


I would appreciate to have this in a new release, what do you think?.
best regards
manu

Re: pluginloader enhancement for inactive plugins

Posted: Tue Oct 11, 2011 1:03 pm
by cmb
Hello Manu,

indeed the changes could be quickly done, and it seems to suffice. But OTOH: is it really necessary? I already use the following approach, which works quite well on my local machine and even on my server with an appropriate FTP client:
I have a folder plugins/_uninstalled/ to which I can move the plugins I don't want (the name of the folder doesn't matter, but I prefer the underscore, to have it listed first). If I want to restore them, I simply move them back to the plugins/ folder.

Wouldn't that work for you too?

Christoph

Re: pluginloader enhancement for inactive plugins

Posted: Tue Oct 11, 2011 1:12 pm
by Gert
cmb wrote:If I want to restore them, I simply move them back to the plugins/ folder.
... and have to set the file- and folder permissions new :( - or have you a ftp client, retaining the file- and folder permissions by moving the whole plugin folder?

To rename the plugin folder would be more comfortable. But I don't know ...

Re: pluginloader enhancement for inactive plugins

Posted: Tue Oct 11, 2011 1:22 pm
by manu
cmb wrote:I have a folder plugins/_uninstalled/ to which I can move the plugins I don't want (the name of the folder doesn't matter, but I prefer the underscore, to have it listed first). If I want to restore them, I simply move them back to the plugins/ folder.
With my ftp client it is not possible to have source and target on the ftp host, do you?

Re: pluginloader enhancement for inactive plugins

Posted: Tue Oct 11, 2011 1:38 pm
by cmb
Hello Gert, hello Manu,
Gert wrote:and have to set the file- and folder permissions new
I never had any problems with that before. Just checked that: they will be retained. :)
manu wrote:With my ftp client it is not possible to have source and target on the ftp host, do you?
I'm using FileZilla. It has a folder treeview and a file/folder list. I can drag&drop from the list to the treeview.

Christoph

Re: pluginloader enhancement for inactive plugins

Posted: Tue Oct 11, 2011 1:53 pm
by Gert
cmb wrote:Just checked that: they will be retained ... I'm using FileZilla.
So we have nothing to do - filezilla is freeware ;)

Re: pluginloader enhancement for inactive plugins

Posted: Tue Oct 11, 2011 2:03 pm
by snafu
i use a local (on my domain) installed net2ftp, to copy or move files and directorys (also for editing). Plugins not in use i move in a dirctory outside cmsimple.
net2ftp is, imho, the best ftp tool for managing files on your webspace

Re: pluginloader enhancement for inactive plugins

Posted: Tue Oct 11, 2011 8:40 pm
by cmb
Hi Winni,

thanks for the hint to net2ftp. I'll give it try ASAP. But I'm not sure if I'll like it. At least for editing files online a prefer my accustomed editor.

Christoph