Skip to content
AtlanticBT Monogram
Article

Drupal – How to Get a List of your Active Modules

Has a client ever asked you “So what Drupal modules are we using?”  Now you can give them a nice table!  With links to each module page.

  1. Go to http://yoursite.com/admin/modules
  2. Run the following javascript in your Console (Firebug, Developer Tools, etc – F12)

[js]
(function($, D, boxid){ /*–start–*/var $checkboxes = $(‘:checkbox’)
, $checked = $checkboxes.filter(‘:checked’)
, $dom_render_to_div = false
;
console.log($checked.length, ‘enabled modules’);

// clear old version
$(‘#’+boxid).remove();

var render = function(o, renderfn){
renderfn(o);
};
var render_to_console = function(o){
console.log(o.i, ‘Section:’ + o.s, ‘Module:’ + o.l, o.v);
};
var render_to_div = function(r){
if( false === $dom_render_to_div ){
var $container = $(‘<div id="’ + boxid + ‘" class="debug"><h3>Active Modules</h3></div>’);
$container.append(‘<table></table>’).append(‘<div class="clearfix">Copy Above</div>’);
$container.css({
‘background-color’: ‘#FFFFFF’
, ‘left’: ‘20%’
, ‘padding’: ‘5%’
, ‘position’: ‘absolute’
, ‘top’: ‘20%’
});

$(‘body’).append($container);
$dom_render_to_div = $container.find(‘table’);
$dom_render_to_div.append(‘<tr><th>i</th><th>Section</th><th>Label</th><th>Version</th></tr>’);
}
$dom_render_to_div.append(‘<tr><td>’ + r.i + ‘</td><td>’ + r.s + ‘</td><td><a href="http://drupal.org/project/’ + r.id + ‘">’ + r.l + ‘</a></td><td>’ + r.v + ‘</td></tr>’);
};

$checked.each(function(i,o){
var $o = $(o);
var $row = $o.parents(‘tr’);
var section = $o.parents(‘fieldset’).find(‘legend’).text();
if( 7 == D ) section = section.replace(/Hide /i, ”);
var label = "" + $row.find(‘td:nth(1) label’).text();
var version = $row.find( 7 == D ?’td:nth(2)’ : ‘td.version’ ).text();
var iden = $row.find(‘:checkbox’).attr(‘name’).match(/][([^]]+)]/)[1];

var row = {"i": i, "s": section, "l": label, "v": version, "id": iden};

render(row, render_to_div);
});
/*–end–*/ })(jQuery, 7, ‘module-list-debug’);
[/js]

capabilities covered
Amazon Web Services

The Atlantic BT Manifesto

The Ultimate Guide To Planning A Complex Web Project

Insights

Atlantic BT's Insights

We’re sharing the latest concepts in tech, design, and software development. Learn more about our findings.

Questions & Answers

Are there differences in application architecture that are important for the cloud?
It is important to build applications and workloads specifically for the cloud. You will want to carefully consider what services the cloud provider of your choice has to offer and how your application leverages those services.
Learn More
Are there any drawbacks to cloud hosting?
Yes, there will always be some risks associated with any hosting option. You are relying on the resiliency and engineering of infrastructure that has scaled at an astounding rate.
Learn More
What’s the benefit of hosting in the cloud vs. traditional options?
Reasons not to host in the cloud are few and far between. If you don't host in the cloud, you will spend more in both CapEx and OpEx to manage your applications or websites in a traditional environment.
Learn More
How can I improve the performance of my application?
There are several primary reasons that applications perform poorly, and in some cases it’s a combination of several. 1) Data latency: If your application is making calls to a data source (whether it’s an API or a direct call) and there is latency at the data provider, your application performance will suffer.
Learn More
Should I move my application to the cloud?
The answer is ‘probably yes’. There aren’t many reasons for an application to be hosted elsewhere, aside from occasional compliance standards, or requirements to integrate with local services that would require large amounts of data to move from on-premise to cloud.
Learn More
Where should my application be hosted?
There are many different options for hosting, but most applications would do well with one of the cloud providers -- Amazon Web Services, Google Cloud Platform, Microsoft Azure.
Learn More