Дополнительные модули

Дополнительные модули можно найти: http://drupal.org/project/Modules

Установка модулей - статья по операциям с модулями.

Сделать:
Список нужных модулей и их использование
Как выбрать модуль, какие они бывают (стабильные/не стабильные)

Boost

Описание модуля

Полное название: Boost
Проект начат: October 15, 2006

В Друпал 6 есть своё кеширование страниц для анонимов.

Описание с сайта

Как модуль работает

Once Boost has been installed and enabled, page requests by anonymous
visitors will be cached as static HTML pages on the server's file system.
Periodically (when the Drupal cron job runs) stale pages (i.e. files
exceeding the maximum cache lifetime setting) will be purged, allowing them
to be recreated the first time that the next anonymous visitor requests that
page again.

New rewrite rules are added to the .htaccess file supplied with Drupal,
directing the web server to try and fulfill page requests by anonymous
visitors first and foremost from the static page cache, and to only pass the
request through to Drupal if the requested page is not cacheable, hasn't yet
been cached, or the cached copy is stale.

IMPORTANT NOTES

* Drupal URL aliases get written out to disk as relative symbolic links
pointing to the file representing the internal Drupal URL path. For this
to work correctly with Apache, ensure your .htaccess file contains the
following line (as it will by default if you've installed the file shipped
with Boost):
Options +FollowSymLinks
* To check whether you got a static or dynamic version of a page, look at
the very end of the page's HTML source. You have the static version if the
last line looks like this:
<!-- Page cached by Boost at 2006-11-24 15:06:31 -->
* If your Drupal URL paths contain non-ASCII characters, you may have to
tweak your locate settings on the server in order to ensure the URL paths
get correctly translated into directory paths on the file system.
Non-ASCII URL paths have currently not been tested at all and feedback on
them would be appreciated.

LIMITATIONS
-----------
* Only anonymous visitors will be served cached versions of pages; logged-in
users will get dynamic content. This may somewhat limit the usefulness of
this module for those community sites that require user registration and
login for active participation.
* Only content of the type `text/html' will get cached at present. RSS feeds
and URL paths that have some other content type (e.g. set by a third-party
module) will be silently ignored by Boost.
* In contrast to Drupal's built-in caching, static caching will lose any
additional HTTP headers set for an HTML page by a module. This is unlikely
to be problem except for some very specific modules and rare use cases.
* Web server software other than Apache is not supported at the moment.
Adding Lighttpd support would be desirable but is not a high priority for
the author at present (see TODO.txt). (Note that while the LiteSpeed web
server has not been specifically tested by the author, it may, in fact,
work, since they claim to support .htaccess files and to have mod_rewrite
compatibility. Feedback on this would be appreciated.)
* At the moment, Windows users are S.O.L. due to the use of symlinks and
Unix-specific shell commands. The author has no personal interest in
supporting Windows but will accept well-documented, non-detrimental
patches to that effect (see http://drupal.org/node/174380).

Требования

Чистые ссылки должны быть включены и работать правильно.
Модули `path' и `pathauto' очень желательны.

In order for the static files to be correctly expired, the Drupal cron job
must be correctly setup to execute more often than, or as often as, the
cache lifetime interval you specify.

Since the static page caching is implemented with mod_rewrite directives,
Apache version 1.3 or 2.x with mod_rewrite enabled is required (if Drupal's
clean URLs work for you, you're fine; if not, get them working first).
Other web servers, such as Lighttpd, are NOT supported at present.

The `drush' module is required for (optional) command line usage.

Настройка

Установка

  1. Включить "Чистые ссылки" (Administer >> Site configuration >> Clean URLs)
  2. Установить модуль boost
  3. Открыть Производительность - Boost (Administer >> Site configuration >> Performance >> Boost), чтобы настроить модуль
  4. Открыть "Производительность" (Administer >> Site configuration >> Performance).
  5. Указать папку для хранения кеша, которая должна быть доступна на запись веб-серверу. Эту папку рекомендуется назвать "cache" и разместить в корне сайта. Если вы меняете её расположение, то нужно будет вносить изменения в файл .htaccess
  6. Там же включить кеширование статики
  7. ВНИМАНИЕ: замените ваш файл .htaccess на modules/boost/htaccess/boosted.txt и настройте его как вам будет нужно. Если вы этого не сделаете, что кеширование статики работать не будет!
  8. Выйти из Друпал (или использовать другой браузер), чтобы походить по сайту как анонимный пользователь. Убедитесь, что файлы кеша сохраняются в папке, которую вы указали выше.
  9. Читайте README.txt, если нужна дополнительная информация

FILE SYSTEM CACHE

The cached files are stored (by default) in the cache/ directory under your
Drupal installation directory. The Drupal pages' URL paths are translated
into file system names in the following manner:

http://mysite.com/
=> cache/mysite.com/0/index.html

http://mysite.com/about
=> cache/mysite.com/0/about.html

http://mysite.com/about/staff
=> cache/mysite.com/0/about/staff.html

http://mysite.com/node/42
=> cache/mysite.com/0/node/42.html

You'll note that the directory path includes the Drupal site name, enabling
support for multi-site Drupal installations. The zero that follows, on the
other hand, denotes the user ID the content has been cached for -- in this
case the anonymous user (which is the default, and only, choice available
for the time being).

DISPATCH MECHANISM

For each incoming page request, the new Apache mod_rewrite directives in
.htaccess will check if a cached version of the requested page should be
served as per the following simple rules:

1. First, we check that the HTTP request method being used is GET.
POST requests are not cacheable, and are passed through to Drupal.

2. Next, we make sure that the URL doesn't contain a query string (i.e.
the part after the `?' character, such as `?q=cats+and+dogs'). A query
string implies dynamic data, and any request that contains one will
be passed through to Drupal. (This also allows one to easily obtain the
current, non-cached version of a page by simply adding a bogus query
string to a URL path -- very useful for testing purposes.)

