Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: Admin on|off switch pref #11

Closed
c2mrdale opened this issue May 15, 2014 · 3 comments
Closed

Request: Admin on|off switch pref #11

c2mrdale opened this issue May 15, 2014 · 3 comments

Comments

@c2mrdale
Copy link

I would like to run this plugin through plugin composer as a php file as I do with my other plugins. This way I can have sets that span multiple sites. As you know running plugins through the cache folder makes them "always on". I'd like an option in prefs to disable import from files so I don't have to load this plugin for every site.

can haz?

@gocom
Copy link
Owner

gocom commented May 16, 2014

rah_flat doesn't support plugin cache directory and you still need to install it normally to get it working; the plugin uses installation events and relays plugin load order. The plugin cache directory itself is limited, and isn't really meant for production, but for plugin development.

If the plugin is installed through normal supported means, or using Composer package manager (which runs plugins as normal files too), you can disable the plugin from the Plugins panel. That's also the correct way of disabling the plugin added features as it removes the added resource load (no code will need to be executed). Adding such additional option on the other hand will still need to load the plugin and execute code, and indirectly recommends using the wrong means.

If you want to disable the plugin when run through plugin cache directory (which I do not recommend and can't support, because of its limitations), I recommend you to use symbolic links. Have a 'plugins_available' directory, and site specific 'site1/plugins_enabled' directories that links to those available plugins.

To get rah_flat running in plugin cache directory, you must first install the plugin normally, then delete its row from txp_plugins database table, and add the plugin to a the plugin cache directory that must not be located within publicly accessible document root. Having the plugin's source file in publicly accessible location may lead into some unexpected security issues.

If you are using some sort of management plugin for the plugin cache directory, you may want to recommend feature addition there.

@gocom gocom closed this as completed May 16, 2014
@gocom
Copy link
Owner

gocom commented May 16, 2014

You can also disable the plugin's importing features by either:

  • Emptying the path option.
  • Removing, or not creating, the template directories or removing the directory's read access. Each content-type is disabled if it doesn't have a matching directory.

@c2mrdale
Copy link
Author

While this is true, the latest version has the ability to trigger these
events (install, enable or both) manually.

On 5/16/14, 6:18 AM, Jukka Svahn wrote:

If the plugin is installed through normal supported means, or using
Composer package manager (which runs plugins as normal files too), you
can disable the plugin from the Plugins panel. That's also the correct
way of disabling the plugin added features as it removes the added
resource load (no code will need to be executed). Adding such
additional option on the other hand will still need to load the plugin
and execute code, and indirectly recommends using the wrong means.

I can certainly just alter the path to the flat directory to disable it.

Gotta say this plugin is amazing, It makes building 900% faster. Abut
the only thing I could ask for is an export, so that I can get files in
the right format from an existing site... that takes a bit of work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants