Content display

Опубликовано VladSavitsky

Модуль позволяет конвертировать видео-файлы, которые загружаются на сайт, если на сервере установлена библиотека ffmpeg. Также модуль выводит плейер и обеспечивает всю работу с видео.

Установка модуля: 

В файле .htaccess включить следующие параметры:

<IfModule mod_php5.c>
  php_value post_max_size                       100M
  php_value upload_max_filesize                 100M
  php_value max_execution_time                  1000
  php_value max_input_time                      1000
</IfModule>

Настройка модуля: 

Модуль получает файлы с помощью одного из этих модулей:

  • ССК FileField
  • Upload

В режиме Upload
Нужно загрузить FLV-файл и миниатюру. Они будут храниться в $node->files.
К миниатюре НЕ БУДУТ применяться правила модуля ImageCache при показе. То есть миниатюра должна быть полностью готова и нужного размера.
Модуль FlashVideo подхватывает видео, но не конвертирует его.
Видео в полях ССК в этом режиме игнорируется.

В режиме ССК
Файлы пропукаются через ffmpeg и, если конвертация не удалась, то видео (даже в FLV) не показывается.
Для работы создаётся 2 поля (для загруженного видео и для финального - после конвертации).
И 1 поле для загрузки миниатюры. Для этого поля работает ImageCache!

      $thumbnail_file = flashvideo_get_thumbnail($node, array(), TRUE);

      if (!$thumbnail_file) {
        if ($node->field_image[0]['filepath']) {
          //Загруженная картинка:
          $thumbnail_file = imagecache_create_url('video_thumb_front', $node->field_image[0]['filepath']);
        } else {
          $thumbnail_file = $base_url . base_path() . path_to_theme() .'/images/no_thumbnail.jpg';
        }
      }

Автоматизация вставки видео и превью

В шаблоне ноды нужного типа заменить

    <div class="content"><?php print $content ?></div>

на
    <?php if ($teaser): ?>
      <?php print flashvideo_get_thumbnail($node);?>
    <?php else : ?>
      <?php print flashvideo_get_video($node);?>
    <?php endif; ?>
    <div class="content"><?php print $content ?></div>

Также нужно отключить использование тега [video] в тексте ноды.

Отображение thumbnail

if (flashvideo_get_thumbnail($node, array(), TRUE)) {
  $thumbnail = flashvideo_get_thumbnail($node);
} else {
  $thumbnail = theme('imagecache', 'video_thumb_front', $node->field_image[0]['filepath']);
}

'video_thumb_front' - название правила ImageCache
'field_image' - название поля ССК, в котором хранится картинка. Если просто загружается картинка вместе с видео, то нужно использовать другой код.

Прямая загрузка FLV

Если не нужно конвертировать видео на сервере, то нужно настроить модуль так:

  • Включить модуль Upload
  • Открыть страницу настроек FlashVideo (admin/settings/flashvideo)
  • Выключить параметр "Use the CCK FileField module for uploads"
  • Создать поле ССК для загрузки картинки предпросмотра с машинным именем "image"
  • На странице "Показывать поля" настроить вывод или сокрытие полей с предпросмотром и загруженным видео-файлом.
  • После сохранения ноды нужно запустить cron, чтобы видео стало доступным или включите параметр "Convert videos immediately"
Описание с сайта: 

FlashVideo is a complete video solution that expands Drupal's upload capabilities to allow web developers and users to upload video files, automatically convert those videos to the popular Flash format, and then embed their video in any node type using the simple [video] tag. This module allows more than one video to be attached to any node, and then referenced through the use of parameters passed to the tag [video]. It also includes an automatic conversion of video files to the Flash format using FFMPEG technology.

Use this module if you...

  • Would like a complete video solution for any user-generated-content video website.
  • Wish to have the power to embed your video anywhere in the body of a node using a simple [video] tag
  • Wish to link as many videos as you like to a node.
  • Would like a built in automatic Flash conversion.

