adrian

Module
Module Toolkit

25 posts in this topic

 
It allows bulk automated migration installation and upgrading of modules (and their config settings) from one PW install to another, so it should be very handy in setting up new sites with your standard collection of favorite modules and settings. Allows includes batch installing by a list of module class names.
 

Go to the Setup > Module Toolkit and follow the prompts.

  • During the import, you can choose which modules from the collection to import.
     
  • You can optionally import the module config settings from the source install. The one caveat is if a particular setting includes a reference to a page, template, or field ID, it won't work, but you can easily update this setting on the destination install.
     
  • Batch install new modules directly from the modules directory with a list of module classnames or URLs to module zip files.
     
  • You can optionally, automatically update all of the imported modules (if they are in the ProcessWire modules directory) to their latest available versions.
     
  • It copies the module files so you can use it to migrate modules that are not available in the PW modules directory, or on Github. Great for all those custom helper modules you've created.
     
  • Full restore feature in case something goes wrong / you change your mind.

I maintain a dedicated test PW install for installing and configuring modules which I can then export for use in my projects using this tool.

Please test and let me know what you think!

26 people like this

Share this post


Link to post
Share on other sites

Hi everyone,

Just added some new features (not in the repo just yet), but wanted to get some feedback on a new name for the module. It still functions as a way to migrate modules and their settings from one PW install to another, but now also includes:

  • batch download and install modules from a list of class names entered in a textarea field
  • batch module updating

Name ideas:

  • ModulesManager wouldn't be bad, but already taken :)
  • ModulesMigratorInstallerUpdater would be the most accurate, but obviously ugly
  • ModulesInstaller is OK, but doesn't cover everything
  • ModulesHelper ?
  • ModulesToolkit ?

Free like for any suggestions :)

Here are some screenshots for inspiration:

THE OPTIONS

post-985-0-24582300-1428940364_thumb.png

EXPORTING

post-985-0-80474300-1428940186_thumb.png

INSTALLING (FROM MIGRATED ZIP)

post-985-0-29425300-1428940200_thumb.png

post-985-0-79357000-1428940209_thumb.png

INSTALLING (FROM LIST OF CLASSNAMES)

post-985-0-01165600-1428940221_thumb.png

post-985-0-02950600-1428940229_thumb.png

BATCH UPDATING MODULES WITH AVAILABLE UPDATES

post-985-0-07304000-1428940310_thumb.png

post-985-0-18361300-1428940318_thumb.png

7 people like this

Share this post


Link to post
Share on other sites

ModuleToolkit is not tha bad..

other tags could be:

ModuleDirector

ModuleAdmin

ModuleMigratorExtended

looks really great for speed up site setup with the new tools!!

Best regads

mr-fan

1 person likes this

Share this post


Link to post
Share on other sites
looks really great for speed up site setup with the new tools!!

Yep - speedier site setup for sure!

Also, with the new batch update function, it is also much easier to update all the modules on existing sites in one go. I find it can be quite tedious to update modules one by one with the current PW tools.

1 person likes this

Share this post


Link to post
Share on other sites

Ok, module has been renamed to Module Toolkit and can now be considered in beta.

In addition to the new functionality noted in the second post, there has been lots of cleanup and one new feature - if you are also running Ryan's ProcessWireUpgrade module, there will be a new button on that module called "Batch Upgrade Modules" that will bring you directly to this module's Upgrade page where you can confirm which modules to upgrade and do them all with one click!

I know that there likely is still some needed improvements in error checking and reporting, but otherwise I think all functionality is working well!

If you have a chance please test and let me know of any issues you come across.

7 people like this

Share this post


Link to post
Share on other sites

This looks like a great timesaver! Thanks for creating this module. I will try it next week.

One minor feature I would like to see added: As I often use forks of modules or custom modules or which are not in the modules directory it would be great if the "list of modules to install" could also contain links to zip files. But also without this addition I think this module will be my new favorite way to install modules when setting up a new site.

2 people like this

Share this post


Link to post
Share on other sites

Thanks @interrobang,

I have just committed an updated that takes care of your request. Now you can enter a mix of module class names for modules in the PW modules directory and URLs to module zip files for any modules only on Github or elsewhere.

Should be a great addition.

4 people like this

Share this post


Link to post
Share on other sites

Yesterday I thought exactly about this procedure. I use several modules over and over again. And it's a hassle to download always the same modules, even when it's comfortable with ModulesManager.

Now I don't have to think further, because you already did it! Great work, and obvious a real time time saver. So it fits perfectly in the ProcessWire galaxy! :)

Thanks!

1 person likes this

Share this post


Link to post
Share on other sites

