Задавайте вопросы про Drupal - 2

T
На сайте с 09.12.2011
Offline
55
tls
#1261

WordPress and Drupal Denial Of Service Vulnerability Full Disclosure: http://www.breaksec.com/?p=6362

Version affected
WordPress 3.5 – 3.9 (latest version), works on default installation
Drupal 6.x – 7.x (latest version), works on default installation

...

Mitigation:
Update WordPress, Drupal (http://wordpress.org/download/, https://www.drupal.org/download)., or Delete xmlrpc.php.
Garin33
На сайте с 31.08.2009
Offline
169
#1262
tls:
WordPress and Drupal Denial Of Service Vulnerability Full Disclosure: http://www.breaksec.com/?p=6362

Кто-нибудь пробовал тестить свои сайты после обновления? Затестил - все равно ложатся сайты и 100% процессора и памяти используется (VPS).

Чистый друпал - тоже самое.

Потому что Drupal - это круто.
big boy
На сайте с 18.11.2006
Offline
308
#1263

А если не используется xmlrpc - всё равно угроза есть?

✔ Google spam update убил сайты? Что делать - https://webmasta.ru/blog/google-october-2022-spam-brain-update
Plazik
На сайте с 29.07.2008
Offline
168
#1264

big boy, да.

Лучше обновится.

big boy
На сайте с 18.11.2006
Offline
308
#1265

Ребятушки, подскажите, как можно переписать функцию стандартного модуля taxonomy_module. Функция taxonomy_link - http://api.drupal.ru/api/function/taxonomy_link/6

Хочу убрать дескрипшн при наведении на ссылоки тегов таксономии. Даже нашел нужную часть (выделил жирным):

function taxonomy_link($type, $node = NULL) {
if ($type == 'taxonomy terms' && $node != NULL) {
$links = array();
// If previewing, the terms must be converted to objects first.
if (isset($node->build_mode) && $node->build_mode == NODE_BUILD_PREVIEW) {
$node->taxonomy = taxonomy_preview_terms($node);
}
if (!empty($node->taxonomy)) {
foreach ($node->taxonomy as $term) {
// During preview the free tagging terms are in an array unlike the
// other terms which are objects. So we have to check if a $term
// is an object or not.
if (is_object($term)) {
$links['taxonomy_term_'. $term->tid] = array(
'title' => $term->name,
'href' => taxonomy_term_path($term),
'attributes' => array('rel' => 'tag', 'title' => strip_tags($term->description))
);
}
// Previewing free tagging terms; we don't link them because the
// term-page might not exist yet.
else {
foreach ($term as $free_typed) {
$typed_terms = drupal_explode_tags($free_typed);
foreach ($typed_terms as $typed_term) {
$links['taxonomy_preview_term_'. $typed_term] = array(
'title' => $typed_term,
);
}
}
}
}
}

// We call this hook again because some modules and themes
// call taxonomy_link('taxonomy terms') directly.
drupal_alter('link', $links, $node);

return $links;
}
}

Сменил выделенный код на:

'title' => $term->name

И вставил в template.php, но выскочила ошибка, что такая функция уже определена в стандартном модуле. Переименовал функцию с приставкой "nazvanie_temy_taxonomy_link..." - вообще никаких изменений.

Помогите плиз, желательно пошагово, что и куда вставить.

---------- Добавлено 11.08.2014 в 11:19 ----------

Upd: сработал вот такой вариант (в старой функции):

function termname_separate_terms($node_taxonomy) {
if ($node_taxonomy) {
//separating terms by vocabularies
foreach ($node_taxonomy AS $term) {
$links[$term->vid]['taxonomy_term_'. $term->tid] = array(
'title' => $term->name,
'href' => taxonomy_term_path($term),
'attributes' => array(
'rel' => 'tag',
'title' => $term->name
),
);
}
//theming terms out
foreach ($links AS $key => $vid) {
$terms[$key] = theme_links($vid);
}
}
return $terms;
}

При этом в node.tpl.php надо в начало вставить :

$terms = termname_separate_terms($node->taxonomy);



---------- Добавлено 11.08.2014 в 11:24 ----------

Только тайтл получился пустой. Точнее он совсем испарился вместе с тегом.

Alangasar
На сайте с 06.11.2008
Offline
98
#1266

big boy, посмотрите функцию template_preprocess_node.


if (module_exists('taxonomy')) {
$variables['taxonomy'] = taxonomy_link('taxonomy terms', $node);
}

Может попробовать отсюда зайти?

J
На сайте с 13.08.2008
Offline
54
#1267

Как добавить в выдачу "advanced sphinx" картинку? если например поле картинки - product_image?

<?php

// $Id: advanced_sphinx_items_result_main.tpl.php, v 1.0 2011/07/05 19:59:16 gagaga Exp $

/**

* @file advanced_sphinx_items_result_main.tpl.php

* Default theme implementation to item search result.

*

* Available variables:

* - $result: Array with all data:

* - $result['number']: Serial number search results.

* - $result['title']: Linked title to full node.

* - $result['excerpts']: .

* - $result['date']: Date and time of posting.

* - $result['username']: Linked login to node author.

* - $result['tax']: List of taxonomy term.

*/

?>

<li class="result-folded">

<h3 class="title-result"><span class="number-result"><?php print $result['number']; ?>.</span> <?php print $result['title']; ?></h3>

<?php if (isset($result['excerpts'])) { ?>

<div class="content-result">

<?php print $result['excerpts']; ?>

</div>

<?php } ?>

<div class="info-result">

<?php if (isset($result['date'])) { ?>

<span class="date-result"><?php print $result['date']; ?>,</span>

<?php } ?>

<?php if (isset($result['username'])) { ?>

<span class="autor-result"><?php print $result['username']; ?></span>

<?php } ?>

<?php if (isset($result['uc_product_image'])) {?>

<span class="tax-result"><?php print t('Tags') .': '.$result['tags']; ?></span>

<?php } ?>

<?php if (isset($result['tags'])) {?>

<span class="tax-result"><?php print t('Tags') .': '.$result['tags']; ?></span>

<?php } ?>

</div>

</li>

---------- Добавлено 13.08.2014 в 05:19 ----------

*******************

оба варианта показывают "битую" картинку

<?php
$image_settings = array(
'style_name' => 'thumbnail',
'path' => $node->product_image['und'][0]['uri'],
'attributes' => array('class' => 'image'),
'getsize' => FALSE,);
print theme('image_style', $image_settings);
?>



<?php
$image_settings = array(
'style_name' => 'thumbnail',
'path' => $record->uri,
'alt' => $record->alt,
'title' => $record->title,
'attributes' => array('class' => 'image'),
'getsize' => FALSE,
);
print theme('image_style', $image_settings);
?>


---------- Добавлено 13.08.2014 в 05:24 ----------

и этот - та же проблема

<?php

$image = array(

'path' => $file->uri, // путь до картинки.

'style_name' => 'thumbnail', // - имя стиля.

);

print theme('image_style', $image);

?>

J4
На сайте с 18.04.2013
Offline
20
#1268

Доброго времени суток! Добавляю к своему рабочему проекту на Drupal 7 мультиязычность. Есть страница с отзывами клиентов. Вопрос, как синхронизировать комментарии для нод с отзывами на всех языках?

big boy
На сайте с 18.11.2006
Offline
308
#1269

D6. Для вывода поля описания термина таксономии применяется лишь Filtered HTML.

Я не вижу выбора фильтра, как это показано на скриншоте - http://www.drupal.ru/files/06.04.png

В моём случае только поле для ввода, без выбора формата.

Full HTML включен на сайте, как основной, в нодах и блоках всё работает. В самом описании термина отлично работает CKEditor, но многие html теги просто обрезаются и в итоге получаю совсем не то, что вводил.

Alangasar
На сайте с 06.11.2008
Offline
98
#1270

Вчера озадачился. Если изменить главную страницу на другую, то страница /node ни куда не девается и на ней список всех нод, у которых стоит публикация на главной.

Вижу два варианта решения:

1. Править htacces, но drush up все убьет

2. hook_menu_alter c редиректом на главную

Заморачивался кто-нибудь этой проблемой?

Авторизуйтесь или зарегистрируйтесь, чтобы оставить комментарий