(Source Code) Automating Drupal module activation
Source Code : Automating Drupal module activation
When upgrading a large Drupal site between major revisions, I find myself doing the update over and over again. Since one site I maintain has 149 modules, and a few more that come packaged with other contrib that are not activated, I decided I don't want to click all those checkboxes every time I do a trial upgrade. While I could have probably come up with some way to just activate every module easily, I really wanted selective activation.
Thanks to Greasemonkey, a Firefox addon, I have automated the activation of all the modules I want.
First, make a list of all the modules you want to activate. You can do this by viewing the HTML source of your modules page and looking for the name of your modules in the form input fields named something like status[coder]. You'll just want the coder part. I recommend putting each module on its own line so if you change your mind on one module, you can just comment out that line.
var modules = new Array();
modules = Array(
// REMOVE DEVEL MODULES BEFORE LIVE LAUNCH
// Development
'coder',
'devel',
'reroute_email',
'cache_disable',
'simpletest',
// END DEVELOPMENT MODULES
// Core - optional
'help',
'menu',
'path',
'syslog',
'tracker',
'update',
// Other
'advanced_help',
'cvs_deploy'
);
Courtesy:- deekayen.net
- guru's blog
- Login to post comments
![Drupal-6-Book-[Building Powerful and Robust Websites with Drupal 6].jpg](http://www.drupalranch.com/images/Drupal-6-Book-[Building%20Powerful%20and%20Robust%20Websites%20with%20Drupal%206].jpg)