I just added an "Upgrade Cleanup" option. Now you can easily cleanup all of the backups from the ProcessWire Upgrade module. It lets you review all the folders/files tagged for deletion and then deletes all with one click. It covers core wire folders, .htaccess and index.php backups, as well as all site module backups.

I am also hoping to do some thorough testing of the entire module and get it ready for release fairly soon - is anyone out there using it regularly? Any comments/suggestions/issues?

PS If you're not already using the PW Upgrade module be sure to make it one of your defaults to install on every site - it handles PW core and 3rd party site modules.

6 people like this

Share this post


Link to post
Share on other sites

Good day, @adrian!

Is there anything preventing you from publishing this one in module directory? I only found it 'cuz I knew where to look for ;).

1 person likes this

Share this post


Link to post
Share on other sites
5 hours ago, Ivan Gretsky said:

Good day, @adrian!

Is there anything preventing you from publishing this one in module directory? I only found it 'cuz I knew where to look for ;).

There are still some unsolved issues when installing (or maybe it's exporting?) a module which has required or requiredby dependencies. To be honest it's been a while since I looked at this. I would like to revisit it because it has the potential to be a huge timesaver. I am also thinking of implementing this functionality (https://processwire.com/talk/topic/14117-module-settings-import-export/) into it.

If I can make some time for it, I'll see what I can do about sorting out these issues and getting it published.

3 people like this

Share this post


Link to post
Share on other sites

@adrian Do you plan to extend the batch install module to include built-in modules? I just installed about 10 modules from the modules directory which saved me a lot of time. Being able to install built-in modules like AdminThemeReno, LanguageSupportPageNames, LanguageTabs etc would be great.

1 person likes this

Share this post


Link to post
Share on other sites
On 1/9/2017 at 8:33 AM, tpr said:

@adrian Do you plan to extend the batch install module to include built-in modules? I just installed about 10 modules from the modules directory which saved me a lot of time. Being able to install built-in modules like AdminThemeReno, LanguageSupportPageNames, LanguageTabs etc would be great.

I don't see why not - I never really thought about it before, that's all.

Trouble is that I now have too many modules and not enough time :)

I wasn't really sure how much use this module was getting. Is anybody else using this regularly?

 

2 people like this

Share this post


Link to post
Share on other sites

i have been using/testing this on the last 2 projects.

1 person likes this

Share this post


Link to post
Share on other sites

Just a heads up that I have committed a new version with lots of bug fixes (although I expect there are still some more to come). Also, there was a spelling mistake in the class name of the old version (as noted by @tpr above), so you should uninstall the old version and install this new version from scratch.

Would like to get an idea of how many people are using this - I'd like to get it working well, but it's already been a substantial effort and want to make sure this is in demand over the Module Settings Import / Export that I released yesterday. Obviously this is way more powerful, but maybe it's more than most people want.

Thanks for any feedback.

Cheers,
Adrian

2 people like this

Share this post


Link to post
Share on other sites
On 1/9/2017 at 8:33 AM, tpr said:

@adrian Do you plan to extend the batch install module to include built-in modules? I just installed about 10 modules from the modules directory which saved me a lot of time. Being able to install built-in modules like AdminThemeReno, LanguageSupportPageNames, LanguageTabs etc would be great.

I just tested this using the "Text List" and "JSON settings" options and it should now work with Core modules as well, but it's not well tested, so please let me know how it goes.

2 people like this

Share this post


Link to post
Share on other sites

I've just used the JSON with settings feature to install 3rd party and some core modules, worked well. It's nice to see how much time this module can save, thanks!

First I thought core and 3rd party modules are mixed but 3rd party ones were at the end of the checkboxes list, apart from one or two. If they could be separated better it would be great, eg. in two columns or making 3rd party ones bold or something.

Another thing I noticed is that when the batch install reached a module not listed in the Modules Directory (nor available on GitHub) the batch was aborted and the rest of the modules weren't installed. This was a custom module. If it was possible to skip these and continue with others that would be great.

1 person likes this

Share this post


Link to post
Share on other sites
10 hours ago, tpr said:

Another thing I noticed is that when the batch install reached a module not listed in the Modules Directory (nor available on GitHub) the batch was aborted and the rest of the modules weren't installed. This was a custom module. If it was possible to skip these and continue with others that would be great.

@tpr there seems to be an option to collect those too:

Quote

It copies the module files so you can use it to migrate modules that are not available in the PW modules directory, or on Github. Great for all those custom helper modules you've created.

 

Share this post


Link to post
Share on other sites

That's true for the "zip download" export option, but for the "JSON list" obviously it's not. If custom modules were skipped that would have been more "user-friendly" than aborting. I'll use the ZIP option next time though, thanks for the info.

1 person likes this

Share this post


Link to post
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

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By benbyf
      HELLO!
      I've been working on a user messaging module which I am nearly ready to release as version 1.
      Currently I have the below functionality and I'm looking for feedback to what other things may be useful for people looking to add user to user messaging on their sites.
      compose message to one or more users known to PW js to enable tag based UI display of user names input on compose message form display all message threads with reply forms reply to message thread displaying each user name by each message in the thread display "unread" when a thread has new content that hasnt been seen by current user delete or unpublish message thread (configurable) display total message thread count display total unread threads (threads that have new replies that the current user has not seen) delete all message threads and associated data (not meant for the users to have access to) road map
      send email to user on new message to a thread they are included in
    • By louisstephens
      So I was working on a module and trying to include a library (so I could use it across the site) using $modules->get('myModule'); . However, When I go to include the library folder (modeled after the LibFlourish module created some time ago). I keep getting: 
      site/modules/MyModule/libraryName/ProcessWire\filetoinclude.php This comes with an error notifying that "failed to open stream: No such file or directory in ...".. Is ProcessWire supposed to be in the include url, or is there a way around this? Sorry, I am quite new to working with my own modules.
       
      I just noticed the sub forum regarding Development, if someone could move this to the correct area I would appreciate it.
    • By louisstephens
      I wasn't quite sure where to post this, as this is a question regarding the module (sorry if it is in the wrong place). I was wondering if anyone has used the Email to Page module and figured out a way to "move" incoming css to another field, or how to render the css so the message just renders utilizing the css. 
      Right now all of the message contents get dropped into a textarea field and display in a template as a jumbled mess. Perhaps I am missing a formatting option in the text area field to render the css and html.
    • By blynx
      Hej,
      just finished the first working version of my photoswipe bundle. https://github.com/blynx/MarkupProcesswirePhotoswipe
      Haven't published it to the module directory, yet. Wanted to wait for some feedback.
      You can add a photoswipe enabled thumbnail gallery / lightbox to your site like this. Just pass an image field to the renderGallery method:
      <?php $pwpswp = $modules->get('Pwpswp'); echo $pwpswp->renderGallery($page->nicePictures); Options are provided like so:
      <?php $galleryOptions = [ 'imageResizerOptions' => [ 'size' => '500x500' 'quality' => 70, 'upscaling' => false, 'cropping' => false ], 'loresResizerOptions' => [ 'size' => '500x500' 'quality' => 20, 'upscaling' => false, 'cropping' => false ], 'pswpOptions' => (object) [ 'shareEl' => false, 'indexIndicatorSep' => ' von ', 'closeOnScroll' => false ] ]; echo $pswp->renderGallery($page->images, $galleryOptions); More info about all that is in the readme: https://github.com/blynx/MarkupProcesswirePhotoswipe
      It is possible to customize pretty much anything by providing your own templates and scripts.
      What do you think? Any ideas, bugs, critique, requests?
      cheers
      Steffen
    • By kixe
      FieldtypeColor is on github

      Fieldtype stores a 32bit integer value reflecting a RGBA value.
      Input
      4 types of Inputfields provided
      Html5 Inputfield of type='color' (if supported by browser)    Inputfield type='text' expecting a 24bit hexcode string (RGB). Input format: '#4496dd'.
      The background color of the input field shows selected color Inputfield of type='text' expecting 32bit hexcode strings (RGB + alpha channel) Input format: '#fa4496dd' Inputfield with Spectrum Color Picker
      (Options modifiable) Inputfield type='text' with custom JavaScript and/or CSS (since version 1.0.3) Output
      Define output format under 'Details' tab in field settings. Select from the following 8 options
      string 6-digit hex color. Example: '#4496dd' string 8-digit hex color (limited browser support).  Example: '#fa4496dd' string CSS color value RGB. Example: 'rgb(68, 100, 221)' string CSS color value RGB. Example: 'rgba(68, 100, 221, 0.98)' string CSS color value RGB. Example: 'hsl(227, 69.2%, 56.7%)' string CSS color value RGB. Example: 'hsla(227, 69.2%, 56.7%, 0.98)' string 32bit raw hex value. Example: 'fa4496dd' int 32bit. Example: '4198799069' (unformatted storage value) The Fieldtype includes
      Spectrum Color Picker by Brian Grinstead

      SCREENSHOTS
      Input type=text with changing background and font color (for better contrast)

      Input type=color (in Firefox)


      Javascript based input (Spectrum Color Picker)


      Settings Output

       
      Settings Input