답변:
내가 사용하는 두 가지 옵션은 Drush와 사용자 지정 스크립트입니다.
Drush의 경우 다음을 사용할 수 있습니다 drush pm-list.
$ drush help pm-list
Show a list of available extensions (modules and themes).
Options:
--type Filter by extension type. Choices:
module, theme.
--status Filter by extension status. Choices:
enabled, disable and/or 'not
installed'. You can use multiple
comma separated values. (i.e.
--status="disabled,not installed").
--package Filter by project packages. You can
use multiple comma separated values.
(i.e. --package="Core -
required,Other").
--core Filter out extensions that are not
in drupal core.
--no-core Filter out extensions that are
provided by drupal core.
--pipe Returns a space delimited list of
the names of the resulting
extensions.
Aliases: pml
Drupal 6 용이 스크립트를 작성했습니다. Drupal 7의 부트 스트랩을 편집해야하며 경로 확인을 조정할 수도 있습니다. 나는 이것을 DOCROOT에 modules.php라는 파일에 넣고 주변에서 액세스 제한을 추가하여 야생에서 호출되는 것을 방지합니다.
<?php
include_once './includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
header('Content-Type: text/plain');
$files = drupal_system_listing('/\.module$/', 'modules', 'name', 0);
system_get_files_database($files, 'module');
ksort($files);
$core_installed = array();
$core_enabled = array();
$core_disabled = array();
$contrib_installed = array();
$contrib_enabled = array();
$contrib_disabled = array();
foreach ($files as $info) {
$filename = $info->filename;
$name = $info->name;
$status = $info->status;
$contrib = strpos($filename, "sites/all/modules/") === 0;
if ($contrib) {
$contrib_installed[] = $name;
if ($status) $contrib_enabled[] = $name;
else $contrib_disabled[] = $name;
} else {
$core_installed[] = $name;
if ($status) $core_enabled[] = $name;
else $core_disabled[] = $name;
}
}
print "Installed Core Modules: " . join(", ", $core_installed) . "\n\n";
print "Enabled Core Modules: " . join(", ", $core_enabled) . "\n\n";
print "Disabled Core Modules: " . join(", ", $core_disabled) . "\n\n";
print "Installed Contrib Modules: " . join(", ", $contrib_installed) . "\n\n";
print "Enabled Contrib Modules: " . join(", ", $contrib_enabled) . "\n\n";
print "Disabled Contrib Modules: " . join(", ", $contrib_disabled) . "\n\n";
이 스크립트는 다음을 사용하여 drush로 호출 할 수 있습니다. drush scr modules.php
사용 가능 모듈 (enabled_modules) 모듈은 웹 사이트에 사용 가능한 모든 모듈의 목록을 제공합니다.
또는,
이 API 함수 module_list 를 사용하여 사용 가능한 모든 모듈을 가져올 수 있습니다 .
예, 모듈 필터 모듈을 확인하십시오 . 모듈을 훨씬 쉽게 관리 할 수있는 뛰어난 관리자 도우미입니다.
모듈 목록 페이지는 상당히 큰 사이트를 다루거나 심지어 고려되는 새롭고 다양한 모듈을 테스트하기위한 개발 사이트를 다룰 때 상당히 커질 수 있습니다. 이 모듈의 목표는 브라우저 검색 기능에 의존하지 않고 원하는 모듈을 신속하게 찾을 수있는 기능입니다. 메뉴 항목과 같은 다양한 모듈 또는 페이지의 다른 위치.
모듈 필터의 설정 페이지를 통해 탭을 활성화하면 새로운 모듈 레이아웃 테마가 구현됩니다. 이 탭 레이아웃은 각 패키지에 대한 탭과 모든 모듈을 알파벳순으로 표시하는 탭을 제공합니다. 필터 텍스트 필드는 각 탭에서 사용할 수 있지만 현재 자동 완성을 지원하지 않습니다.
Drush make에는 기본 makefile 생성 기능이 있습니다. 이를 사용하려면 파일을 생성하려는 Drupal 설치로 디렉토리를 변경하고 다음 명령을 실행하십시오.
drush generate-makefile /path/to/make-file.make
모듈 목록과 함께 make-file.make를 얻습니다. 그런 다음이 모듈을 다른 프로젝트에로드 할 수 있습니다. http://www.drush.org/en/master/make/#usage를 읽으십시오
drush를 실행할 수있는 명령 줄 액세스 권한이 없으면 웹 UI에서 수행 할 수있는 작업을 찾고있을 수 있습니다. 내가 찾을 수있는 가장 좋은 해결책은 모듈 페이지를 찾은 다음 콘솔 에서이 명령을 실행하는 것입니다.
jQuery('table.sticky-enabled input[checked=checked]')
.closest('tr')
.find('td label strong')
.each(function() {
console.log(jQuery(this).text());
})
그러면 콘솔에서 활성화 된 모든 모듈이 인쇄되어 원하는 위치에 붙여 넣을 수 있습니다.
Forena 모듈을 설치하고 활성화합니다 (공개 유지 업체 인 공개). "administrator"역할이있는 사용자는에 위치한 전달 된 (샘플) 보고서를 탐색 할 수 있으며이 reports/drupaladmin.enabled_contributions질문에 대한 목록이 표시됩니다.
.FRX보고서를 작성하기위한 스펙 ( 파일, XHTML 문서)은 다음과 같습니다.
<?xml version="1.0"?>
<!DOCTYPE root [
<!ENTITY nbsp " ">
]>
<html xmlns:frx="urn:FrxReports">
<head>
<title>Enabled Modules and Themes</title>
<frx:category>Drupal Administration</frx:category>
<frx:options hidden="0" />
<frx:parameters>
</frx:parameters>
<frx:docgen>
</frx:docgen>
</head>
<body>
<div frx:block="drupal/enabled_modules" id="forena-1">
<table>
<thead>
<tr>
<th>name</th>
<th>owner</th>
<th>weight</th>
</tr>
</thead>
<tbody>
<tr frx:foreach="*" id="forena-2">
<td>{name}</td>
<td>{owner}</td>
<td>{weight}</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>
보고서에서 참조 된 데이터 블록 (SQL 문)은 다음과 같습니다.
--ACCESS=access administration pages
SELECT name, owner, weight FROM {system}
WHERE status=1 AND 'module'=type
ORDER BY name
정말 "그것"입니다.
추신 : .FRX자신의 필요에 맞게 파일 및 / 또는 데이터 블록을 자유롭게 조정 (적응)하십시오 .
AND 'module'=type?! 이어야한다AND type = 'module'
버그 모듈을 발견 한 추가 뷰 시스템 모듈이 없으면 뷰가 트릭을 수행 할 수 있지만 스키마 모듈은 하나의 옵션이지만 버전 번호를 얻지 못합니다.
drush @sites pml --no-core --type=module --status="enabled" -y`그렙를 사용하여 말의 some_module과 필터 | grep some_module`