psicotico 1 октября 2010 в 11:24 theme('imagecache', 'img_50x50', $node2->field_base_logo_fid); не работает. Надо ли описывать в template.php? Drupal6 Блог Войдите или зарегистрируйтесь, чтобы отправлять комментарии
Виктор Степаньк... 1 октября 2010 в 11:31 "psicotico" wrote: не работает? ага, больше скажу - и не будет
glu2006 1 октября 2010 в 11:37 Для того чтоб работало надо не fid посмотрите на параметры этой theme функции, там путь к файлу оригиналу надо указывать.
psicotico 1 октября 2010 в 11:58 читал где то на друпал.орг что можно использовать fid. может кто подскажет как с помощью imagecache через fid сделать вывод без sql.
glu2006 1 октября 2010 в 12:19 Мля Вы как бабка старая, в код посмотрите: <?phpfunction theme_imagecache($presetname, $path, $alt = '', $title = '', $attributes = NULL, $getsize = TRUE) { // Check is_null() so people can intentionally pass an empty array of // to override the defaults completely. if (is_null($attributes)) { $attributes = array('class' => 'imagecache imagecache-'. $presetname); } if ($getsize && ($image = image_get_info(imagecache_create_path($presetname, $path)))) { $attributes['width'] = $image['width']; $attributes['height'] = $image['height']; } $attributes = drupal_attributes($attributes); $imagecache_url = imagecache_create_url($presetname, $path); return '<img src="'. $imagecache_url .'" alt="'. check_plain($alt) .'" title="'. check_plain($title) .'" '. $attributes .' />';}?> Ну как можно по fid (file id) создать пресет? по fid можно получить path из таблицы files и потом по пути построить пресет. Включайте логику и не дурите голову.
Комментарии
ага, больше скажу - и не будет
Для того чтоб работало надо не fid
посмотрите на параметры этой theme функции, там путь к файлу оригиналу надо указывать.
читал где то на друпал.орг что можно использовать fid.
может кто подскажет как с помощью imagecache через fid сделать вывод без sql.
Мля Вы как бабка старая, в код посмотрите:
<?php
$attributes = drupal_attributes($attributes);
function theme_imagecache($presetname, $path, $alt = '', $title = '', $attributes = NULL, $getsize = TRUE) {
// Check is_null() so people can intentionally pass an empty array of
// to override the defaults completely.
if (is_null($attributes)) {
$attributes = array('class' => 'imagecache imagecache-'. $presetname);
}
if ($getsize && ($image = image_get_info(imagecache_create_path($presetname, $path)))) {
$attributes['width'] = $image['width'];
$attributes['height'] = $image['height'];
}
$imagecache_url = imagecache_create_url($presetname, $path);
return '<img src="'. $imagecache_url .'" alt="'. check_plain($alt) .'" title="'. check_plain($title) .'" '. $attributes .' />';
}
?>
Ну как можно по fid (file id) создать пресет? по fid можно получить path из таблицы files и потом по пути построить пресет.
Включайте логику и не дурите голову.
спасибо всем.