3. Since only anonymous visitors can benefit from the static page cache at
present, we check that the page request doesn't include a cookie that
is set when a user logs in to the Drupal site. If the cookie is
present, we simply let Drupal handle the page request dynamically.

4. Now, for the important bit: we check whether we actually have a cached
HTML file for the request URL path available in the file system cache.
If we do, we direct the web server to serve that file directly and to
terminate the request immediately after; in this case, Drupal (and
indeed PHP) is never invoked, meaning the page request will be served
by the web server itself at full speed.

5. If, however, we couldn't locate a cached version of the page, we just
pass the request on to Drupal, which will serve it dynamically in the
normal manner.

C

Модули на букву C

cacherouter

Описание модуля

Полное название: Cache Router
Проект начат: March 31, 2008

Описание с сайта

CacheRouter is a caching system for Drupal allowing you to assign individual cache tables to specific cache technology. CacheRouter also utilizes the page_fast_cache part of Drupal in order to reduce the amount of resources needed for serving pages to anonymous users.

Most of the code comes from refactoring the following projects: APC, fastpath_fscache, Memcache, and XCache.

Note: Please be aware that this module uses page_fast_cache to avoid database hits when using any of the types besides "db" caching. You will not get information in statistics for Anonymous users if you use this module.

Зависит от:

Настройка

См. страницу модуля - описано подробно.

Использованные материалы

Полезные ссылки

contemplate

Модуль Content Template (a.k.a. ConTemplate) позволяет изменять поля Друпала, используя определяемые администратором стили (templates), в которых используется PHP.

Страница проекта: http://drupal.org/project/contemplate

Contemplate позволяет легко изменить дизайн любой ноды, созданной с помощью CCK без необходимости переписывания файла template.php. Для начала нам нужна нода из собственного типа и модуль contemplate. После инсталяции мы можем настроить стиль в administer -> content -> templates. Здесь мы увидим список всех типов материалов с возможностью изменить стиль для нужного типа материалов. Если вы установили модуль Book, то у вас есть тип "page".
Когда вы щелкните create template (создать шаблон), вы увидите два поля с шаблонами, один из которых тизер, а другой - полный вид ноды. Быстрый взгляд на код позволяет объяснить, как изменять ноды.

<div class=”field field-type-text field-field-brief-description”>
  <h3 class=”field-label”>Короткое Описание</h3>
  <div class=”field-items”>
      <div class=”field-item”></div>
  </div>

Этот пример типичного поля CCK, этот шаблон повторяется для каждого созданного вами поля. Совсем несложно понять, что можно изменять, что не следует, что можно изменить класс в тэге div или другом в файле стилей или создать новый. Давайте быстро подправим нашу цену курса:

<div class=”field field-type-number-integer field-field-cost”>
  <h3 class=”field-label”>Цена</h3>
  <div class=”field-items”>
    <?php foreach ((array)$field_cost as $item) { ?>
      <div class=”field-item”>£<?php print $item[’view’] ?> За Человека</div>
    <?php } ?>
  </div>
</div>

Это действительно простое изменение, но оно помогает понять все возможности. Вы можете изменять этот шаблон, как любой другой, используя знания HTML и PHP.

Источник: http://www.drupal.ru/node/5787
Автор: maxbinzzz

Полезные ссылки:
Drupal School: Custom Content Types (CCK+Imagefield+Contemplate) - можно скачать видео (MOV) на английском языке. This Drupal video tutorial demonstrates: Creating (and theming) custom content types using CCK, Imagefield, Content Template.

D

Модули на букву D

default_filter

Описание модуля

Полное название: Default Filter
Проект начат: August 3, 2007

Описание с сайта

Модуль позволяет устанавливать формат ввода по умолчанию для документа (node), типа материала и роли, чтобы не вынуждать пользователей ставить галочку каждый раз, когда они создают документ. Это полезно для сайтов, которые устанавливают общий формат по умолчанию более ограниченным, чтобы избежать использования анонимами (гостями) формата ввода full HTML.

To add a new default, select a role, an existing filter format, and a node type from the controls. You may also wish to specify a weight in order to give some formats preference over others. For example, a user might belong to two roles that you have specified different defaults for. In this case, you would give a lighter weight to the more privileged role, so that its default is returned for that user, while other users who belong only to the less-privileged role would get the heavier default filter.

This module honors filter format privileges. That is, if a given role has not been given permission to use a format in the filter administration section, this module does not override that permission. At present, this happens behind the scenes, and the user interface section does not enforce the prohibition yet. So be sure you have allowed a role to use a given filter prior to adding defaults here.

Зависит от:

Настройка

Drupal 6

Для работы в Друпал 6 нужно применить патч: http://drupal.org/node/222497

Я применял к default_filter-5.x-2.0
В патче ничего менять не нужно - он сделан правильно.
Скопировать файл заплаты в папку модуля и в этой папке выполнить:

patch -p0 < ./default_filter-head-to-d6compat.patch

Результат выполнения:

[vlad@localhost default_filter-5.x-2.0-patched]$ patch -p0 < ./default_filter-head-to-d6compat.patch
patching file default_filter.info
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file default_filter.info.rej
patching file default_filter.install
patching file default_filter.module
[vlad@localhost default_filter-5.x-2.0-patched]$

В файле default_filter.info.rej указано, что в файле default_filter.info нужно добавить строку:

core = 6.x

и изменить версию модуля на 6.x
Модуль заработал в 6.2 без проблем.

domain

Описание модуля

Полное название: Domain Access
Проект начат: November 27, 2006

Описание с сайта

The Domain Access project is a group of lightweight modules that provide tools for running a group of affiliated sites from one Drupal installation and a single shared database. The module allows you to share users, content, and configurations across a group of sites such as:

  • example.com
  • one.example.com
  • two.example.com
  • my.example.com

