Верстка сайтов, программирование, разработка сайтов
Записи с метками Drupal
Drupal. Убрать ссылку “Главная” из цепочки навигации
29 June
В template.php добавить:
function phptemplate_breadcrumb($breadcrumb) {
unset($breadcrumb[0]);
array_unshift($breadcrumb, array_shift($breadcrumb) );
return '<div class="breadcrumb">'. implode(' » ', $breadcrumb) .'</div>';
}
Скрыть заголовки нод у определенного типа материала
29 June
В Drupal.
Нужно в файл template.php темы оформления добавить функцию:
function phptemplate_preprocess_page(&$vars) {
$vars['original_title'] = $vars['title'];
if (!empty($vars['node']) && in_array($vars['node']->type, array('page'))) {
$vars['title'] = '';
}
}
В данном случае заголовки не будут отображаться у – Page.
Интеграция Drupal 6 c IPB 2.x
13 December
Или единая регистрация пользователей в обоих системах. В этом деле мне очень помог пост на одном из форумов, где были размещены необходимые модули для Drupal.
Основные возможности:
/*
* @file
* This module provides simultaneous login for Drupal and the Invision Powerboard forum (IPB)
* The module depends on the ipbwi module to provide the IPBWI scripts
* IPBWI functions are used for all IPB actions. It can be found at http://ipbwi.pc-intern.com/
* Current functionality includes:
* – drupal login when active ipb forum session found
* – automatic ipb forum login from Drupal login(if password is identical)
* – logout from ipb if logging out in Drupal (configurable in the settings)
* – automatic creation of a Drupal account if a valid IPB account is active / logged into
* – selection of role to use when a new account is created (configurable in the settings)
* – check for duplicate email in Drupal when creating account
* – check if email addresses are identical between Drupal account and IPB account
* – redirect user to IPB lost password page instead of using the Drupal form
* – Drupal change account settings (email & password) also updates IPB account settings
* – Debug functionality to screen and file (can be turned on in the settings)
*/
Сам процесс установки описан ниже:
