pluginloader enhancement for inactive plugins

Discussions and requests related to new CMSimple features, plugins, templates etc. and how to develop.
Please don't ask for support at this forums!
Post Reply
manu
Posts: 661
Joined: Wed Jun 04, 2008 12:05 pm
Location: St. Gallen - Schweiz
Contact:

pluginloader enhancement for inactive plugins

Post by manu » Tue Oct 11, 2011 12:54 pm

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

cmb
Posts: 12719
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: pluginloader enhancement for inactive plugins

Post by cmb » Tue Oct 11, 2011 1:03 pm

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
Christoph M. Becker –Plugins for CMSimple_XH, but not for CMSimple 4+

Gert
Posts: 3053
Joined: Fri May 30, 2008 4:53 pm
Location: Berlin
Contact:

Re: pluginloader enhancement for inactive plugins

Post by Gert » Tue Oct 11, 2011 1:12 pm

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 ...
Gert Ebersbach | CMSimple | Templates - Plugins - Services

manu
Posts: 661
Joined: Wed Jun 04, 2008 12:05 pm
Location: St. Gallen - Schweiz
Contact:

Re: pluginloader enhancement for inactive plugins

Post by manu » Tue Oct 11, 2011 1:22 pm

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?

cmb
Posts: 12719
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: pluginloader enhancement for inactive plugins

Post by cmb » Tue Oct 11, 2011 1:38 pm

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
Christoph M. Becker –Plugins for CMSimple_XH, but not for CMSimple 4+

Gert
Posts: 3053
Joined: Fri May 30, 2008 4:53 pm
Location: Berlin
Contact:

Re: pluginloader enhancement for inactive plugins

Post by Gert » Tue Oct 11, 2011 1:53 pm

cmb wrote:Just checked that: they will be retained ... I'm using FileZilla.
So we have nothing to do - filezilla is freeware ;)
Gert Ebersbach | CMSimple | Templates - Plugins - Services

snafu
Posts: 352
Joined: Sun Dec 26, 2010 5:18 pm

Re: pluginloader enhancement for inactive plugins

Post by snafu » Tue Oct 11, 2011 2:03 pm

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
lg.
winni

Durch einen Sucher betrachtet wird alles zu einem Motiv.
meine Galerie; mein Blog, mein CMSimple Template Tutorial

cmb
Posts: 12719
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: pluginloader enhancement for inactive plugins

Post by cmb » Tue Oct 11, 2011 8:40 pm

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
Christoph M. Becker –Plugins for CMSimple_XH, but not for CMSimple 4+

Post Reply