By default, these sites share all tables in your Drupal installation. The Domain Prefix module allows for selective, dynamic table prefixing for advanced users.

The module uses Drupal's Node Access system to determine what content is available on each site in the network. Unlike other multi-domain modules for Drupal, the Domain Access module determines user access based on the active subdomain that the user is viewing, rather than which group or site the user belongs to.

Additionally, when a user creates content, that content will automatically be assigned to the currently active subdomain unless the user has specific privileges to be able to assign domain access. Under advanced setups, the ability to edit content for a specific subdomain can be segregated from the typical Drupal privilege to 'administer nodes.'

Domain Access can integrate with other Node Access modules through the multiple node access patch. The patch is provided in the download and has been tested to work with Organic Groups and Taxonomy Access Control.

Note: This module uses some advanced Drupal concepts and requires that you understand DNS configuration.

For more information about Node Access in Drupal, see http://api.drupal.org/api/group/node_access/6

Domain Access is PostgreSQL compliant, though Domain Prefix does not work fully on pgSQL in Drupal 5.

Если вам нужен модуль, чтобы предоставить поддомены для пользователей и групп и вам не нужно присоединять (affiliate) контент - обратите внимание на Subdomain.

Extension modules

The Domain Access module works by itself and needs no additional modules. Included in the download are these helper modules that extend the features of Domain Access.

Included in the Domain package

  • Domain Configuration -- Allows you to change select system variables for each subdomain, such as offline status, footer message and default home page.
  • Domain Content -- Provides a content administration page for each subdomain, so that affiliate editors can administer content for their section of the site.
  • Domain Navigation -- Supplies a navigation block with three themes. Creates menu items for each subdomain, suitable for using as primary or secondary links.
  • Domain Prefix -- Provides a user interface for enabling select database table prefixing for use with subdomains. Not fully functional on pgSQL
  • Domain Source -- Allows editors to set a primary source domain when links are written to content from other domains.
  • Domain Strict -- Forces users to be members of domains in order to view content. This is a sample extension module that uses the API.
  • Domain Theme -- Allows separate themes for each subdomain.
  • Domain User -- Allows for the automatic creation of subdomains for registered users.
  • Domain Views by mrichar1 -- Provides Views integration through a filter and default argument.

Contributed Modules

  • Domain Menu by canen. Allows each subdomain to use separate primary and secondary links.

Зависит от:

Настройка

New release: 5.x.1.4 cleans up some existing bugs. This release requires that you run Drupal's update script.

drush

Описание модуля

Полное название: Drush
Проект начат: November 13, 2006

Описание с сайта

drush - это оболочка командной строки и Unix скриртовый интерфейс для Друпал, настоящий швейцарский армейский нож предназначенный для того, чтобы облегчить жизнь для тех из нас, кто тратит большую часть своего рабочего времени хакерствуя в командной строке.

The drush.module for Drupal 5 itself now only provides an API that allows other modules expose command line functionality in an easy way.

Also included are several modules that make use of the drush API:

drush_pm.module: The drush Package Manager: This module allows you to install modules from the command line in a very simple way (apt-get style) - just type e.g. drush pm install views in a Drupal directory to install the Views project!
Additionally, the Drush Packet Manager also allows you to update all your modules with just one command - drush pm update.

drush_tools.module: The drush Toolbox: several useful utilities for site administrators and developers (e.g. drush cron or drush cache clear)
The drush_sql module helps you issue queries to any of your databases (i.e. is multi-site aware) and even helps you migrate databases between your environments.
The drush_simpletest module is a fast and easy way to run simpletest tests from the command line.

Be sure to read the accompanying README.txt for installation and usage instructions.

More contributions both in the form of new commands for the drush_tools.module and new modules that make use of the drush API are greatly welcome!

Windows support is experimental.

"drush" - это сокращение от Drupal Shell.

Зависит от:

Update Status (5.x-2.0 или выше).

Настройка

Установка

------------

For Linux/Unix/Mac:

1. Untar the tarball into your module directory (sites/all/modules)
2. Enable drush.module and any submodules you want to use. You must enable the CVS or wget modules
if you want to install modules (you do).
3. (optional, but recommended:) To ease the use of drush,
- create a link to drush.php in a directory that is in your $PATH, e.g.:
$ ln /path/to/drush.php /usr/bin/drush
OR
- create an alias to drush.php:
$ alias drush='php modules/drush/drush.php'
(this goes into .profile or .bash_aliases in your home folder)

4. Start using drush by running "drush" from your Drupal root directory.

(or, if you did not follow step 3, by running "./sites/all/modules/drush.php"
or navigating to sites/all/modules/drush and running "./drush.php" )

If you have troubles, try using the -l and -r flags when invoking drush.php. See below.

For Windows (experimental!):

- Follow steps 1 and 2. Use drush by navigating to sites/all/modules/drush
and running 'drush.bat'.
- Whenever the documentation or the help text refers to
'drush [option] ' or something similar, 'drush' has to be replaced
by 'drush.bat'.
- If drush.bat is not working for you, either add the directory in which your
php.exe resides to your PATH or edit drush.bat to point to your php.exe.

USAGE

-----
Once installed and setup (see above), you can use drush as follows while in
any Drupal directory:

  $ drush [options] <command> <command> ...

Use the 'help' command to get a list of available options and commands:

  $ drush help

Please note that drush requires a working drupal setup in order to function
correctly. So for multisite installations, you might need to use the -l or other command line
options just to get the help command to work:

Related Options:

  • -r
    , --root=
    Drupal root directory to use (default: current directory)
  • -l , --uri= URI of the drupal site to use (only needed in multisite environments)
  • -v, --verbose Display all available output

If you get tired of typing options all the time, you can add them to your drush.php alias or create a drushrc.php file. These provide additional options for your drush call. They provide great flexibility for a multi-site installation, for example. See example.drushrc.php.

Требования

