Jump to content

How to do various checks before installing the module?


Recommended Posts

I am looking to check some requirements with the PHP environment before the module is installed and maybe even have the module deny or alert the user trying to install it of any issues. How would that happen ?

I did find out about the Module:: __install() hook but where should how should I use it in the module itself ? Just go ahead and implement the method inside the module's class?
 

Link to comment
Share on other sites

For reference; Nico just recently added some checks to his MarkupShortcodes module like so: http://processwire.com/talk/topic/1819-markupshortcodes/?p=32176

Bad idea. It's not gonna work, because the module code get's loaded by php even before it's installed, once you click refresh for new modules you'll end up with a error for the whole site if php is not 5.3...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...