Features

  • Streaming Video — Version 6.x-1.5 adds the new capability to have your videos streamed to the user via either xmoov-php pseudo-streaming or via RTMP true streaming on a separate server such as a Flash Media Server or Red5 server.
  • CCK FileField Support — Version 6.x-1.5 adds the new capability to have your videos attached to nodes by specifying individual FileField fields that should contain your videos and thumbnails.
  • Amazon S3 Support — FlashVideo Module can be easily configured to integrate video on your site with the incredible Amazon S3 server. This provides large video sites the ability to host their videos on a completely separate server than their own so that the videos will not bog down their server. For more details on how to install and use this plugin, simply open up the README.txt file within the included "drivers" directory.
  • Content Construction Kit (CCK) Integration — This module works very well with the Content Construction Kit, simply because it treats an uploaded video as a file instead of a node. Any CCK node type that you create can then enable the FlashVideo module to work with that node type. Because of this, this module can be treated as a CCK video solution. You can see this in action in the tutorial mentioned below.
  • CCK Override Capabilities — The FlashVideo module includes a plugin called FlashVideo CCK which provides node-specific parameters to create or regenerate the thumbnail or video. This method allows for any node creator or updater to override the parameters specified by the FlashVideo Settings to create custom functionality out of their specific node. For more information regarding how to utilize this plugin, please go to http://www.travistidwell.com/flashvideo_cck.

    Note: To use this plugin, you must enable it individually in the "Modules" section of your Drupal site.
  • Importing Videos — FlashVideo module includes a way for someone to import a large number of videos by just placing them in a directory (using FTP or some other means). Here is how it works. First thing you will need to do is go to the Flashvideo Settings page and decide which node type you would like to create with each imported video. Then, within the files directory, simply create a new directory and name it video_import (or use an alternate name that you define within the FlashVideo Settings page). Then, whatever video files you place within that directory will not only be added to the Drupal files table, but also be added to the FlashVideo cron cycle conversion queue. This makes it VERY simple for a site administrator to add MANY videos to their site without having to upload them all individually to nodes.
  • Playlist Support — You can use the FlashVideo module to create dynamic playlists of your videos. For more information, please go to http://www.travistidwell.com/node/59.
  • FlashVideo API for Developers — This module contains an API to allow module developers to tie into the powers of this module. For more information on what hooks and functions are available, please go to http://www.travistidwell.com/flashvideo_api.

FlashVideo Tutorials

Installing a Media Player (Required Step)

Important Note: — For this module to work, you will need to download a media player to go along with it. Some of the media players that have been tested to work the FlashVideo are as follows:

Due to licensing, a media player is currently not included with the module, so you will need to download either one of these. This is covered in the tutorial mentioned above.

Troubleshooting FlashVideo

Are you having problems getting FlashVideo operational? If so, check out the troubleshooting guide available at: http://www.travistidwell.com/troubleshooting_flashvideo.

Special Thanks To:

Although Travis Tidwell is the primary creator and maintainer of this module, it would not be what it is today without the help and contributions of the incredible Drupal Community. This section is to give special thanks to these contributors.

If we have forgotten anyone who has contributed, then please contact one of the module developers to get your username added to the list.

Читать дальше...
Опубликовано VladSavitsky

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

Модуль позволяет полностью закрыть внешние ссылки на сайте от индексации и сохранить их валидность.

Возможности модуля

  • Два метода контроля индексации:
    • Обернуть ссылки тегом NOINDEX. Тег NOINDEX не является валидным HTML-тегом. Он был создан Yandex и принят Rambler. Google игнорирует этот тег. HTML-валидаторы считают этот тег ошибкой.
    • Добавить атрибут rel="nofollow" в ссылки. Только Google не переходит по ссылкам с этим атрибутом.
  • Два формата тега NOINDEX:
    • Простой. Значение по умолчанию. HTML-валидацию не пройдет.
    • Валидный. Пройдет HTML-валидацию.
  • Есть 2 списка доменов:
    • Всегда разрешённые домены. Ссылки на домены из этого списка будут ОТКРЫТЫ для индексации (index) и переходов (follow) поисковиками всегда, независимо от других настроек модуля.
    • Всегда запрещённые домены. Ссылки на домены из этого списка будут ЗАКРЫТЫ для индексации (noindex) и переходов (nofollow) поисковиками всегда, независимо от других настроек модуля.
  • Ссылки на собственный домен разрешены к индексации и переходам по умолчанию.