Эта версия drush разработата для Drupal 6.x, которые выполняется на платформе Unix/Linux.

  • Для того, чтобы использовать drush из командной строки, вам нужен бинарник PHP совместимый с CLI-режимом. Минимально требовуемая версия PHP: 4.3.0 (PHP 5.x тоже подойдёт).
  • drush может также работаь и в Windows, however, drush modules might make use of unix command line tools, so to use it effectively, you have to install some of them, e.g. from GnuWin32 (http://gnuwin32.sourceforge.net/). The READMEs of the individual modules should state which binaries are required.

Ограничения

Из-за того, что модуль использует tokenizer PHP, drush может не работать правильно, если
PHP-код ядра Друпал зашифрован (encrypted) (дополнительная информация в API.txt).

Использованные материалы

Полезные ссылки

F

Модули на букву F

fasttoggle

Описание модуля

Полное название: Fasttoggle
Проект начат: September 16, 2006

Описание с сайта

Ускоряет выполнение самых распространённых задач по администрированию таких как:
снятие с публикации, продвижение документа на главную страницу, блокирование польователей через использование AJAX callbacks. Это экономит множество перезагрузок страницы. Если JavaScript запрещён, то все будет работать в обычном режиме - с перезагрузкой страницы.

filter_default

Описание модуля

Полное название: Filter Default
Проект начат: December 23, 2006

Описание с сайта

Модуль позволяет назначить формат ввода по умолчанию для новых документов и комментариев каждой роли на сайте. Он добавляет вкладку "По умолчанию" на странице (Administer > Site configuration > Input formats), где вы можете управлять настройками.

Whenever a new node or comment is being created, each text input box with multiple allowed input formats is initially configured based on the settings for the user's roles. The user's lowest-weighted role (as defined on the settings page) that the user posseses is used. For a user that does not have any role indicated in the table, the default input format will be the one selected on the Input formats > List page.

This module has no effect on which input formats any user is allowed to use. It merely sets initially selected input format when there are multiple choices

Настройка

Drupal 6

Для работы в Друпал 6 нужно применить патч: http://drupal.org/node/222664

Я применял к filter_default-5.x-1.x-dev...
В патче поменять первый 2 строки, чтобы они выглядели так:

--- filter_default.module 2007-09-12 15:58:16.000000000 -0500
+++ filter_default.module 2008-04-25 17:18:29.000000000 -0500

Это нужно сделать потому, что ваши пути не будут совпадать с путями, которые использовал автор патча. Скопировать файл заплаты в папку модуля и в этой папке выполнить:
patch -p0 < ./filter_default_d6.patch

В .info-файле нужно добавить строку

core = "6.x"

Мне в 6.2 пропатченный модуль так и не удалось заставить работать....

fivestar

Описание модуля

Полное название: Fivestar
Проект начат: December 13, 2006

Описание с сайта

The Five Star voting module adds a clean, attractive voting widget to nodes in Drupal 5 and 6. Developed by Lullabot and a tentatively officially supported Acquia Carbon project

Преимущества

  • jQuery rollover effects and AJAX no-reload voting
  • Configurable star sets
  • Graceful degradation to an HTML rating form when JavaScript is turned off
  • Support for anonymous voters
  • Spam protection to keep users from filling your DB with bogus votes
  • Easy-to-use integration with Views module for lists sorted by rating, or filtered by min/max ratings
  • A Fivestar CCK field for use in custom node types
  • An easy-to-use Form API element type for use in other modules
  • Compatible with all versions of jQuery (1.0 - 1.2.1)

Зависимости

Voting API - отвечает за сохранение оценок в базе данных и за интеграцию с Views.

Рекомендуется

Views очень рекомендуется, если вы хотите создавать страницы результатов или использовать рейтинг для сортировки документов.

Настройка

Использованные материалы

Полезные ссылки

FiveStar Rating. Ещё одно решение...

I

Модули на букву I

i18n

Описание модуля

Полное название: Internationalization
Проект начат: February 18, 2004

Описание с сайта

Это набор модулей для добавления многоязычности в Drupal-сайты. Обеспечивает возможность размещения перевода содержания сайта - документов и таксономии, перевод интерфейса для анонимных пользователей с помощью модуля Locale и автоматическое определение языка браузера. Предоставляет блок для выбора языка и управляет связями между переводами документов и терминов таксономии.

Обновление для Drupal 6:

  • Большинство модулей были модернизированы для Drupal 6. Тестеры и рецензенты приветствуются.
  • Заметим, что некоторые старые возможности и зависимости были сняты и заменены новыми многоязычными возможностями Drupal 6. Этот модуль не будет претендовать на то, чтобы заменить имеющиеся возможности ядра Drupal, но будет опираться на них и расширять их.
  • Большинство обновлённых скриптов все ещё не тестировались. Поэтому, не рекомендуется обновлять существующие сайты, если только у вас нет копии данных вашего сайта, и Вы действительно хотите помочь в их тестировании.
  • Есть несколько модулей, которые Вы не сможете включить, потому что они ещё не помечены как совместимые с Drupal 6. Причина заключается в том, что они всё ещё не обновлены, некоторые из них ждут пока обновятся другие модули, от которых они зависят. Не пытайтесь редактировать информационный файл (.info), так как это не сработает.

И ещё раз: Не пытайтесь обновлять скрипты на работающих сайтах.

Настройка

  • Скачать и установить пакет
  • Включить следующие модули: locale, internationalization, и translation
  • Произвести настройку Ваших основных модулей
  • Определить языки

Блок переключения языка

  • Translations - не перелючает языки
  • Language switcher - реально переключает языки

Включение мультиязычного контента

  • Включите блок language
  • Включите поддержку мультиязычности для нужных типов контента
  • Теперь Вы должны включить те типы содержимого, которые вы хотите видеть мультиязычными. Это можно сделать на странице Administer>Content>Content types для каждого типа содержимого. Новая опция включения/выключения мультиязычной поддержки появится в конце страницы.

Новое!
Здесь вы увидите новую опцию "Расширенное управление языками". Это позволит Вам выбрать, все ли установленные языки - или только активные - будут использоваться для выбранного типа содержимого. Если включена эта опция, становится возможным иметь сайт на нескольких языках, которые были однажды включены, показывать их в блоке языков и использовать для локализации, чем вручную забивать разрешённые для данного типа контента значения.

Использованные материалы

Полезные ссылки

image

Описание модуля

Полное название: Image
Проект начат: September 28, 2003

Описание с сайта

This module allows users with proper permissions to upload images into Drupal. Thumbnails and additional sizes are created automatically.

Images could be posted individually to the front page, included in stories or grouped in galleries.

    Image module (as of the 5.x version) ships with several contributed add-ons:
  • image_gallery.module: using taxonomy terms, organize and display your uploaded pictures in galleries
  • image_attach.module: allows you to easily attach image nodes to other node types.
  • image_im_advanced.module: adds advanced ImageMagick options such as image sharpening to the ImageMagick image toolkit.
  • image_import.module: simplify adding multiple images by importing images from a directory on the server.

Настройка

Полезные ссылки

Модули Друпала: Image

N

Все модули на букву N

node_images

Описание модуля

Полное название: Node Images
Проект начат: November 19, 2006

Описание с сайта

Добавляет вкладку "Изображения" на страницу документа, что позволяет пользователям добавлять изображения к документам, используя модуль upload. Первые 2 изображения показываются как миниатюры при просмотре документа под текстом документа или в месте указанном в файле шаблона node.tpl.php. Все изображения доступны на странице галереии в стиле Polaroid.

Обратите внимание: Изображения не сохраняются как документы. При удалении документа, все изображения, которые связаны с документом, также удаляются.

Зависит от:

upload.module (входит в ядро Друпал)

Настройка

Usage

Right after you add a node, click the Images tab to upload images for that node. You can set a description and a weight for each image.
In the admin content types page you can enable or disable node images for each content type. The module has its own administration page, to configure the upload directory, the thumbnail resolution, the allowed extensions and the maximum number of images for each node.

Drupal 6

Update for 6.0 - porting in progress

Использованные материалы

Полезные ссылки

nodelist

Описание модуля

Полное название: Node list
Проект начат: April 28, 2005

Описание с сайта

his module provides a page listing nodes by title, grouping them alphabetically, and caching the page for increased performance. In addition, this module will list nodes by title per vocabulary and per taxonomy term.

The list is accessible at http://www.example.com/node/list.

In addition, this module will list nodes by title per vocabulary and per taxonomy term. These lists are available at http://www.example.com/taxonomy/term/1/list and http://www.example.com/vocabulary/1/list, where the number 1 is replaced with the term ID or vocabulary ID.

To display the list horizontally instead of vertically, try CSS as described here.

Настройка

Вывод списка букв по горизонтали

Horizontal rule intead of vertical:

.node-list-index li {
   display: inline;
}
.node-list-index {
   text-align: left; float: center;
   line-height: 100%; margin: 10px 1px;
   padding: 5px;
   border: dotted 1px #bcc;
}
.node-list {
   text-align: left; float: center;
   line-height: 100%; margin: 10px 1px;
   padding: 5px;
   background:#f7f7f7;
}

Использованные материалы

Полезные ссылки

Node list: список документов в алфавитном порядке

P

Все модули на букву P

pathauto

Описание модуля

Полное название: Pathauto
Проект начат: February 15, 2005

Описание с сайта

The Pathauto module automatically generates path aliases for various kinds of content (nodes, categories, users) without requiring the user to manually specify the path alias. This allows you to get aliases like /category/my-node-title.html instead of /node/123. The aliases are based upon a "pattern" system which the administrator can control.

Настройка

Исключение русских предлогов

Для исключения русских предлогов нужно на странице настройки (admin/settings/pathauto) указать в разделе "Основные настройки":

i,ne,no,da,net,ni,a,v,za,k,pod,nad,na,iz,ot

Транслитерация русских символов в пути

Для транслитерации (запись латинскими буквами) русских заголовков нужно в папке модуля переимновать файл i18n-ascii-example.txt в i18n-ascii.txt.
Использование русских букв запрещено стандартом, хотя Википедия использует этот метод...

poormanscron

Описание модуля

Полное название: Poormanscron
Проект начат: September 28, 2003

Описание с сайта

Модуль, который выполняет задания хронометра (cron) в Друпал, без использования системного cron.

При каждом просмотре страницы, модуль проверяет был ли последний запуск хронометра (cron) сделан больше чем 1 час назад (промежуток времени можно настроить).
Если час уже прошёл, выполняются хуки (hooks) хронометра (cron) и Друпал счастлив!
Эти хуки хронометра вызываются после того, как весь HTML уже отдан браузеру, поэтому пользователь, который стартанул задания по хронометру не должен заметить задержки.

Мнение PVasili

На некоторых хостингах использование cron для пользователей может быть запрещёно, в этом случае поможет модуль poormanscron. Идея модуля в том, что задания для планировщика исполняются при обращении посетителей к сайту. После выдачи страницы модуль проверят, не пришло ли время исполнять регулярные служебные задания и производит ту работу, которую в обычной ситуации исполняет cron.php.

Неудобство данного подхода в том, что в случае длительного необращения к сайту служебные задания не исполняются. С другой стороны, если сайт малопосещаем, то это не критично. Если же посещаем, то задания будут отрабатываться не менее регулярно, чем при работе системного планировщика.

В общем случае при доступности системного планировщика следует использовать именно его, а данный модуль соответствует своему названию "крон для бедных" - для тех кому он недоступен :)

