Disabling/enabling 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!
cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Disabling/enabling plugins

Post by cmb » Tue Apr 17, 2012 5:38 pm

Hi Gert,

I like the idea of the Pluginmanager more and more! But I found a problem: if somebody has News and Newsletter/Newsrotator installed and disables Newsletter or Newsrotator, News will be disabled too. The same holds for Kissgallery_XH and gallery.

And I would like to suggest to put the 'message_plugin_disabled' to the pluginloader language files. If somebody disables a plugin (e.g. a webdesigner after having configured the installation for his client), and uninstalls the Pluginmanager, the language string would not be available any more.

And perhaps the Pluginmanager should be linked directly from "Plugins" similar to the way it's done with the Pagemanager.

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

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

Re: Disabling/enabling plugins

Post by Gert » Tue Apr 17, 2012 6:08 pm

cmb wrote:If somebody disables a plugin (e.g. a webdesigner after having configured the installation for his client), and uninstalls the Pluginmanager, the language string would not be available any more.
I have moved the "disabled_plugins.txt" to the folder "./plugins/pluginmanager/" now, so it will be deleted too, if someone deletes the Pluginmanager, and all plugins are activated again.

All your suggestions may be considered, if we put the Pluginmanager_XH to the standard download of CMSimple_XH (or prepare CMSimple_XH for Pluginmanager_XH).
cmb wrote:But I found a problem: if somebody has News and Newsletter/Newsrotator installed and disables Newsletter or Newsrotator, News will be disabled too. The same holds for Kissgallery_XH and gallery.
Grrr ... it's because gallery is contained in kissgallery ... and so on, I will think about it,

Gert
Gert Ebersbach | CMSimple | Templates - Plugins - Services

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

Re: Disabling/enabling plugins

Post by Gert » Tue Apr 17, 2012 7:10 pm

cmb wrote:if somebody has News and Newsletter/Newsrotator installed and disables Newsletter or Newsrotator, News will be disabled too. The same holds for Kissgallery_XH and gallery.
Have found a solution, added "||| ... |||" to every element of the array (|||news||| |||newsletter||| |||newsrotator||| and so on).

New download in some minutes ...

Gert
Gert Ebersbach | CMSimple | Templates - Plugins - Services

bca
Posts: 293
Joined: Tue Sep 15, 2009 4:49 pm

Re: Disabling/enabling plugins

Post by bca » Tue Apr 17, 2012 8:21 pm

I like this idea.

Found a small problem: The save button is 4px wide

Think theres a problem in line 98 in admin.php
$o.='<input type="submit" name="save" value="' . $plugin_tx['pluginmanager']['button_save'] . '" style="margin: 0 0 10px 0;">' . "\n";
Should it be value="Save"

Also I get any files that are in the root folder showing in the plugin list eg OLDindex.php where I renamed the original index.php

B

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

Re: Disabling/enabling plugins

Post by Gert » Tue Apr 17, 2012 8:52 pm

Hello,

!!! FOR TESTING PURPOSES ONLY - use with caution !!! (for CMSimple_XH 1.5.3 only)

Download beta03: http://www.ge-webdesign.de/cmsimple/dlc ... php?id=376

Gert
Gert Ebersbach | CMSimple | Templates - Plugins - Services

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

Re: Disabling/enabling plugins

Post by Gert » Tue Apr 17, 2012 9:01 pm

bca wrote:Should it be value="Save"
No, it shall use the language variable "$plugin_tx['pluginmanager']['button_save']".

Which language you are using? Is there an adequate language file in the languages folder of Pluginmanager? Is that languages folder writable (to create a language file in English from default.php)?

Gert
Gert Ebersbach | CMSimple | Templates - Plugins - Services

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

Re: Disabling/enabling plugins

Post by Gert » Tue Apr 17, 2012 9:52 pm

bca wrote:Also I get any files that are in the root folder showing in the plugin list eg OLDindex.php where I renamed the original index.php
Oh, a stupid mistake in admin.php :o - interchanged the elements of stristr() when creating the plugins array :oops:

New download of beta03 made 23:45 clock

Download new and the problem should be gone,

Gert
Gert Ebersbach | CMSimple | Templates - Plugins - Services

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

Re: Disabling/enabling plugins

Post by Gert » Wed Apr 18, 2012 9:30 am

Hello,

by playing around with many installed plugins, I found an issue regarding the new admin menu of all CMSimple_XH versions since 1.5:

If the dropdown menu "Plugins" is higher than the screen resolution, you can't access the last plugins in the list, they are not reachable. With a typical screen resolution of 1024 x 600px I also can't click the Pluginmanager itself in my dev installation :o

The Pluginmanager_XH beta04 solves also this problem, but there was a further change in cms.php (admin menu) necessary. So I think, we should add the Pluginmanager_XH to the standard download of CMSimple_XH and/or prepare cms.php and index.php of pluginloader for the Pluginmanager_XH.

New in Pluginloader_XH beta04:

1. The plugin names are links to the plugins backend now.

2. If you click "Plugins" directly in the admin menu, you call the Pluginmanager directly (like the old settings page).

Now you can call the plugins backends directly from the Pluginmanager, if the dropdown menu of "Plugins" is to high for your screen.

!!! FOR TESTING PURPOSES ONLY - use with caution !!! (for CMSimple_XH 1.5.3 only)

Download beta04: http://www.ge-webdesign.de/cmsimple/dlc ... php?id=376

Gert
Gert Ebersbach | CMSimple | Templates - Plugins - Services

Holger
Site Admin
Posts: 3470
Joined: Mon May 19, 2008 7:10 pm
Location: Hessen, Germany

Re: Disabling/enabling plugins

Post by Holger » Wed Apr 18, 2012 9:36 am

Nice!

But I don't understand why this is done with a new plugin and why the list of disabled plugins is stored in a txt-file?

As far as I can see most of the work is done in cms.php and in /plugins/index.php anyway.
Some time (years?) ago I've suggested something like below to the devs:
why not putting a admin.php to /plugins/pluginloader/
and a config.php to /plugins/pluginloader/config?

So the array with the disabled plugins can be stored in a $cf['pluginloader']['....'] - variable and you can use the default
functions of the PL to manage them - maybe with a polished backend like tinymce or ckeditor.
That might be much easier ($cf is available by default) and more consistent than writing own functions for managing text-files IMO.

Holger

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

Re: Disabling/enabling plugins

Post by Gert » Wed Apr 18, 2012 9:52 am

Holger wrote:But I don't understand why this is done with a new plugin ...
Same procedure as with filebrowser and pagemanager ... and: "I did it my way" ;)
Holger wrote:As far as I can see most of the work is done in cms.php and in /plugins/index.php anyway.
The most work was the "polished backend" (the admin.php) of Pluginmanager_XH.
Holger wrote:That might be much easier ...
What can be easier than 2 radio buttons for every plugin and directly access from the admin menu?

Gert
Gert Ebersbach | CMSimple | Templates - Plugins - Services

Post Reply