Особенности применения

  1. Модуль реализует фильтр ввода, а значит применяется к тексту нод, комментариев и блоков, в которых есть возможность задать формат ввода. Блоки, созданные модулями, не обрабатываются, также как и ссылки в шаблоне темы - закрыть их вам придется вручную.
  2. Так как это фильтр ввода, то его нужно включить для каждого формата ввода, который используется на сайте.
  3. Поля CCK (Links) не обрабатываются также. Решение: в файле node.tpl.php темы получить объект $node и вручную вывести эти поля, закрыв их от индексации.
Читать дальше...
Опубликовано VladSavitsky

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

Модуль Better formats добавляет гибкость в систему фильтрв ввода ядра Drupal.

Возможности

  • Формат ввода по умолчанию в зависимости от роли.
  • Формат ввода по умолчанию в зависимости от типа материала.
  • Управление допустимыми форматами ввода в зависимости от типа материала.
  • Можно скрыть пояснения к формату ввода.
  • Можно скрыть форму выбора формата, установив какой-то по умолчанию.
  • Можно автоматически раскрывать форму выбора формата.
  • Отлючить сворачинвание\разворачивание формы выбора формата.
  • Задать ей свой заголовок.
  • Задавать формат по умолчанию для нод и комментариев раздельно.
  • Работает с текстовыми полями CCK.

Зачем другие модули форматов?

Этот модуль создан, чтобы заменить и расширить следующие модули:

  • Filter Default
  • Default Filter
  • Filter by Node Type

Эти модули плохо работают вместе и все имеют глюки, которые, надеемся, решит Better Formats.

D7 and beyond

Несколько хороших возможностей фильтров/форматов встроены в D7, поэтому этот модуль и его возможности будут неопределены пока код D7 не будет заморожен. Этот модуль был написан как решение для D6.

WYSIWYG

Если вы используете визуальный редактор (TinyMCE и подобный), то вам нужно взглянуть на модуль Wysiwyg API. This module's features compliment it well.

Опубликовано VladSavitsky

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

Taxonomy Quick Find: вывод списка статей с такими же терминами

Модуль предоставляет набор блоков, которые показывают "схожий" контент, основываясь на выбранных терминах. Блок берет термин по умолчанию и предоставляет выпадающий список, который работает на JQuery, который показызыает старый контент, AJAX the site for other nodes and finally slide down a new list of nodes.

These blocks are completely configurable can dynamically show other recent content from each category for the current node.

Features:

  • Funky AJAX basic reloading when switching between terms
  • Filtering the terms provided - You might only want to allow users to browse for other content by specific vocabularies
  • Configure each block to only show individual node types (eg, one block for page and a completely separate block for blogs)
  • Each node type on each block can also have its own limit (eg, you might want block A to have a limit of 3 pages, but block B might want 10 pages. This is useful if you want to configure one block for a sidebar and another block for a panel)
Читать дальше...
Опубликовано VladSavitsky

Настройка
По умолчанию Drupal 6 использует в качестве навигационной линейки Меню навигации. Этот модуль позволяет вам использовать в качестве навигационной линейки путь до текущей страницы.

Также он позволяет добавлять заголовок страницы в навигационную линейку (как в виде ссылки, так и в виде обычного текста) и скрывать навигационную линейку, если она состоит только из ссылки на главную страницу.

  • Использовать путь до текущей страницы в качестве навигационной линейки.
    Описание с сайта: 

    По умолчанию, Drupal 6 использует меню Navigation для цепочки навигации. Модуль позволяет вам использовать меню, к которому принадлежит текущая страница, чтобы построить цепочку навигации.

    Как бонус, вы также можете:

    • Добавить заголовок страницы к цепочке навигации (либо как активную ссылку, либо как текст)
    • Скрыть цепочку навигации, если она содержит только ссылку на главную страницу.
    Читать дальше...
Опубликовано VladSavitsky

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