Настройка

Можно настроить частоту запуска и время, через которое будут проводиться повторные попытки при неудаче.

Использованные материалы

Poormanscron: настройка запуска cron

Полезные ссылки

S

Все модули на букву S

schema

Описание модуля

Полное название: Schema
Проект начат: April 16, 2007

Описание с сайта

Introduced in Drupal 6, the Schema API allows modules to declare their database tables in a structured array (similar to the Form API) and provides API functions for creating, dropping, and changing tables, columns, keys, and indexes.

The Schema module provides additional Schema-related functionality not provided by the core Schema API that is useful for module developers. Currently, this includes:

  • Schema documentation: hyperlinked display of the schema's embedded documentation explaining what each table and field is for.
  • Schema structure generation: the module examines the live database and creates Schema API data structures for all tables that match the live database.
  • Schema comparison: the module compares the live database structure with the schema structure declared by all enabled modules, reporting on any missing or incorrect tables.

Пользователи MySQL обратите внимание:
Модуль требует MySQL 5. Более ранние версии MySQL не поддерживают базу данных INFORMATION_SCHEMA database, которую модуль использует для анализа базы данных.

Настройка

Скриншот модуля с сайта автора:

service_links

Описание модуля

Полное название: Service Links
Проект начат: December 11, 2005

Описание с сайта

Пример кнопок, которые предоставляет модуль (добавлены русские сервисы закладок, которых нет в модуле по умолчанию):
Кнопки модуля Service Links

Можно добавить ссылки на следующие сервисы:

  • del.icio.us
  • Digg
  • Furl
  • Google
  • IceRocket
  • ma.gnolia.com
  • Newsvine
  • Reddit
  • Technorati
  • Yahoo

Можно настроить:

  • Показ ссылок как текстовые ссылки и/или графические кнопки.
  • Для документов и/или словаря/термина какого типа будут показываться ссылки.
  • Нужно ли показывать ссылки для анонсов и/или полного текста.
  • Нужно ли ссылки добавлять в тело статьи, в блок ссылок или блок.
  • Нужно ли для документов созданных aggregator2 показывать ссылку на оригинал.
  • Какой роли можно видеть/использовать ссылки сервисов.

Настройка

Вывод ссылок в произвольном месте

Если не устраивает показ ссылок на соц. сервисы в блоке ссылок документа или под текстом документа - можно указать в шаблоне документа (node.tpl.php) место, где нужно вывести ссылки. Для этого используется код:
<?php print $service_links ?>

Для работы этого метода нужно, чтобы в файле template.php в папке текущей темы был код, который приведён в файле template.php из папки модуля. Если файла нет, то можно просто скопировать его из папки модуля.

Добавление русских сервисов закладок

В файле Readme.txt модуля объясняется как это сделать.
Вы можете просто скачать версию модулю, в которой уже добавлены русские сервисы.

sitedoc

Проект начат: May 20, 2007
Описание с сайта:

Настройка

  • Откройте: Admin → Site configuration → Site documentation (/admin/settings/sitedoc).
  • Настройте параметры, которые вы хотите использовать.
  • Перейдите: Admin → Site building → Site documentation (/admin/build/sitedoc), чтобы получить информацию в соответствии с настройками.

Внимание

Этот модуль использует ОЧЕНЬ МНОГО ресурсов - попробуйте его сначала на тестовом сайте.

This module can produce a LOT of output, especially if you use all the settings. You might be better off running it in smaller increments at first until you've located all the surprises that you will very likely find. For example, try the "basic" and "blocks" sections at first. Then move on to the taxonomy sections. Then try all of the node sections.

storm

Описание модуля

Полное название: STORM
Проект начат: May 1, 2008

Описание с сайта

STORM (SpeedTech Organization and Resource Manager) is a project management application for Drupal.

It provides the following features :

  • Attributes : to manage the different list of values used in STORM, like : tasks status, countries, currencies and so on
  • Organizations : the companies or individual stakeholders of your projects
  • Projects : your projects. Every project can have multiple tasks hierarchically nested to build a WBS
  • Tasks : the parts that compose a project
  • Tickets : every ticket can be associated with an organization, project and task
  • Timetrackings : where you can register your activities on an organization, project, task or ticket
  • Permission control : a fine grained permission control permits to share the data with other users and organizations

Снимки экрана
Демонстрация (нужно запросить логин и пароль у автора модуля)

Настройка

Использованные материалы

Полезные ссылки

subdomain

Описание модуля

Полное название: Subdomain
Проект начат: March 21, 2008

Описание с сайта

The subdomain module joins forces with pathauto to automatically place Drupal site content onto subdomains.

Currently, it supports placing each Organic Group and content *OR* node author and content on its own subdomain.

ORGANIC GROUP MODE (using "Frisbee Team" and "Pizza Lovers" as examples):
http://pizza-lovers.example.com
http://frisbee-team.example.com

You can also specify a custom subdomain to generate things like:

NODE AUTHOR (using "Mary" "Kate" and "Jeff" as examples):

or with a custom subdomain rewrite, you can also generate subdomains like:

RELATED MODULES:

Domain Access: If you wish to share content across multiple domains, you might want to try the Domain Access module. Domain Access provides advanced tools for running a group of affiliated sites from one Drupal installation and a single shared database.

Зависит от:

  • Pathauto

Настройка

INSTALLATION:
Please see the Readme.txt file for detailed instructions on how to install this module.

NOTE: subdomain requires changes to your web server configuration as well as a small patch to Drupal Core. It's critical that you understand the implications of those changes and how to reverse them should you need to uninstall subdomain or upgrade to a future version of Drupal Core. See readme.txt.

Использованные материалы

Полезные ссылки

subscriptions

Полное название:
Проект начат: November 19, 2003
Описание с сайта:

This module enables users to subscribe to be notified of changes to nodes or taxonomies, such as new comments in specific forums, or additions to some category of blog. Once enabled, all nodes will have an additional link that allows the user to change their subscriptions. Users have tab on their user screen to manage their own subscriptions. Users can also set an auto subscribe function which notifies the user if anyone comments on posts they have made. Admins can set this on by default.