Allows administrators to set up parameterized breadcrumb trails for any node type. This allows CCK-style node types to have "Home > User Blog > 2005 > January" style breadcrumbs on the node view page itself, syncronizing cleanly with custom views or pathauto aliases.

Читать дальше...
Опубликовано VladSavitsky
Установка модуля: 

Обычная установка.
Есть версии для D5 и D6.

Настройка модуля: 

На странице настройки модуля можно указать типы материалов, которые тоже обрабатываются модулем.
Также можно указать другое название главной страницы (по умолчанию "Главная").

Совместная работа с модулем Menu breadcrumb
В настройках модуля нужно отключить обработку всех типов контента, а только оставить обработку хлебных крошек терминов таксономии.
Для этого нужно выбрать

  • Include + пустое поле
  • Exclude + перечислить все типы материалов через пробел (существующие типы указаны ниже формы)

Заголовок текущей страницы в конце цепочки навигации

Если нужно вывести заголовок текущей страницы в конце цепочки навигации, то лучше использовать не функцию модуля ""Show current term in breadcrumb trail?" (работает только для таксономии), а рецепт Заголовок текущей страницы в цепочке навигации.

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

Модуль Taxonomy Breadcrumb: цепочка навигации по терминам словарей таксономииThe taxonomy_breadcrumb module generates taxonomy based breadcrumbs on node pages and taxonomy/term pages. This module fixes the common complaint of having "Home" be the only breadcrumb on node pages. The breadcrumb trail takes on the form:
[HOME] >> [VOCABULARY] >> TERM >> [TERM] ...

Simply install the module and taxonomy based breadcrumbs will appear on node pages and taxonomy/term pages. For the most common applications this module will work "out of the box" and no further configuration is necessary. If customization is desired settings can be changed on an administration page.

A BETA version supporting 6.x can be found here: http://drupal.org/node/61944/release. This isn't yet for use on production sites. Please try it out and report any issues.
The HOME breadcrumb (if present) links to the homepage. The text displayed for HOME is administrator configurable. If the HOME breadcrumb is not defined by the administrator, it will not appear in the breadcrumb trail.
The VOCABULARY breadcrumb (if present) will link to an administrator defined page. If the VOCABULARY does not have an administrator defined page, it will not appear in the breadcrumb trail.
Each TERM breadcrumb will link to either (1) taxonomy/term/tid by default, or (2) an administrator defined page if one is defined for the term.
These administrator defined "breadcrumb links" for VOCABULARIES and TERMS are controlled from the add/edit vocabulary and add/edit term administrator pages.

Примеры:

  • home >> term >> term
  • mysite >> term >> term
  • home >> vocabulary >> term >> term
  • vocabulary >> term >> term
Читать дальше...

print

26 Май 2008
Опубликовано VladSavitsky

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

Полное название: Printer-friendly Pages
Проект начат: November 2, 2004

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

This module allows you to generate printer friendly versions of any node by navigating to www.example.com/print/nid, where nid is the node id of content to render.

A link is inserted in the each node (configurable in the content type settings), that opens a version of the page with no sidebars, search boxes, navigation pages, etc.

The 6.x version for Drupal 6 includes support for generating a PDF version also via the print_pdf module. Please follow the instructions in the INSTALL.txt carefully. PDF support is not usable out of the box. You must install a third-party tool!

By editing the default print.css (or specifying you own CSS file) or the print.tpl.php files, it is possible to change the look of the output page to suit your taste. For a more fine-grained customization, it is possible to use a print.node-type.tpl.php file located in either the current theme or the module directory.

Читать дальше...
Авторы решений:
Категории модулей:
Версия Drupal:
| Добавить комментарий

boost

26 Мар 2008
Опубликовано VladSavitsky

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

Полное название: 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:

* 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.

Читать дальше...
Авторы решений:
Категории модулей:
Версия Drupal:
|
 
 
 

RSS-лента новостей

Dries Buytaert по-русски
]]>Русский поиск Drupal]]>

Перенос сайта из Joomla в Drupal
Перенос сайта из WordPress в Drupal

]]> Drupal - это бесплатная система управления контентом с открытым исходным кодом ]]>