api

Описание модуля

Полное название: API
Проект начат: February 23, 2004

Описание с сайта

Это реализация подмножества спецификации генератора документации Doxygen,
настроенный для создания вывода, который больше всего подходит базе кода Друпал.

Этот модуль был разработан для создания документации для Друпал-разработчиков, которая доступна на api.drupal.org.

globalredirect

Описание модуля

Полное название: Global Redirect
Проект начат: October 7, 2006

Описание с сайта

Что?

GlobalRedirect - простой модуль, который…

  • Проверяе текущий URL на наличие синонимов и делает 301-й редирект на синоним, если он не был использован.
  • Проверяет текущий URL на завершающий слеш, удаляет его, если он есть и повторяет проверку 1 с новым запросом.
  • Проверяет, текущий URL на совпадение с site_frontpage и делает переадресацию
    на главную страницу в случае совпадения.
  • Checks if the Clean URLs feature is enabled and then checks the current URL is being accessed using the clean method rather than the 'unclean' method. (Currently only in DEV, will be in 1.3 soon)

Зачем?

Once enabled, an alias provides a nice clean URL for a path on a site. However Drupal does not remove the old path (eg node/1234). The problem is that you now have two URLs representing the same content. This is dangerous territory for duplicate pages which can get you sandboxed by the search engines!

How?

This module uses hook_init to interrupt the page load and the a alias lookups. If any of the above rules apply then the appropriate action is taken. If no rules apply then the page load continues uninterrupted. An example of this in use is on the site it was developed for. http://www.sportbusiness.com/node/160559 will redirect to http://www.sportbusiness.com/news/160559/lagardere-sets-up-sports-division due to the alias setup on this site.

Всё, что мне нужно знать

As with most modules - there are often a few things you should be aware of before going ahead.
Version 1.2 has been released. This includes some code improvements and better compliance with coding standards.

Known Bugs:
Broken under 4.7.4, but works under later 4.7 releases. The issue is explained on node 89600, comment 13 and is caused by path.inc not returning aliases correctly. Thanks to RayZ for finding the problem
Issues with Windows IIS Server. There is a known issue with Clean URL's in IIS and there is also a known issue with certain versions of PHP running on IIS where a Permanent Redirect (301) is incorrectly sent as Object Moved (302).

Зависит от:

Настройка

Использованные материалы

Полезные ссылки

javascript_aggregator

Описание модуля

Полное название: Javascript Aggregator
Проект начат: January 17, 2008

Описание с сайта

Модуль добавляет простое объединение .js-файлов в Drupal 5.x.

Если нужно исключить какой-то файл из объединения, то это можно сделать на странице "Производительность" (/admin/settings/performance).

Как модуль это делает:

  • берёт переменную $scripts и удаляет js-файлы с помощью регулярного выражения
  • генерирует уникальное имя файла для каждой комбинации js-файлов (на разных страницах могут загружаться разные комбинации файлов)
  • создаёт и кеширует один файл, который содержит все js-файлы комбинации в папке /files/js
  • возвращает изменнённую переменную $srcipts со ссылкой на файл из кеша

Пример:

<style type="text/css" media="all">@import "/demo/files/css/1251b3e71cd3a062ead6fb3fe4968f7d.css";</style>
   
<script type="text/javascript" src="/demo/files/js/05cdf910e1b9600339ce4107b542a5de.js"></script>

Настройка

Чтобы собрать js-файлы в один

  • установите модуль
  • откройте в браузере страницу "Производительность" (/admin/settings/performance)
  • и включите кеширование js-файлов (там же вы можно очистить кеш js-файлов)
  • в вашем файле page.tpl.php перед:
    <?php print $scripts; ?>

    разместите следующий код:
    <?php
     
    if(module_exists('javascript_aggregator')) {
       
    $scripts = javascript_aggregator_cache($scripts);
      }
    ?>

Если на сайте используется несколько тем оформления, то этот код нужно вставить в во всех темах.

Это не очень хорошая практика помещать код в файлах шаблонов дизайна - tpl.php. Если вы хорошо разбираетесь в друпал, то можете использовать этот способ для вызова функции: http://drupal.org/node/218870#comment-721082

Страница настройки модуля Javascript Aggregator

В Друпал 6 этот модуль входит в ядро.

ljxp

Описание модуля

Полное название: LiveJournal CrossPoster
Проект начат: October 19, 2006

Описание с сайта

This module allows you or your users to automatically crosspost entries to a LiveJournal account. It is based upon the excellent work of Evan Broder who wrote a WordPress plugin of the same name.

Настройка

После установки модуля в меню администратора появляется страница настройки модуля (/admin/settings/ljxp).

Настройки администратора

В настройках перечислены все типы материалов сайта, для каждого из которых можно выбрать одну из трех возможностей:

  • Cannot crosspost to LJ - Нельзя постить в ЖЖ.
  • Crosspost to LJ by default - Можно постить в ЖЖ по умолчанию.
  • Can crosspost to LJ, but not by default - Можно постить в ЖЖ, но не по умолчанию.

Последние две возможности и позволяют автоматически создать копию материала на www.livejournal.com. Отличие их состоит в том включен ли будет постинг в ЖЖ для материала по умолчанию или нет. Но в любом случае, именно пользователь может включить или выключить эту возможность для вновь создаваемого или редактируемого материала.

Итак, выбрав тип материала, который постим идем настраивать права пользователей. На странице управления доступом admin/user/access находим блок модуля ljxp и выставляем права can crosspost to livejournal для тех пользовательских ролей, которым мы хотим предоставить эту возможность. Естественно у этой роли должны быть и права на создание и/или редактирование того типа материала, который мы указали для постинга в ЖЖ.

Если ваш сайт однопользовательский и вы всегда под USER #1, то этот шаг можно пропустить.

Настройки пользователей

Дальнейшие настройки уже проводят сами пользователи в своем профиле и они уникальны для каждого из них.

Заходим в свой профиль и жмем «Изменить». Все настройки находятся в блоке LiveJournal cross-posting.

Ставим галочку в чекбоксе «Use Livejournal crossposting»

Host: по умолчанию тут стоит http://www.livejournal.com, но не ЖЖ единым жив этот мир, можно поставить любой другой сайт, который ЖЖ-совместим (LiveJournal-compliant site)

User: имя вашего ЖЖ-эккаунта.

Password: пароль учетной записи ЖЖ. Пароль сохраняется в базе в хэшированном виде.

Community: список сообществ ЖЖ, в которые попадет этот пост.

Your site name: Название вашего сайта для употребления в заголовке поста в ЖЖ. Если оставить пустым будет использовано имя сайта, на котором мы все это настраиваем.

Tag posts with categories: Связаные с материалом термины таксономии будут переданы в ЖЖ в качестве тэгов. Правда, честно предупреждается о возможных проблемах для нероманских языков, но тут разработчики просто перезакладываются - с русским языком все в порядке.

Livejournal posts will be: выбираем как публиковать посты, для всех (Public) или только для друзей (Friends only)

Comments: выбираем где быть комментариям. В ЖЖ (Allow comments on LiveJournal) или на нашем сайте (Require users to comment here). Во втором случае комменты в ЖЖ будут отключены, а в заголовке поста будет ссылка на указанную страницу вашего сайта с формой коменнтариев.

How to handle teasers: три варианта того, что из материала постить в ЖЖ. Только тизер (Post only the teaser), тизер и ссылка на весь материал под катом (Post the teaser with the rest behind a cut) или весь материал целиком (Post the entire post).

Cut Text: собственно, текст ката передаваемый в ЖЖ, на котором и будет стоять гиперссылка на весь материал.

Custom header: Пользовательский заголовок поста. В нем можно употреблять три заглушки: %blog_name - имя блога, %permalink - ссылка на материал, %comments_link - ссылка на комментарии. Если поле оставить пустым, то модуль будет сам генерировать нужное.

Если вы ввели все необходимое, сохраните страницу и вперед на создание нового материала.

Создание и редактирование материалов

Теперь в форме редактирования или создания нового материала (того типа для которого это настроено) около формы сообщения в системный журнал появляется чекбокс «Crosspost to LiveJournal» (Отправить в ЖЖ). Ставим галочку и при отправке материала на сайт модуль ljxp автоматически продублирует его в вашем блоге Живого Журнала. Можно также и опубликовать уже имеющиеся материалы вашего сайта просто поставив галочку и пересохранив его. При сохранении отображаются также все сделанные изменения.

Кроме того в ЖЖ отправляется именно HTML-код, который прошел обработку всеми фильтрами. Это может быть удобным для использования в ЖЖ некоторых возможностей Drupal-модулей, например, подсветки синтаксиса через фильтр GeSHi. В визуальном редакторе ЖЖ, пока таких возможностей не обнаружил. (Неужели плохо искал? :) ). Засада поджидает нас только с относительными ссылками. Их для трансляции в ЖЖ придется писать в абсолютном виде - http://и так далее.

Снятие галочки «Crosspost to LiveJournal» у редактируемого материала, удаляет его из ЖЖ. То же самое происходит если вы измените статус публикации материала на «Неопубликовано», пост в ЖЖ будет удален.

Русификация модуля ljxp (LiveJournal CrossPoster)

С русификацией у модуля негусто. В скачанном с www.drupaler.ru .po-файле переведено строк 12 из 100 необходимых. Но, поскольку вольный перевод основных терминов я уже дал в этой заметке, можете забить его сами через страницу поиска строк для переводов (admin/settings/locale/string/search).

Там же надо будет отыскать две строки «Please leave any !comments there.» и «Originally published at !link.». Эти строчки добавляются в заголовок поста, если не настроен пользовательский. Я их перевел так: «Ваши !comments.» и «Трансляция. Оригинал: !link.».

Или введите в профиле в поле Custom header пользовательский заголовок на русском, например такой:

<strong>Из блога <a href="http://shaman.asiadata.ru/">%blog_name</a>.</strong>
<em><a href="%permalink">Оригинал сообщения находится здесь</a>.</em>

<a href="%comments_link">Ваши комментарии</a>.

Использованные материалы

Трансляция друпал-блога на direqtor.livejournal.com через модуль ljxp (LiveJournal CrossPoster)

toggle_www

Автор: Gurpartap Singh
Проект начат: April 18, 2008
Описание с сайта:

An easy, PHP header redirect based way to redirect incoming links from http://www.example.com/some/deep/page to http://example.com/some/deep/page or vice-versa.

Intended for use on servers without Apache servers, hosts where .htaccess is not allowed, etc. Apache directives based redirects are faster than PHP based methods. It is a known caveat that it does not redirect to the correct url when access is denied to a page; because drupal prompts for the access before the module is even loaded.

(Revival of an old project; now for Drupal 6.x)

webmoney

Описание модуля

Полное название: webmoney - Webmoney payment gateway
Проект начат: May 14, 2008

Модуль создал gor (участник сообщества drupal.ru) и вы можете спонсировать этот проект: http://mydonations.ru/cart/add/4?destination=cart/checkout

Описание с сайта

This module provides Webmoney payment gateway through merchant.webmoney.ru website, when using Drupal e-Commerce.
It was developed and tested for 5.4 Drupal e-Commerce.

Important! PHP have to support PEAR with extensions:
XML-Util
XML-Serializer
XML-Parser

Зависит от:

e-Commerce

Настройка

Модуль для ecommerce-5.4 и drupal - 5.7.

Полезные ссылки

Webmoney Drupal module - анонс и обсуждение модуля на друпал.ру.